You are on page 1of 6

Using your Android phone as a webcam for Ubu... https://randomblog.hu/using-your-android-phon...

MAY 7, 2020 TAMÁS BAKA

Using your
Android phone
as a webcam
for Ubuntu
20.04 with
DroidCam
During the current pandemic, the home
of�ce suddenly became the preferred

1 of 6 29/07/2020 10:41
Using your Android phone as a webcam for Ubu... https://randomblog.hu/using-your-android-phon...

mode of work. This, of course, caused a


huge increase in webcam prices and
shortages in supply. I ran into the same
problem and my laptop camera was no
viable alternative either with its subpar
quality. Luckily, there is a way to use
my better-than-average phone camera
for conference calls with the desktop
computer running Ubuntu.

DroidCam and it’s paid version,


DroidCamX turns your Android phone
into a wireless camera that you can use
with Skype, Zoom, Teams, Discord,
Meet, and other such programs. I’m
using the paid version as I anticipated
extra features, but I don’t really see
much of a difference. The only
difference in options, “FPS boost”
doesn’t really work with my devices.

Setting up DroidCam
1. Install the app on your phone
2. Follow the of�cial instructions to
install DroidCam on your
computer or use this redacted list
of commands in the terminal:
sudo apt-get install gcc
make
cd /tmp/
wget
https://www.dev47apps.com

2 of 6 29/07/2020 10:41
Using your Android phone as a webcam for Ubu... https://randomblog.hu/using-your-android-phon...

/�les/linux
/droidcam_latest.zip
unzip droidcam_latest.zip
-d droidcam && cd
droidcam
sudo ./install
3. Check if the new video device is
available with the following
command:
lsmod | grep v4l2loopback_dc
4. Start DroidCam on your phone
and note Wi� IP address shown
on the screen.
5. Start DroidCam on your computer
with the following command in
the terminal:
droidcam
6. Enter the IP address you saw in
step 4 in the Phone IP �eld and
click on the [Connect] button.
7. Test the video on your preferred
video call software. Should work
in the default Ubuntu camera app
called Cheese too. Success
depends on your phone model
and resolution, for me, Skype and
Cheese doesn’t seem to work, but
Discord, Google Meet, and VLC
does.
8. Modify the webcam capture
resolution by editing the following
�le if you are not satis�ed with
the defaults:

3 of 6 29/07/2020 10:41
Using your Android phone as a webcam for Ubu... https://randomblog.hu/using-your-android-phon...

/etc/modprobe.d/droidcam.conf
In my case, 1920×1080 worked
perfectly.
9. Create a shortcut to start
DroidCam more easily. To do this
use the following command in the
terminal…
gedit ~/.local/share/applications
/droidcam.desktop
… and copy the following lines into
the editor and save the �le:
[Desktop Entry]
Type=Application
Name=Droidcam
Comment=Use your Android
phone as a wireless webcam!
Icon=droidcam
Exec=/usr/bin/droidcam
Terminal=false
Categories=GNOME;GTK;Video;
10. Grab a png or svg icon for
DroidCam and save it to the
.local/share/icons folder.

After all this, DroidCam should be


available in the Ubuntu Dash, so just
press the Win/Super key and start
typing droidcam to launch it. You can
also favorite it so it will be always
present on the panel.

Caveats
I �rst played with DroidCam yesterday

4 of 6 29/07/2020 10:41
Using your Android phone as a webcam for Ubu... https://randomblog.hu/using-your-android-phon...

and after rebooting the computer the


video device was missing. After
reinstalling it, the device is now present
even after rebooting multiple times.

Your experience with DroidCam may


vary vastly based on your phone and
chosen resolution. With my Samsung
A8, the picture was pretty good, much
better than a budget webcam that I
can’t even buy at the moment.

Turning on the whole system for a


video call takes a few minutes and I
have no idea what happens if someone
calls my phone number when the
camera is in use.

Positioning the phone is my biggest


challenge at the moment, though I have
a janky solution that involves
cardboard and jar rubbers �

Update: Switching to
ADB
My Ubuntu installation decided today
that it will not connect to wi� anymore.
I’m not too sad, as I’m using a wired
anyway and the wi� stick was an extra
addition just for DroidCam.

This provided the perfect opportunity


to try DroidCam through ADB, that is

5 of 6 29/07/2020 10:41
Using your Android phone as a webcam for Ubu... https://randomblog.hu/using-your-android-phon...

connecting the phone to the PC via


USB cable. The added bene�t is that
the phone is also being charged while
calls.

Here is what you need to do:

Install ADB and Fastboot on


Ubuntu with the following
commands:
sudo apt install adb fastboot
Enable USB debugging on your
Android phone.
Start up DroidCam on your phone
and PC.
Choose the option for ADB on the
PC client and press the [Connect]
button.

6 of 6 29/07/2020 10:41

You might also like