Platinum Sponsors

  • Intel
  • IBM

Gold Sponsors

  • NetApp

Silver Sponsors

  • HP
  • Google
  • MontaVista
  • Sandisk


  • Portland State University
  • Linux Foundation

Press Partners

  • Linux Journal
  • Linux Weekly News
  • Linux Pro Magazine

Sponsorship opportunities

For more information on sponsorship opportunities, please contact Angela Brown. Linux Plumbers Conf sponsorship packages.

libv4l2 - Hans de Goede


Hans has been a computer science Lecturer for the The Hague University for the last 9 years. In his free time Hans is a Linux developer since 1996, working on a wide variety of projects, including maintaining 200 packages in Fedora, various hwmon kernel drivers and lately helping with getting gspca merged into the mainline kernel and writing a userspace libary for easy v4l device access.


The Linux kernel offers an API to access a wide variety of video (input mostly) devices through the video4linux API, for example webcams, analog and digital tv -tuners. By offering a single API for all video input devices v4l makes it possible for applications to easily support a wide variety of devices.

Currently the v4l API is strictly a userspace <-> kernelspace API, so there are no further support libraries for applications to access v4l devices. This means that applications need to support reading the frame data from the video device in a variety of video formats and then converting it to a video format suitable for their own use.

The out of kernel gspca usb webcam driver framework solved the video format problem by doing conversion from hardware specific compression formats (usb 1.1 bandwidth is too low to carry raw frames at a decent framerate) to generic formats as supported by most applications in the kernel. With the merging of the gspca driver into the mainline kernel, this conversion has been removed from gspca as video format conversion clearly does not belong in the kernel.

This made the video format problem much larger as gspca adds 8 different non standard videoformats, of which 3 feature complex compression algorithms. Implementing support for all these formats into all v4l applications is clearly not the way forward as this leads to much code duplication and maintainance issues. Hence libv4l2 a utility library for v4l2 applications doing format conversion was born.

The choice has been made with libv4l to 100% copy the application <-> kernel interface for direct /dev/video access, except that now additional video formats can be requested (and will be granted), during video format negotiation and that (to the application transparent) conversion will happen from the raw video format given by the device to what the application wants. This choice was made to allow very easy porting of the numerous existing v4l2 applications to libv4l2, all that needs to be done is replace the open on /dev/video with v4l2_open and additional calls on the resulting fd like ioctl with v4l2_ioctl, etc.

As there are still quite a few applications out there which use the (obsolete) v4l1 API, and since the kernel v4l1 emulation is incomplete in many drivers (uvc and gspca for example), a v4l1 emulation library which does (transparent) format conversion and v4l1 emulation on top of v4l2 devices has been written, this lib is called libv4l1 and mimick the /dev/video v4l1 interface in the same way as libv4l2 mimicks the /dev/video v4l2 interface.

A joined effort between Fedora, Suse and Debian is underway to port all v4l2 applications in these distro's to libv4l, see libv4l2 progress