Everything wrong with DroidCam and how to solve it
DroidCam is a freemium application which allows you to use your phone as a web camera (thus getting a better picture quality for meetings than ordinary webcams)
So, needless to say, it’s very helpful.
Now, I have been facing a number of issues with this application for a few days and I felt it would be best if I just share stuff regarding how I make it work seamlessly, it won’t look good when you are late for a meeting because you are troubleshooting droidcam, so here’s how I use it.
- v4l2loopback package can cause a lot of problems, so, I would suggest you to download it from source, you can do that using this script given below (this also installs droidcam on your linux computer)
This isn’t the most efficient script there is, but it works.
First, run the command
vim installation_droidcam.sh && chmod +x installation_droidcam.sh
(you might have vi editor installed by default, so if you don’t have vim, just replace vim
with vi
, if neither are available, run sudo apt install vim
, I personally use featherpad)
Now, paste the below script into your text editor (this doubles as a reinstallation script too, but if you want the latest and greatest, you would have to replace the installation commands of droidcam given below with whatever is available here on the official website
<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">
</span><span style="color:#323232;">cd ~
</span><span style="color:#323232;">
</span><span style="color:#323232;">pkill droidcam
</span><span style="color:#323232;">
</span><span style="color:#323232;">sudo /opt/droidcam-uninstall
</span><span style="color:#323232;">
</span><span style="color:#323232;"># installation script for droidcam
</span><span style="color:#323232;"># if you want the latest version, go to
</span><span style="color:#323232;"># https://www.dev47apps.com/droidcam/linux/
</span><span style="color:#323232;">cd /tmp/
</span><span style="color:#323232;">wget -O droidcam_latest.zip https://files.dev47apps.net/linux/droidcam_2.1.3.zip
</span><span style="color:#323232;"># sha1sum: 2646edd5ad2cfb046c9c695fa6d564d33be0f38b
</span><span style="color:#323232;">unzip droidcam_latest.zip -d droidcam
</span><span style="color:#323232;">cd droidcam && sudo ./install-client
</span><span style="color:#323232;"># end of installation script
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">cd ~
</span><span style="color:#323232;">
</span><span style="color:#323232;">sudo rm -r v4l2loopback
</span><span style="color:#323232;">
</span><span style="color:#323232;">pkill droidcam
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">gh repo clone umlaeute/v4l2loopback
</span><span style="color:#323232;">
</span><span style="color:#323232;">cd v4l2loopback
</span><span style="color:#323232;">
</span><span style="color:#323232;">make && sudo make install $ sudo depmod -a
</span><span style="color:#323232;">
</span><span style="color:#323232;">cd ~
</span><span style="color:#323232;">
</span><span style="color:#323232;">sudo modprobe v4l2loopback
</span>
Now, save the script and exit it.
Everything required for droidcam to work has been installed on your laptop (you would still have to install Droidcam (green) on your android device and set it up over there tho, I am not gonna guide with that)
Here’s a video for that by Mental Outlaw
Now, you would have to edit the desktop entry for droicam on your laptop to include sudo modprobe v4l2loopback
command, because this needs to be running for droidcam to work. So, to do that, we will create another script
run vim /home/$USER/droidcam_start_menu_libre_desktop_file.sh && chmod +x /home/$USER/droidcam_start_menu_libre_desktop_file.sh
and paste the below script and save it
<span style="color:#323232;">#!/bin/bash
</span><span style="color:#323232;">
</span><span style="color:#323232;">sudo modprobe v4l2loopback
</span><span style="color:#323232;">
</span><span style="color:#323232;">/usr/local/bin/droidcam
</span>
After this, menulibre if you don’t have it already by doing sudo apt install menulibre
and edit the desktop file entry for droicam such that it looks like the image below (make sure you Tick Run in Terminal) as you need to have v4l2loopback
running in the background for droidcam to work.
In the command text box, you much have /home/$USER/droidcam_start_menu_libre_desktop_file.sh
(location of the script we just created) and now save it.
And that’s it!
From now on, you would be able to start droidcam (while keeping droicam on on your android device) The terminal would open, enter your password and you can now connect and use your phone as a second camera (a much better second camera)
I haven’t been very articulate, so doubts are welcome