Enabling a USB Camera in Ubuntu 14.04

In theory, the USB camera should work as plug-in play, but I found when I upgraded to Ubuntu 14.04 that something was not working. This post assumes that your hardware is supportable with the uvcvideo driver. To start off, please confirm the following (In truth, there is more confirmation than actual work).

1. The USB Camera is recognized. The good old ‘dmesg’ should do the trick:

$ dmesg | grep -i usb

After digging in the output, found the following:

[ 1.774055] usb 2-3: new high-speed USB device number 3 using ehci-pci
[ 1.951988] usb 2-3: New USB device found, idVendor=056e, idProduct=700e
[ 1.951995] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1.952000] usb 2-3: Product: UCAM-DLE300T series
[ 1.952004] usb 2-3: Manufacturer: ELECOM

Yup, there is my cheap USB camera.

2. That the uvcvideo driver is loaded

$ lsmod | grep uvcvideo
uvcvideo 80885 0
videobuf2_vmalloc 13216 1 uvcvideo
videobuf2_core 40664 1 uvcvideo
videodev 134688 2 uvcvideo,videobuf2_core

If nothing shows up, you can try loading it:

$ sudo modprobe uvcvideo

3. The device is actually recognized

The video should be under /dev, but the number may depend on how many devices you have hooked-up.

$ ls /dev/video*

Only one for me.

4. Your user is in the video group.

This should be added by default, but just in case.

$ grep dave /etc/group | grep video

If your user is not there, you can add if you have root permissions.

$ sudo usermod -a -G video $USER



So all should be well if you are up to here. Now for the crux of the problem. Take a look at the permissions of your ‘/dev/video*’.

$ ls -l /dev/video*
crw------- 1 root root 81, 0 May 6 00:58 /dev/video0

Hey, only root has access to this device! To resolve, we need two steps:

1. Change the group ownership to video

$ sudo chown root:video /dev/video0

2. Add read/write permissions for the group.

$ sudo chmod g+rw /dev/video0

Now that the permissions are corrected, take a deep breath and test (I use ‘mplayer’ for command line testing, but you can use ‘cheese’, ‘skype’, etc)

mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -fps 30
9 comments on “Enabling a USB Camera in Ubuntu 14.04
  1. Allen says:

    Thanks, worked perfectly. Domo Arrigato Gazaimasu.

  2. FOXHOG says:

    This was a very effective advice. Thanks so much!

  3. Peter Maughan says:

    It worked for me, too, on Ubuntu 16.10. Many thanks.

  4. Carlos Santos says:

    Clear, concise, awesome!!! Thanks for the post

  5. Mike says:

    Thank you! Worked like a charm.

  6. Mani Mehrvarz says:

    Thanks! do you know how can I replace the usb cam as the defult camera

  7. Johan says:

    It helded me in 17.04

  8. SREEDHAR says:

    Thanks good understanding of unix/linux admin.

  9. pbd says:

    you rock! thank you

Leave a Reply

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