Running Video4Linux 1 Software with Video4Linux 2 Devices.

As per the documentation for the v4l library, the wonderful video4linux developers have created a compatibility library that makes various applications that only support v4l1 devices work with v4l2 devices.

I've tested this myself with both Kopete and Skype and can confirm that it does indeed do what it says it does.

Kopete without LD_PRELOAD

Kopete with LD_PRELOAD

 

It's no too hard to get your apps working with this library by simply executing a command before launching your app of choice. Simply open a console and type the following command before running your program of choice.

export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so

 

Then from the same console, run your program, eg.

To run Kopete,

Launch a Konsole session.
 

Type the export LD_PRELOAD command followed by the program name you want to run.

 

Special Instructions for Skype on 64bit systems.

For users running 64bit versions of Ubuntu/Kubuntu there are additional steps due to the fact that Skype is only made available in a 32bit version and is therefore incompatible with the default v4l1compat.so. If you haven't already installed skype, you'll need to do it as follows.

Firstly you'll need to make sure you have both libqt4-gui and ia32-libs installed or skype wont launch.

Start the Systems Setting panel.

Start the Add and Remove Software module.

 

Type ia32-libs into the text box and press the Enter key.

Press the “add” icon.

 

Type libqt4-gui into the text box and press the Enter key.

Press the “add” icon and then the Apply button.

 

When the dialogue box appears, press the "Apply Now" button.

After the Querying dialogue appears the additional packages dialogue will appear. Press the OK button.

 

You might get asked for you password. If so, type it into the password area and press the OK button.

The packages will download and install.
 

 

Once done, close the package installer.

Secondly, grab the Skype deb package, and then install it with the following command.

sudo dpkg --force-architecture --install skype-debian_2.0.0.72-1_i386.deb

Then you'll need to grab the 32 bit version of the libv4l-0 package for your distribution and install it manually. You can't use the package manager to install it because doing it that way it will install it over the top of the 64bit version, not in addition to, which is what we need. You should be able to find the version you need from here

Right click the package file.

Open with Ark (or you favorite decompressor.)

 

Double click data.tar.gz and
another Ark will open with its
contents displayed.

Click the plus sign to the right of usr and both share and lib folders should be displayed. Click lib and then the “Extract” button to extract the lib folder.

 

Choose the place to extract the lib folder to and press the “OK” button.

The usr folder appears in the lower left corner.
 

If you selected your home folder as the place to extract into as I did, then you should now have a folder called usr in there that holds the files we need to move into /usr/lib32. Because we need to have elevated privileges to successfully move these files into a system area, we need to use 'kdesudo dolphin' to do the moving instead of plain 'dolphin'. To do this, the easiest way is to right click the usr folder, and in the “Open with” area, type “kdesudo dolphin” (without quotes) and press the enter key. You'll be asked for your password so enter it when prompted.

Right click usr and select "Open with..."

Enter kdesudo dolphin into the "Open with" area.

 

Enter your password and press the enter key.

If you see this error, click here.

Now lets move the files to the /usr/lib32 directory with the following steps.

Click the lib folder to enter inside it.

Select all the files and right click and then select Copy.

 

Navigate to the /usr/lib32 folder, right click in a blank area, and select "Paste 4 items"

That should've copied the library files into where they need to be. Now you can execute the following in a console to run Skype with Video4Linux1 devices.

export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so
skype

Copyright (c) 2009 Greg Newsome all rights reserved.