Log in

No account? Create an account
18 November 2008 @ 11:30 am
Fedora 9, kernel 2.6.27 and webcams  
Hi All,

So a kernel update, updating the kernel to 2.6.27 has hit F-9, and with it come the new gspca webcam drivers adding support for many new cams. However people trying to use this new support sofar have found that it doesn't work. So here is an explanation why it does not work, and how to get it to work.

Most cams supported by the new gspca drivers deliver data compressed with various
different custom proprietary compression algorithms, which no apps know how to
handle. The zc3xx driver delivers JPEG data, so it will work with some apps (try
ekiga) but not with others, such as cheese, which do not know how to handle JPEG sources.

The old gspca driver solved this by doing format conversion inside the kernel.
Which is a very bad thing to do and thus has been removed in the new version.

As most apps / libraries do not know how to handle the multitude of video
formats webcams can produce, I've written libv4l:

I've just done a build of the latest libv4l for F-9, so it should be available
through "yum install libv4l" soon. In the mean time you can download the rpm
from here: http://koji.fedoraproject.org/koji/buildinfo?buildID=70038

As no applications in F-9 have been patched to use libv4l (most apps are
patched in F-10), you will need to use the libv4l C-libary wrapper to tunnel
the v4l calls the apps make through libv4l.

Todo this you need to launch the applications from a terminal and instead of
typing just <app-name> you type:
"LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so <app-name>"

Note that for 64 bit applications this becomes:
"LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so <app-name>"

So for example to launch cheese you type:
"LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so cheese"

One last note the use of LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so only
applies to 64 bit *applications*, 32 bit applications on 64 bit installations,
such as skype, still must use the version without the "64" in it, so:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so. To get the 32 bit libv4l installed on
a 64 bit system do: "yum install libv4l.i386"
Tags: ,