Linux

The GNU/Linux module (prototype) is a combination of a Video4Linux2 device driver, and an executable app that will transfer the stream from the phone to the driver.

It’s assumed you are somewhat familiar with the system. Text in blue should be executed in the Terminal. Also please keep in mind other posts on the blog are Windows oriented.

Install

1. You must first remove any old versions of the client you have. Scroll down to the “Removal” section below.

2. Download (for DroidCam v4.0+, DroidCamX v4.0+):
64-bit (f937c3510615af68c007b8c72deadb14), or
32-bit (73c6b9d853a0a6ab7c6d15174450a3f1).

3. Extract everything to the desktop or another folder. Make sure there are no spaces in the path.

4. Open up Terminal, cd ~/Desktop/droidcam-?? (or /whatever). A simple shell script is included that will automate the installation process:
Run sudo ./install 640 480 to install the client.

sudo needed to register the device driver. 640 and 480 are optional, this is the output resolution for the webcam. Replace them with one of 320 240, 480 360, 640 480, or 960 720. You can change this after the install as well.

The installer creates a settings directory as /home/`logname`/.droidcam. If you’re running as root, make sure you move it to your standard users home directory.

If no errors are displayed, you can ensure the device is installed with lsmod.

5. Open up a V4L2 compatible program (VLC player, Skype, Cheese, etc) and you should see DroidCam listed as a video device.

6. Start droidcam via the Terminal, or create a launcher if you’re using gnome. You can also try droidcam-cli -h.

7. Check the connection post on how to connect. If all goes well, you should see the output in the chat application, and you’re done! Remember to delete the install folder from step 3.

A note about USB connections: The latest version of the client will try to invoke ‘adb’ automatically, provided the executable is found via the $PATH environment variable (ie. export PATH=$PATH:/path/to/adb).
The following commands are automatically executed:
adb start-server
adb devices # Look in output for a connected device
adb forward tcp:$port tcp:$port # $port = specified port on the client

The Linux client is open source.

Update webcam resolution

You may change the webcam output resolution as follows:

1. Close any programs using the droidcam webcam. Unload the device driver: sudo rmmod v4l2loopback-dc

2. Re-load it as follows: sudo insmod /lib/modules/`uname -r`/kernel/drivers/media/video/v4l2loopback-dc.ko width=WIDTH height=HEIGHT (Where WIDTH and HEIGHT are numbers).
Recommended resolutions: 320×240, 480×360, 640×480, 960×720 or 1280×720.

3. Edit the first line of the text file ~/.droidcam/settings so the frames are resized properly (specify the same resolution as in 2). Restart the client to reload the settings.

4. Test the webcam with whatever programs you wish. You can keep changing the resolution.

5. Edit the text file /etc/modules so the webcam gets reloaded with the new resolution after reboot.

Removal

To remove the DroidCam client (or existing old version):

Close any running programs. Open the command line.
run `sudo ~/.droidcam/uninstall` which does the following:

– Unload the V4L driver: sudo rmmod v4l2loopback-dc.
– Delete the driver file and the client executable:
sudo rm -f /usr/bin/droidcam /usr/bin/droidcam-cli
sudo rm -f /lib/modules/`uname -r`/kernel/drivers/media/video/v4l2loopback-dc.ko

– Get rid of droidcam and ‘videodev’ in /etc/modules

Finally, Delete ~/.droidcam/ folder

  1. jerome says:

    Hi,

    Thanks for your app, it is very usefull.

    How i can use droidcam with firefox in Linux ? In skype its works fine but in firefox the cam isnt detected. Its a issue ? or its a configuration to say to firefox i have a virtual webcam ?

    Im using elemtary os 0.3

    Sorry for my bad english, im french

  2. todd says:

    how do we get flashplayer to recognize droidcam??????????????????????????????????????//

    • dev47 says:

      Hello,
      They keep messing things up pretty much with every single update – Ive given up trying to keep up with Flash issues.
      See if there is an update available for you, or try to change the webcam resolution (eg. 640×480 or 320×240).

  3. Carl says:

    hey dev47,

    thank you SO MUCH for supporting us Linux users :)
    the program is running flawlessly, though it would be great to have the rotate feature from the windows client

    greets Carl

  4. Ben says:

    When running the install script I get the error:

    $ sudo ./install 640 480
    — INSTALL: Webcam parameters: ‘640’ and ‘480’
    — INSTALL: Home directory: /home/farmer/.droidcam
    — INSTALL: Building v4l2loopback-dc.ko
    make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: *** /lib/modules/3.16.0-4-amd64/build: No such file or directory. Stop.
    Makefile:4: recipe for target ‘all’ failed
    make: *** [all] Error 2
    — INSTALL: v4l2loopback-dc.ko not built.. Failure

    Any advice? Some library I need is missing? I have the path ” /lib/modules/3.16.0-4-amd64″ on my system (debian jessie), but there is no “build” folder there. Manually creating one doesn’t help either

  5. asanka says:

    Hi, I am using CentOS 7 x64
    When running the install script I get the error:

    — INSTALL: Webcam parameters: ‘640’ and ‘480’
    — INSTALL: Home directory: /home/sesath/.droidcam
    — INSTALL: Building v4l2loopback-dc.ko
    make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: Entering directory `/usr/src/kernels/3.10.0-229.4.2.el7.x86_64′
    Makefile:619: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
    make[1]: *** No rule to make target `Folder/v4l2loopback’. Stop.
    make[1]: Leaving directory `/usr/src/kernels/3.10.0-229.4.2.el7.x86_64′
    make: *** [all] Error 2
    — INSTALL: v4l2loopback-dc.ko not built.. Failure

    and run also
    yum install linux-headers-`uname -r`

    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * base: mirror.learn.ac.lk
    * epel: mirrors.hustunique.com
    * extras: mirror.learn.ac.lk
    * nux-dextop: li.nux.ro
    * updates: mirror.learn.ac.lk
    No package linux-headers-3.10.0-229.4.2.el7.x86_64 available.
    Error: Nothing to do
    Please Any advice?
    Thank you

  6. vindicator says:

    Ubuntu 15.04 64-bit
    droidcam x64
    Skype i386

    Built and installed fine.
    Cheese automatically uses the loopback
    Skype (i386): “No devices found”
    WebcamStudio: “Detected Video Devices” is blank. VirtualCam shows Droidcam (v4l2loopback) (0)

  7. eslam says:

    IT IS A VERY GOOD APPLICATION

Leave a Reply

Your email address will not be published. Required fields are marked *

captcha

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>