Friday, March 4, 2011

Skype in Debian

A friend recommended Skype as an alternative to MSN for video chat- so I thought I'd give it a go. Of course I also have to persuade the people I want to chat with to install it, but that will come later.
I'd already bookmarked the Debian Skype Wiki, intending to install Skype at some point. Checking the page again, I found that installation is easy for i386 platforms at least. There is a Skype repository, although there doesn't seem to be a key, so installing brings up a security warning. I used Synaptic to add the repository, update sources and install, rather than edit the sources file and use the command line to update and install- both methods work.
Registering with Skype was easy, but my webcam didn't work. Skype recognised the camera, and the blue light on the camera would flash briefly after hitting the Test button, but no image.
The solution turned out to be the same one I'd used for my webcam not working in Meebo (the web-based chat program that allows me to use MSN on Linux).
It seems that Skype has problems using the latest webcam interface libraries on Linux (not just Debian) and the solution is to tell it to use older libraries.
Simply start Skype from a terminal with this command:
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype
[Update: Ray in a comment says that the above command didn't work for him, but a similar command did:
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype
By coincidence, I came across an explanation on the Arch Linux Wiki webcam page today of what the two commands do and when to use them. It is a little technical, but it's not a problem just to try both and see which works- actually both do for me.]

For convenience, save the command as a script: create a new document on the desktop, in Preferences make it executable, add the following to the file and save.
#!/bin/sh
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype
(The first line tells the computer that this is a script.) Double click on the file and select Run to launch Skype with working web cam.
Skype may of course fix their program to work with newer webcam libraries in the future- so check after any updates- maybe Skype will work with webcams when launched normally at some point in the future.

7 comments:

  1. Actually the following command did NOT work for me:
    $ LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype
    However, it did prompt me to dig some more where I found the following command that DID work:
    $ LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype
    Thanks for getting me started.

    ReplyDelete
  2. Thanks for the feedback.

    Both commands seem to work for me.

    I came across this page today which explains what each of the commands does, although I don't really understand the explanation.

    https://wiki.archlinux.org/index.php/Webcam_Setup#Get_software_to_use_your_webcam

    Still, it's not hard to try both commands and see which works.

    ReplyDelete
  3. Brilliant!

    My cam worked perfectly out of the box with Skype in Lenny, and works with other programs in Squeeze but not Skype so it appeared to be a Skype problem.

    The first command worked for me so I created a script as outlined in the article and my cam is working great.

    Pity Skype developers haven't paid much attention to Linux for many years, I'm still grateful to have a version for Linux..wasn't the first ever version of Skype written for Linux many years ago (not windows?).

    Even so at some point continued development of the Linux kernel and various distros and we won't have work arounds to get 3 year old versions of Skpe for Linux working. Do hope Skype releases an update soon.

    ReplyDelete
  4. My camera was working, but not with Skype (debian 6.0.1). I started skype like you said LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype and it worked like charm. I would have probably never figured it out by myself, thanks man ;)

    ReplyDelete
  5. If you are using a 64bit distro and have 64bit skype installed you need to run 32bit version of v4l2convert.so. Assuming that the library is preloaded, the command is: LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype

    ReplyDelete
  6. LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype , this worked for me , at first i only found v4l2convert.so in usr/lib/x_86_64-linux-gnu/libv4l wich is the 64 bit version , with the synaptic manager i install the 32 bit version wich lead me to usr/lib32/libv4l, and this worked for v4l1compat.so and v4l2convert.so, thank you very much.

    ReplyDelete
  7. Skype itself can be used for video calls, but this plugin is just to receive voice calls via Skype...Commenting should be related to the topic.
    Skype Technical Help

    ReplyDelete