XBMC Frodo Buildroot for Raspberry Pi
August 31, 2014
I’ve recently upgraded my dodgy Samsung DLNA + minidlna setup to XBMC. XBMC is a media center, and IMHO it’s the best one.
It’s pretty obvious also from the number of Raspbery Pi XBMC kits on the internet, that the Raspbery Pi is a popular option given the price and low power consumption.
I’ve recently started using XBMC daily on a Raspberry Pi, and I’m pretty happy with the performance. As most people working with the Pi know, capacity constraints are everywhere. I can happily say that despite the considerable constraints on the Pi, I’ve got it running quite nicely. Here’s a few things I did that made a significant performance improvement.
Cut down OS
Rather than running one of the more popular distros, like Rasbmc, or OpenELEC, I’ve set up a simple Buildroot based on this repo and have updated/cleaned up the XBMC packages to install XBMC Frodo. Not having any superfluous daemons or other software running in the background allows XBMC to take advantage of all of the hardware available on the Pi.
You can take a look at my repo, including required packages and configs, here.
I’m running my Pi using the following overclocking settings in config.txt
Compile with optimisations
The buildroot I’ve linked earlier in this post already is configured to do this, but optimising compiled code specifically for the Pi’s CPU seems to give a little performance boost. It’s free, so why not.
The flags (CFLAGS & CXXFLAGS) I use are
-pipe -mhard-float -march=armv6 -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -ffast-math -O3
Running with the inbuilt SQLite library is very hard on the Pi I’ve found, so migrating to MySQL shared library on another machine really helped to speed up the menu responsiveness. It’s also let me do library updates from my file server using a headless install of XBMC, as the XBMC on the fileserver and the Pi shared the same media database.
Instructions are here. Basically you need to set up MySQL on another system, and configure your advancedsettings.xml as such:
Restrict your GUI quality
You can limit the quality of your GUI to 720p without effecting playback quality of 1080p videos. I’ve found this also really helps the responsiveness of the GUI. In your guisettings.xml, put:
Disable actor thumbnails
XBMC can download photos of all of the actors in a specific TV show or movie. I never, ever use this, and it slows down the menus and scanning process, so I disable it. In your guisettings.xml:
Don’t scan for media on the Pi
The is the thing that makes the most difference, in my opinion. Especially if you have a large library. Scanning your media across NFS/CIFS or even a USB hard drive is really slow on the Pi, and bogs down the GUI really heavily (remember, single core CPU). If you’ve got the MySQL library option set up, and you media is accessible via the same path on your file server and Pi (hint: use NFS and mount your videos under the same folder structure that exists on your file server) you can run XBMC on your file server and do the scanning there. If you don’t have a GUI on your file server, you can run it headless using something like this (reasonably complicated to set up).