WebCams in Linux

I found some time to make a small document. If you are unsure of what to do with a webcam in Linux, then you may find this post helpful. I will post the commands for carrying out these tasks in an another post. If you want save this for reading it later, download the PDF from the link below.


Download the .PDF version of this post: WebCams in Linux [PDF] 62kb



usbutils [Package]
It provides facility to display information about USB buses in the system and the devices connected to them.

Notable features -lsusb, update-usbids, and usb-devices

UVC- USB Video Class  [Abstraction]                       
A Class of devices that are capable of streaming video via USB (Example: webcams). UVC driver have to be installed to support these devices. If the device works with UVC drivers then it is UVC Compatible Device. Generally this driver is included in Linux kernels [above 2.6.26] by default.

uvcvideo [Driver]
A driver provides an intermediate layer that allows higher-level software to interact with the hardware.
The interaction between the UVC device (i.e. webcam) and the higher-level software is brought about by uvcvideo.

The below website lists the UVC Compatible devices*.Other webcams with issues and that which are not tested are also listed.
*Update: Issues in Linux for Logitech devices [manufactured after Dec 2008] have been solved.

V4L -Video 4 Linux [API]  (Latest-V4L2)
            An API is used to communicate between computing endpoints.

The actual communication with the device takes place here. With this API, the high-level layers can initialize, start, query and end a conversation with the UVC device.

[Applications like Ekiga uses V4L2]


luvcview [Application]
luvcview is a camera viewer for UVC based webcams. It includes an mjpeg decoder and is able to save the video stream as an AVI file.


guvcview - GTK+ UVC Viewer [Application]
guvcview is a V4L2 video viewer and capture software for the UVC device. It can also capture audio from the microphone of the camera. The GUI is created using GTK+. It is based* in luvcview.

[*Not to be confused as “dependency”. guvcview doesn’t require the presence of luvcview to work.]


Gstreamer [Framework]
GStreamer is a pipeline-based multimedia framework. It supports application to construct graphs of media-handling components, including audio playback, audio and video playback, recording, 
streaming and editing. The pipeline design serves as a base to create many types of multimedia 
applications such as video editors, streaming media broadcasters, and media players.

 gstreamer v4l2src plug-in  (- V4L2 plug-in for Gstreamer)
So with V4L2 plug-in, the UVC device (i.e. webcam) is like any other source of streaming Media for the gstreamer. With gstreamer support, an application is not only capable of recoding but also playback what it records.

Just by obtaining an .AVI file doesn’t mean that the program has simply dumped the frames from the UVC device one after the other. Theses frame have to undergo some sort of compression and then stored into the memory.

[Many Applications like (Audio players -) Rhythmbox, amaroK, (Media players -) Totem, Kaffeine and
 (Video editors -) Pitivi use gstreamer support.]


FFmpeg [Framework]
It is a multimedia framework that produces libraries and programs for handling multimedia 
data. It provides support to stream, record and convert audio and video. It supports a wide range of codecs and media formats.

gst-ffmpeg  (- FFmpeg plug-in for Gstreamer)
This plug-in assists Gstreamer to support additional media formats.

[Many applications use libavcodec- a codec library of FFmpeg]