Skype: Video

From OLPC
Revision as of 21:56, 10 January 2008 by Patrick.surry (talk | contribs)
Jump to: navigation, search

These instructions outline what I did to get video chat working after installing Skype (Public Beta 2.0.0.27).

I haven't used it extensively but did get a video chat working between an XO and a Mac, although part way through I lost sound - maybe something to do with bandwidth or CPU? If so maybe we could dial down the framerate or something? Hopefully others who know more about all this stuff can contribute their thoughts. (My head is only barely above water at this point given my very limited knowledge of linux, skype, gstreamer, etc.)

Based on a suggestion in one of the OLPC forums, I found some code called 'gstfakevideo' (aka skype video hijacker) which uses the open source gstreamer framework (coincidentally the XO's multimedia platform) to stream an arbitrary video source into Skype.

Installation

The basic recipe is:

  • Install Skype
  • Obtain a compiled version of the gstfakevideo package for the OLPC (you need a script called gstfakevideo and a library called libgstfakevideo.so; see below to build your own)
  • Open a terminal window
  • Move /dev/video0 out of the way, e.g. (as root):
 su
 mv /dev/video0 /dev/video1
  • Edit the gstfakevideo script (e.g. vi gstfakevideo) and change the video pipeline by editing the 'export GST_PIPE=...' line to:
 export GST_PIPE="v4l2src device=/dev/video1 | ffmpegcolorspace | videoscale"
  • Make sure 'skype' is on your path
  • Run the gstfakevideo script :
 ./gstfakevideo
  • This launches skype normally (after forcing skype to first load the libgstfakevideo.so library which uses the GST_PIPE setting to provide a fake skype-compatible video source at /dev/video0)

At this point you should be able to use skype as normal, but video options are enabled, e.g. click the tiny camera icon once you start a chat to share your video, or modify the video preferences to start video automatically within calls (see Skype Video forum).

Comments

I'm not sure if you need to move /dev/video0 every time you boot the machine (probably?). It seems to be a requirement because the gstfakevideo library can only fake /dev/video0 (so you can't have your 'real' video source there). There is a setting in gstfakevideo to tell it what fake video device to provide but the doc says it doesn't work (I haven't actually tried).

A cleaner setup would probably be to install the gstfakevideo stuff alongside the skype install, and alias 'skype' to kick off the video stuff. But I haven't done that yet. It would also be good to sugarize the whole thing so you could kick off your video skype session from the toolbar. I might have a go at that if no one beats me to it.

Building gstfakevideo

I built the gstfakevideo library in a qemu image, since it required a bunch of dependencies that I didn't want to put on my XO:

 yum install subversion
 yum install make
 yum install gcc
 yum install gstreamer-devel

(and probably some others I forgot). Then I did:

 svn checkout http://gstfakevideo.googlecode.com/svn/trunk/ gstfakevideo
 cd gstfakevideo
 make

All this work simply creates the library libgstfakevideo.so which is only 14K in size - I would happily post this somewhere if there is somewhere sensible to put it, or can provide by email. In my case I just copied the library on a USB stick onto the XO.