Working with the XO – Audio and Video

December 14, 2008 at 12:56 | Posted in Tech | Comments Off on Working with the XO – Audio and Video
Tags: , , , , , ,

This is the first in an ongoing series of post on “Working with the XO”. By “Working with the XO” I am referring to working with it in it’s native state. I’ll have other series of extending or hacking the XO. This series is for people that Love the XO for what it is and want to keep it as close to a pure XO as possible.

Today I’ll be discussing Media (audio/video) on the XO. Many people that get the XO find that it can not play many formats “out of the box”. This is more a choice by OLPC then a hardware limitation. But there is good thinking behind the choice. Most Video/Audio codecs (compressors/decompressors) are patented and OLPC would have to pay royalties to include them. The XO does however support free, open source codecs. Those being Vorbis for sound and Theora for video and the OGG/OGV container formats. Sadly these are not the standard on the Internet (yet?!?, well I can hope). It is however quite easy to convert other formats to These free standards. The tool I have been using, which is available for both Windows and Linux is OggConvert. It is fast and simple to use. There are other programs that can do the converting but OggConvert is a good place to start.

Now that you can get the Media into a format that the XO understands it’s time to talk about the hardware limitations. Remember the XO only runs at 433 Mhz, so you aren’t going to be able to see a full frame rate 720p video on it. I got into the whole computer/multimedia thing back when I had a 500 Mhz machine with a TV card in it. So I’m kinda used to the restrictions. Basically you’ll want to drop the video resolution and frame rate. 320×240 ish (for 4:3 video) and a frame rate around 15 frames per second will play nicely. I have a script running on my main laptop that pulls down the local news from a website, and ever since I received the XO I have been happily watching the news on my XO at night. (sitting the XO on my chest while I’m laying in bed is great for watching the evening news.)

If you have a video that you need to down convert (drop the resolution/framerate on) I’d strongly suggest AviDemux. It’s free it works on Windows and Linux and it is easy to use. Sadly AviDemux doesn’t support Theora Video as an output choice so you’d still need to run the output from it through OggConvert. If you are using Linux and are comfortable dealing with scripts you can use VLC and a script. I can’t get the VLC command to stay all on one line here but the command to use in the script would look like:

vlc -vv “$1″ –sout ‘#transcode{ height=320,width=240,fps=15,vcodec=theo,vb=800,scale=1,acodec=vorb,ab=128,channels=2} :duplicate{dst=std{access=file,mux=ogg,dst=”XO_Vid.ogv”}}’

With the above all being on a single line. This will resize the video to 320×240. Drop the frame rate to 15fps, and convert it into Theora/vorbis/ogg format for the XO. The “$1” should be replaced with the name of the file to convert. I left it as “$1” so you could just drop the line into a shell script that took the name of the file to convert as the first argument. (N.b. this is the Linux version of the command, the Windows version may differ slightly I haven’t had time to look into that yet)

once you have your .ogg (sound) and/or .ogv files ready. Move them to an SD card or Thumbdrive and plug it into the XO. The XO will recognize the files, and play them in the browse activity by default. This works well enough, but if you want a slightly more media player looking interface you can go into the Terminal activity and type:

totem <name of file>

so something like

totem /media/disk/XO_Vid.ogv

I hope this helps people get started using their XO for media.

Questions and comments are welcome.


Create a free website or blog at
Entries and comments feeds.

%d bloggers like this: