Monday, 16 May 2011

LifeCam VX-1000 on Ubuntu 10.04

Please note that not all of the steps outlined in this post may be necessary to get your VX-1000 working with Lucid - you might find that all you need to do is install Jef Moine's gspca patch! I don't know who Jef Moine is and I have no idea about what the patch will do to your system; but, I do know that it worked for me. I recommend reading all of this post before deciding whether you need to follow each step.

The VX-1000 LifeCam
After several attempts to get my VX-1000 Microsoft LifeCam working with the various Ubuntu releases, I'd almost given up hope of successfully integrating the hardware with my desktop: inevitably, Ubuntu could see the device (type lsusb into a terminal), but sound and video stubbornly refused to co-operate. I assumed that I would never been able to get it to work with Ubuntu and I'd even started to consider alternatives - Then I plugged it into 10.04!.

Doubtless, I've made the process of getting this over-priced/under-performing hardware to work with Ubuntu more difficult than necessary, but now the camera works with Cheese and I can use it for both video and sound calls with Skype. That's the good news: the bad news is that the picture quality is pretty rubbish!

Actually, getting the video to work in Skype is fairly straightforward. Make sure that the camera is plugged in and then open a terminal and type:

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

However, I experienced two problems with this approach:
  1. After closing Skype or rebooting the computer, the video no longer worked. This seems to be because the standard command in the startup applications entry is simply, skype and no amount of editing in the Startup Applications' Preferences dialog would force the v4l application to load.
  2. The built-in microphone didn't work.
I rectified the first problem by removing the standard Skype entry from the Startup Applications' Preferences menu (Preferences > Startup Applications' Preferences & unchecked the Skype option) and then created a new shell script and adding that to the startup routine. Using Scite (any text editor should suffice), I created the new script thus:

#!/bin/bash
# Start Skype with video enabled
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype

I saved the file in my /home directory as skype.sh and then made it executable:

chmod +x /home/jogga/skype.sh

(For obvious reasons, if you are following these instructions, change your username to suit!) Then I added this script to the startup applications by clicking Add in the Startup Applications' Preferences dialog.

skype.sh
Adding the Skype script to the Startup Applications List

This approach does seem to lengthen the boot time but it does work.

To get the sound to work I installed Jef Moine's latest gspca patch. The patch works for a broad range of webcams and you can find a list of supported devices here.
  1. Download the gspca-2.12.25.tar.gz patch to your Downloads directory (or any convenient location).
  2. Right-click the package and select the Extract Here option (or use Archive Manager to extract the package to your location of choice).
  3. Open a terminal and change to the gspca-2.12.25 directory - in my case:

    cd /home/jogga/Downloads/gspca-2.12.25

    but you should amend the command to suit your own username and directory location.
  4. If you want to install the whole package (i.e. support for all the webcams), type:

    make

    However, it is possible to install only the driver required to make your camera work. For instance, to support the VX-1000, type:

    make gspca_sonixj.ko

    You can identify the required driver using the gspca Supported Webcams documentation.
  5. Then, install the driver:

    sudo make install

  6. Reboot your computer and test your webcam's microphone by making a Skype test call.
If the microphone is still not working, you may need to change the input device in the Sound dialog (Preferences > Sound > Input).

So, this is another piece of hardware that will see a more use thanks to a little perseverance and a lot of effort by the Ubuntu Community.

Sources & References:
Jef Moine: Jef's Page
Gnome Projects: Cheese Home Page
Kernel.org gspca Supported Webcams

No comments:

Post a Comment