site  contact  subhomenews

DroidCam audio from phone works

April 30, 2022 — BarryK

I posted yesterday, first test using DroidCam and my Android phone connected via USB:

One issue was no sound. Let it rest overnight, had a relaxing day, went for a walk, worked in the garden. This evening sat down and tested DroidCam again -- this time audio is working.

I will need to think through the steps again, make sure it can be made to work consistently. Recalling what I did:

Installed OBS-Studio from the package manager. Actually, there are two of them, one compiled in OE, the other I had compiled in a running EasyOS and created a PET. I chose the former. I intend to remove the OBS PET, as it is not required, as I have confirmed the OE-compiled one works, and all the required dependencies got installed.

I will need to rethink the exact sequence, but it went like this:

Started the DroidCam app in the phone, with USB cable connected.

# modprobe snd-aloop
# modprobe v4l2loopback-dc
# droidcam-cli -a -v adb 4747
Client v1.8.2
Video: /dev/video0
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connecting to
Audio: hw:1,1,0
connecting to

I then did this, so Pulseaudio was able to see the phone as audio input:

# pacmd load-module module-alsa-source device=hw:Loopback,1,0

The PA mixer then showed a "Loopback" input:

img1 far as I can remember, the "Loopback Analog Stereo" appeared after loading the 'snd-aloop' kernel module, but that doesn't seem to do anything. After that 'pacmd' line shown above, got the second "Loopback", and was then able to speak into the phone and got audio coming in -- that bottom bar is audio level as I was speaking into the phone.

I setup OBS to have v4l2loopback video input, and Pulseaudio Loopback audio input, and it worked.


...this is my first adventure using OBS, looks good.

GUVCView also now works with audio. I was able to choose Pulseaudio and Loopback device.

Very good, except still stuck on 640x480 only. Neither OBS nor GUVCView will allow setting a higher resolution, even though I am using the paid DroidCamX.

EDIT 2022-05-01:
I have started a thread on DroidCam in the forum:

...and, looks like we have a fix for obtaining higher video resolution.   

Tags: easy