XBMC on Raspberry Pi with OpenElec


My old Kiss Dp-600 media player has been getting progressively less reliable, so for a little while I’ve been telling the kids that I’d replace it with a Raspberry Pi. Of course getting hold of one has proven far from simple.

Some time ago the prospect of using XBMC on the Raspi was confirmed, leading me to consider that this spells the end for media player devices (or at least a change in price point). Perhaps I should have done more pre work, but in the end I waited for the device to arrive before getting started. My first search immediately took me to OpenElec and a post about building for Raspi. I downloaded the sources and after some tool chain related hiccups[1] kicked of the build process on an Ubuntu VM. This turned out to be entirely unnecessary, as I was able to download a binary image[2].

The next step was to copy the image onto an SD card. This was fairly straightforward using the Windows Image Writer, which is the same tool used to write the standard Debian images for Raspi. In my case I couldn’t quite squeeze the image onto a handy 2GB SD card[3], but I had a larger card handy that seems to work fine.

I was now able to boot into XBMC and use the cheap MCE remote I’d bought on eBay a little while ago. After fiddling with some settings I’ve been able to get things so that everything plays ago (with sound). I’m using some mount commands in .config/autostart.sh[4] to connect to CIFS shares on my NAS for videos, music and photos:

#! /bin/sh
(sleep 30; \
mount -t cifs //nas_ip/video /storage/videos -o username=foo,password=S3cret; \
mount -t cifs //nas_ip/music /storage/music -o username=foo,password=S3cret; \
mount -t cifs //nas_ip/photo /storage/pictures -o username=foo,password=S3cret \
) &

Stuff that I’d still like to change:

  • SPDIF – The Raspi doesn’t have SPDIF out via its 3.5mm jack, so I have no way of piping digital audio to my AV receiver (sadly my TV doesn’t have a digital audio output). Maybe I’ll be able to use a cheap USB sound card to fix this.
  • Resolution – I’ve got things going pretty well at 720p, but I haven’t found a reliable way to get 1080p output. My TV might be partly to blame here. I bought a 37″ LCD about a year too early, and the best choice at the time was Sharp’s ‘PAL Perfect‘ screen. It has a resolution of 960×540, which makes downscaling of 720p and 1080p very simple.
  • Reboots – don’t seem to be reliable at all. I’ve not yet managed to get a clean restart after doing ‘reboot now’ from the command line. Even pulling power seems like a hit and miss affair. I can see this being a problem for the inevitable time that the system fails whilst I’m away for a week travelling[5].
  • Remote – when I first tested the MCE remote on a Windows laptop most of the buttons seemed to do sensible/expected stuff. On OpenElec/XBMC the key buttons (arrows, select and back) seem to work – along with the mouse, but many of the other buttons don’t seem to work at all.


Getting OpenElec going with the Raspberry Pi was pretty straightforward. It feels a little rough around the edges, but it’s early days. Even at this stage I’m reasonably confident that I can replace the DP-600. It’s also cool to be able to SSH into my media player knowing that it’s a tiny little computer running inside a business card box.


Update 1 (14 May 2012) – The reboot issue turned out to be SD card related. It seems that the Raspi is fussy about these things, and the PNY 8GB Class 4 card that I was using didn’t cut it. The 2GB SanDisk Extreme III that I’m now using seems much more reliable (and no slower).
Update 2 (14 May 2012) – I got XBMC Commander for my iPad. It’s worth every penny of the £2.49 that I spent on it as it totally transforms the user experience. Using a remote to navigate a large media library is a pain. Using a touch screen lets you zoom around it – recommended.
Update 3 (20 May 2012) – I’ve done a Pt.2 post.
Update 4 (31 May 2012) – binary image link updated to r11170.
Update 5 (3 Jun 2012) – binary image link changed from github to Dropbox.
Update 6 (4 Jun 2012) – Dependencies in [1] updated to add libxml-parser-perl as this has caused the build to fail when I’ve used fresh VPSes.
Update 7 (5 Jun 2012) – binary image link changed to a VPS.
Update 8 (26 Jan 2013) – binary image link changed to official_images, as most people should be using a release candidate rather than a dev build. Anybody wanting to upgrade an older build should get their binary from the OpenELEC.tv downloads page (Raspberry Pi is near the bottom) and follow the upgrade instructions.


[1] On first running ‘PROJECT=RPi ARCH=arm make’ I hit some dependency errors:

./scripts/image: 1: config/path: -dumpmachine: not found
make: *** [system] Error 127

This was fairly easily fixed by following the instructions for compiling from source, which in my case running Ubuntu 10.04 meant invoking:

sudo apt-get install g++ nasm flex bison gawk gperf autoconf \
automake m4 cvs libtool byacc texinfo gettext zlib1g-dev \
libncurses5-dev git-core build-essential xsltproc libexpat1-dev \

[2] Thank you marshcroft for your original image – much appreciated. Now replaced by a much newer build.
[3] Clearly some 2GB SD cards have a few more blocks than others.
[4] Thanks to this thread for showing the way.
[5] There have been times that I’ve suspected the old DP-600 of subscribing to my TripIt feed – failure seemed to be always timed to the first days of a long business trip.

22 Responses to “XBMC on Raspberry Pi with OpenElec”

  1. 1 Chris

    Is the link in your text to Eden oder Dharma Binary? Thank you for the how-to. :-)

  2. 3 Chris

    Sounds great. Please Upload it soon. ;-) I think many people are interested in actually binaries.

    • I don’t have time for a detailed follow up post right now, but if you know what you’re doing with them here are the kernel.img and system files for r10979 that I compiled yesterday.

  3. 5 Mark Cox

    Thanks for the images, they work great. Not managed to stream any WMV xvid/divx files yet, but everything else works perfectly.

  4. 7 Christine

    For the remote part, check this out: http://aron.ws/projects/lirc_rpi/

  5. 8 Stephen

    Thanks for all the OpenELEC images that you are hosting, I must be spending at least 5 hours a day compiling the source. I am now waiting on a second Rpi to create a very low power consumption media server. I have found that if you turn off the rss feed in OpenELEC you lower the cpu load a little.

    • I’ve seen comments from others in the Raspberry Pi forums about RSS consuming CPU. Since I’ve not been seeing any issues that I’d attribute to CPU overload I’ve not bothered, but it might make the app more responsive.

  6. 10 Tom

    As for the sound you need a proper surround reciever. I’m streaming 1080p content with DTS sound from a linux server via NFS without a hitch with OpenElecs latest nightly build.

    • You’re not the first to point out that if I got a modern receiver with HDMI then I wouldn’t have to worry about the lack of SPDIF.

  7. I’ve been considering what it would take to have media in the cloud to serve to smaller devices, and from everything I have read, you should have a fantastically helpful perspective on this.

    Considering a solution where there’s no home server, and access to media from the ipad (ubiquitous), raspberry pi (becoming ubiquitous), and laptops. Basically roll-your-own-netflix.

    Are costs low enough to make this something to even consider?

    WIth something like sabnzb, sickbeard, plexmediaserver, myplex (with library sharing), and plexbmc; the software is already here..

    Obviously this means rethinking the process, but it sounds reasonable to give up 1080p in most scenarios in order to stop worrying about hardware, reboots, backups, or even a home internet outage..

    • The economics for a private service from the cloud just don’t work out. 3TB of storage for my home network costs $225, which wouldn’t get me 20 days for the same quantity of data on Amazon S3.

      Bandwidth is problematic too. I often say that the cloud works despite the network rather than because of it. My ADSL connection at home gives me 4.5Mb/s, which isn’t enough to sustain an HD stream.

      The Netflix model works because it basically operates as a public utility (and if you delve into the details of how content is presented to the edge there is extensive use of a telco utility infrastructure).

      • I had thought it might be close, but at that price point, it’s definitely not something to consider yet.

        Even using plexmediaserver, and streaming for, say, 3 hours a week at 364kbit/s to alleviate from bandwidth and minimize cpu time, the storage would still be a cost that puts this out of the reasonable realm.

        Maybe a couple more years :)

  8. 15 sebus

    Chris, will you have a go at pulseaudio?




    • I’ve been keeping an eye on this stuff, as I would like to somehow get SPDIF into my (slightly aged) AV receiver, but to be honest I’ve been waiting for somebody else to declare success before committing funds and time to it. After seeing the post yesterday I did start thinking that this might be something where I should take a swing at it for myself.

  9. 17 sebus

    Nice one, still it is only for music (as video does not have splitter, but that might also be possible, for now it is HDMI with optical out matrix)


  10. 18 sebus

    Would you build version with full bluetooth support (or are later version with it?)


    I have:

    Bus 001 Device 009: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

    but no bt-adapter to work with


    • I’ve got no plans to customise what my build bot puts out, as I think there’s a need for regular vanilla builds from the OpenELEC git (and images based on those). If I end up putting in some patches for my own use then I’ll stand up something else to share that work.

      If you want to try putting patches in for yourself then I’d suggest following my howto that describes how you can put together your own build bot in the cloud.

  11. 20 sebus

    Thanks, makes sense


  12. 21 JD

    Hi Chris. Is there a changelog somewhere on your site to describe the updates/changes in each of your compiled openelec images?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: