Installing DroidCam on CentOS 7

Basically what DroidCam does is it allows me to turn my android phone into a webcam and use it on Skype, Google+, or even as a surveillance device if I wish. And I chose this program over other webcam apps for android simply because its desktop client work on both Windows and Linux. What I didn't realize is, its linux client seems to be for ubuntu and I'm running CentOS 7. Good thing is, its open source!

Still as a beginner with Linux, I went ahead and attempted to install it anyway. At first I followed the instruction their website here to download its installer. After I successfully downloaded its client and extracted the files out, I ran into this problem when attempting to run its installer.

Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: Entering directory `/mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback'
make -C /lib/modules/`uname -r`/build M=`pwd`
make: Entering an unknown directory
make: *** /lib/modules/3.10.0-693.17.1.el7.x86_64/build: No such file or directory. Stop.
make: Leaving an unknown directory
make: *** [all] Error 2
make: Leaving directory `/mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback'
 

After a bit of investigation I found out that in its installation it's attempting to change directory to here

/lib/modules/`uname -r`/build
 

and it just so happens that it is a broken symlink. Where its suppose to be pointing?

/usr/src/kernels
 

It's empty. But something is suppose to be there. After a bit of reading there's suppose to be a kernel source, for compiling driver. I deduced that droidcam needs to install a driver so that programs can detect it as a webcam, just like on Windows. And to compile a kernel driver, kernel source is needed. So Google led me to this instruction here and installed the kernel-devel package (Because maybe I don't need the full kernel source as the first bold line in the link suggests). I also found out that gcc needs to be install so,

yum install gcc
yum install kernel-devel

After running that I immediately notice a fix on my symlink mentioned above. So I tried to run the install again and voilà, it installed!

Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: Entering directory `/mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback'
make -C /lib/modules/`uname -r`/build M=`pwd`
make: Entering an unknown directory
make: *** /lib/modules/3.10.0-693.17.1.el7.x86_64/build: No such file or directory. Stop.
make: Leaving an unknown directory
make: *** [all] Error 2
make: Leaving directory `/mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback'
[jeangjenq@jeangjenq-centos droidcam-64bit]$ sudo ./install
[sudo] password for jeangjenq:
Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: Entering directory `/mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback'
make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/kernels/3.10.0-693.17.1.el7.x86_64'
LD /mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback/built-in.o
CC [M] /mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback/v4l2loopback-dc.o
Building modules, stage 2.
MODPOST 1 modules
CC /mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback/v4l2loopback-dc.mod.o
LD [M] /mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback/v4l2loopback-dc.ko
make[1]: Leaving directory `/usr/src/kernels/3.10.0-693.17.1.el7.x86_64'
make: Leaving directory `/mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback'
Moving driver and executable to system folders
Registering webcam device
Running depmod
make: Entering directory `/mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback'
make -C /lib/modules/`uname -r`/build M=`pwd` clean
make[1]: Entering directory `/usr/src/kernels/3.10.0-693.17.1.el7.x86_64'
CLEAN /mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback/.tmp_versions
CLEAN /mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback/Module.symvers
make[1]: Leaving directory `/usr/src/kernels/3.10.0-693.17.1.el7.x86_64'
make: Leaving directory `/mnt/downloads/Installers/Linux/droidcam-64bit/v4l2loopback'
Adding uninstall script
Done

That seemed to work! Droidcam client starts up when I starts it from the terminal, my android phone responds to its connection. And it works beautifully with Skype and my attempted facebook call.

Previous
Previous

Nuke CSP error in Linux

Next
Next

Nuke Frame Server setup on Windows