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 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.
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, 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 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.
- 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.
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  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.
 On first running ‘PROJECT=RPi ARCH=arm make’ I hit some dependency errors:
./scripts/image ./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 \ libxml-parser-perl
 Thank you marshcroft for your original image – much appreciated. Now replaced by a much newer build.
 Clearly some 2GB SD cards have a few more blocks than others.
 Thanks to this thread for showing the way.
 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.
Filed under: howto, media, Raspberry Pi | 22 Comments
Tags: .config, 1080p, 720p, autostart.sh, cifs, mce, Media Player, mount, NAS, openelec, Raspberry Pi, Raspi, reboot, remote, resolution, restart, spdif, Synology, XBMC