Linux UVC driver and tools – FAQ

How do I find out whether my camera is a UVC device or not?

  1. First find out the vendor ID (VID) and product ID (PID) of your webcam.
  2. Use the lsusb tool and look for video class interfaces like this: (In this example, the VID is 046d and the PID is 08cb.)
lsusb -d 046d:08cb -v | grep "14 Video"

If your device is a UVC device, you should see a number of lines that look like this:

bFunctionClass         14 Video
bInterfaceClass        14 Video
bInterfaceClass        14 Video
bInterfaceClass        14 Video

In this case the Linux UVC driver should recognize your camera when you plug it in.

If there are no such lines, your device is not a UVC device.

I have an UVC webcam but it is not working. What do you need to troubleshoot it?

If your webcam is UVC-compatible, it should be supported out of the box in any recent Linux distribution. Failures are usually caused by buggy applications or broken hardware (cameras, USB cables and USB host controllers can be faulty).

You should start with trying several applications. qv4l2, guvcview and luvcview are common test tools for UVC webcams, but feel free to try other V4L2 applications as well. In particular be careful that different webcams might use different video formats, and some of them can be unsupported in some applications.

If all applications fail display the same failure, chances are that your hardware is broken (or at least buggy), or that you're lucky enough to have hit a bug in the UVC driver. To diagnose the problem, please follow this procedure:

  1. Read "How do I find out whether my camera is a UVC device or not?".
  2. Enable all uvcvideo module traces:
    sudo echo 0xffff > /sys/module/uvcvideo/parameters/trace
  3. Reproduce the problem. The driver will print many debugging messages to the kernel log, so don't let video capture running for too long. You can disable the uvcmodule traces when you're done:
    sudo echo 0 > /sys/module/uvcvideo/parameters/trace
  4. Capture the contents of the kernel log:
    dmesg > dmesg.log
  5. If your device is not listed in the supported devices list, dump its USB descriptors:
    lsusb -d VID:PID -v > lsusb.log
    (replace VID and PID with your device VID and PID)
  6. Send a clear description of your problem, including the steps to reproduce it, to the linux-uvc-devel mailing list in a plain text e-mail (no HTML message). Attach dmesg.log (and possibly lsusb.log) to the e-mail.

MPlayer exits with 'FPS not specified in the header or invalid'.

When querying devices for their supported frame rate, MPlayer exits with the following message in its log:

FPS not specified in the header or invalid, use the -fps option.
No stream found.

v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.

Exiting... (End of file)

Older MPlayer version had trouble detecting video frame rates for digital video devices such as webcams. The problem has been fixed in MPlayer 1.0-rc2 revision 27171. In the meantime, you can override the frame rate with:

mplayer tv:// -tv fps=25