Video
You will need the v4l2loopback module for video sharing with other apps.
This allows you to create "virtual video devices", which applications will detect as ordinary video devices.
[1]
[2]
Debian / Ubuntu
sudo apt install linux-headers-$(uname -r) v4l2loopback-dkms
Fedora / RHEL
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install kernel-headers v4l2loopback
Audio [+]
The DroidCam Client can use the Linux ALSA Loopback soundcard for audio.
However, there are many nuances with audio on different Linux systems.
It is highly recommended you use a regular microphone and keep droidcam for video only.
Note: This does not work with OBS Studio, you will need the DroidCam Client installed from above.
To load the ALSA Loopback card, use
sudo modprobe snd_aloop
To use the mic in PulseAudio you can either run
pactl load-module module-alsa-source source_properties=device.description=DroidCam device=hw:Loopback,1,0
(you may need to adjust the last number; on some systems you need to do this after launching the droidcam client),
or by editing /etc/pulse/default.pa as described
here.
With Pipewire, open pavucontrol, Configuration tab. There are probably multiple devices called “Built-in Audio”, one of them is droidcam. Choose the profile Pro Audio, go to the Input Devices tab and check which meter reacts to the phone’s audio input (eg. Built-in Audio Pro 1), this is the desired audio input device.
Inside pavucontrol you can now set this device as default input or choose it as the input device for individual apps etc.
Try adding the following extra parameters to the end of pactl
command above if sound is still not detected
channels=2 rate=44100 format=s16le
(adjust the values based on the Audio settings of the Client)
If the Loopback card takes over your line out, you can set the default PulseAudio sink as shown here.