Official website for Linux User & Developer

Raspberry Pi Media Centre Tutorial

by Rob Zwetsloot

Build your very own media centre out of a Raspberry Pi to save on space and money using XBMC

One of the great things about the Raspberry Pi is that it not only has plenty of power to play back high definition video, but it also has the HDMI output to allow you to do so. This would naturally lead the media enthusiasts among you to think of the possibilities for using the RasPi as a media centre, but the list of advantages don’t stop there. It has network support to stream video, has a ridiculously small form factor so you can tuck it out the way, and of course the low price doesn’t hurt.

The potential for the Raspberry Pi’s use as a media centre hasn’t gone unnoticed by the community, and thanks to its open-source nature, there are two great options to get XBMC working on your RasPi. RaspBMC is a Debian Remix that’s simple to install, and OpenELEC is a bit more challenging, however it works just that little bit better. Both of these solutions run as well as any other Home Theatre PC, with high definition video playback, and generally smooth menu navigation. In this guide we’ll show you how to make the most out of a RasPi HTPC.


OpenELEC Raspberry Pi HTPC XBMC
RaspBMC is the easiest and quickest way to get started

Step 1 Download RaspBMC

RaspBMC comes with its own installer, which you can download by using wget in the terminal:

$ wget

This downloads the file that will install RaspBMC to an SD card

Step 2 Prepare RaspBMC

To install RaspBMC, you’ll need to first change the persmissions on the install file like so:

$ chmod +x

Then make sure you have the right SD card in your system, and that any important files on it are backed up

Step 3 Install RaspBMC

Now you can install with:

$ sudo python

And follow the instructions to install on your SD card. It will usually be listed as something like sdb, and have a 4 GB/4000 MB capacity

Step 4 Set-up RaspBMC

You’ll now need to plug the SD card into your RasPi, then plug it into a display and turn it on. Make sure it’s also connected to the internet, as it will then download and update all the necessary files to get it working

Step 5 Video Out

The Raspberry Pi has an extra video out port, the yellow composite port. You plug that in and it will automatically recognise it. You can also change the resolution and refresh rate in Settings, System Settings, Video Output

Step 6 Headphone Out

If you’re using the video out port and not HDMI, then you’ll need to use the headphone jack to output the audio. You can get a cable to hook this up to a TV, but you’ll also need to go to Settings,System Settings, Audio Output, and change it to Analogue

Step 7 USB Storage

There are two main ways to watch your media – either stream it over the network, or by attaching USB storage with it on. Be aware though, there are limited USB ports on the RasPi, and if you connect a USB hub it will need to be powered!

Step 8 Video Source

Connected and Networked storage can be added as sources to XBMC. Go to Videos on the main menu, then Add Videos. For connected devices and some network shares, you can go to Browse, and select it. You’ll be then asked where to get metadata from to finish.

Step 9 Add Network Source

Sometimes XBMC might not see your network share, but you can still add it. Your shares are more than likely down via samba, especially if you have Windows computers in the house. The file path you need to add before you hit browse will look something like this:



Raspberry Pi XBMC RaspBMC HTPC
OpenELEC is a more advanced way of creating a HTPC

Step 10 Get OpenELEC

Alternatively you can use OpenELEC on your RasPi to get XBMC on there. We need to grab the source for OpenELEC like so:

$ git clone git://

We can use the source files to build any version of OpenELEC, obviously we want it for RasPi

Step 11 Prepare your system

When building, it should grab all the required packages. It cannot do this on all distros all the time though, and may print a list of packages you require. In Ubuntu, you’ll need:

$ 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 autopoint

Step 12 Configure Perl

You may need to configure Perl on your system. All you need to do is open the terminal and run the following commands:

$ sudo perl -e shell -MCPAN

Run through the automatic setup by typing yes, then pressing return at each step, then:

install XML::Parser

Now we can move on to the actual build

Step 13 Build OpenELEC

Move into the OpenELEC TV directory by using CD:

$ cd

This is what you’ve just downloaded. Now you can start building it by running this:

$ PROJECT=RPi ARCH=arm make

It’s case sensitive, so be exact.

Step 14 Partition the SD Card

To partition, install GParted with:

sudo apt-get install gparted

Then use it to create two partitions on the target SD card. Create a 128 MB FAT32 partition at the beginning, and fill up the empty space remaining with an EXT2 partition. Apply changes, and then right click on the 128 MB partition, and add a boot flag to it.

Step 15 Install OpenELEC

Mount your SD card, which can normally be done by unplugging and pluggin it back in. We’ve named our 128 MB partition System, so it’s mounted as /media/SYSTEM. Make sure you’re in the folder like before and do the following:

$ sudo cp build.OpenELEC-RPi.arm-devel/bcm2835-bootloader-*/arm128_start.elf /media/SYSTEM/start.elf
$ sudo cp build.OpenELEC-RPi.arm-devel/bcm2835-bootloader-*/bootcode.bin /media/SYSTEM/
$ sudo cp build.OpenELEC-RPi.arm-devel/bcm2835-bootloader-*/loader.bin /media/SYSTEM/

$ sudo cp target/OpenELEC-RPi.arm-devel-*.system /media/SYSTEM/SYSTEM
$ sudo cp target/OpenELEC-RPi.arm-devel-*.kernel /media/SYSTEM/kernel.img

$ echo “boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 ssh quiet” | sudo tee /media/SYSTEM/cmdline.txt

This will get the necessary files moved to the boot partition we created. Once this is done, plug in your RasPi, networking and all, and it will boot straight into XBMC after a few seconds ready to go

Advanced Uses

OpenElec Raspberry Pi XBMC HTPC Media Centre
Time to look at some more advanced options

Step 16 Nightly Build

It’s not recommended, but in RaspBMC you can switch to a nightly build of XBMC. This means you can play Hi10 video files, common in more recent high definition encodes. It is unstable though, so use with caution!

Step 17 Command Line

If you fancy doing a bit more advanced customisation of your setup, you can always enter the command line by plugging in a keyboard at boot time and using Ctrl+Alt+F2 to enter the command line. You can then use Ctrl+Alt+F7 to return to XBMC

Step 18 Remote Control

There are some specific remotes that will work with XBMC out of the box, these include:

XBOX DVD playback remote
ATI/X10 remote
CyberLink 0766:0204
MCE remote
Hama remote

You’ll need to have the receivers plugged into the USB port before you turn the RasPi on for it to be automatically recognised.

Step 19 Input Settings

There are various Input Settings you can play about with under System in the Settings menu. If you’re having problems with your remote, you can always set it to register as keyboard presses, and you can optimise the UI for mouse or touch screen use

Step 20 Remote App

If you’ve got an Android device, you don’t need to buy a separate remote for your new HTPC – there’s plenty of XBMC control apps on the Google Play store, even an official one. These will automatically connect to an XBMC HTPC on the same network

Step 21 Manual Remote App

You may need to add your RasPi manually to the remote. To find the IP you’ll need, go to System, System Info, Network. Here you’ll find the IP address, for example In add new host on the mobile app, add this. The Username and Password is by default xbmc

Step 22 Remote Web

Under Settings, Services, you can turn on a web server to control XBMC from any web browser on the same network. Enable “Allow control of XBMC via HTTP”, and note the port number, e.g. 80. Finding the IP address like above, go to in your browser to access it

Step 23 Power Concerns

As the Raspberry Pi is USB powered, you might consider plugging it into your TV if it has a USB port. This will provide enough power for it to run, and as you need to disconnect the power to fully turn off the RasPi, turning off the TV does that for you.

Step 24 RasPi HTPC

There’s plenty of other little tweaks you can do in the settings to have it set up to your taste, and you may also want to look into cases to house the RasPi in your living room. For the price and size though, you won’t find a better HTPC.

Related Raspberry Pi articles

  • Tell a Friend
  • Follow our Twitter to find out about all the latest Linux news, reviews, previews, interviews, features and a whole more.
    • Many of us get the $12 a day insurance premium when renting a car.

      Furthermore, state laws require that delivery drivers carry commercial
      car insurance coverage in addition to their regular car insurance.
      There are many different factors that come into play when determining car insurance rates.

    • What are the verified medical emergencies that can be covered under pre-existing medical conditions.
      If the federal government would place more effort into the prevention of wasting health care funds,
      then there is hope for all of us to receive better health care services
      without paying top-dollar. Continuing education schools will also let the agent know if you need a monitor present
      or your exam is open book.

    • Before buying health insurance, take time to calculate all of the potential costs involved.
      In addition to finding agents and brokers who have developed expertise specifically in Tennessee Health Insurance,
      you’ll also need to look for independent agents. Its also worth checking out your spouse’s health care options.

    • Such a plan would cover you and your family in the event there is a waiting period that your new employer
      requires before you can be added to their group plan.
      The majority of health plans might be difficult to find after an individual gets sick or possibly is already admitted in a hospital, so applying for insurance
      plan should be accomplished while you’re in pretty great health. As per a recent study by Accenture, out of 30 surveyed US states, 18 states consider that it is too early for states to talk to payers on structural and integration concerns, despite the looming January 1, 2013 deadline for submitting exchange model plans to the federal government for approval.

    • She had reached the serene point of patient acceptance,
      but all of us were suffering some heartbreak over why this vibrant
      young woman couldn’t shake this horrible disease off. For the exact numbers, you may want to consult a tax expert, but the numbers I’m seeing indicate that the fine
      for not buying health insurance in the first year or two, is under $1,000,
      then escalates to about $2,000 by the third year.
      They will be given the same treatment from day one till they leave, this will ensure a
      safety and guarantee for the patient and will help in healing them

    • In this way you will avoid a lengthy-term negative effect
      on your site visitors and sales. La – Michael is currently averaging over 7 yards per carry and was the Pac-10’s freshman of the year in 2009. One of the worst things you can do is to scrape content from others.

    • however the domain lacks keywords which can hurt the rank of the.
      Whether it is business, for the purpose of popularity, outsourcing, the aims of internet marketing is to place you on
      the top and always keep your competitor down. This is the agency SEO software task you can fully outsource to
      SEO tools and be certain that the software will do
      it even better than you.

    • If you have an auto policy with a $500 deductible,
      you will be liable for the first $500 of damage to your rental car as well.
      Insurance provides the essential financial cover for your vehicle so that it remains protected and your money is not
      wasted on its maintenance in the event of accidents, third
      party liabilities or natural calamities. That’s exactly why online insurance is gaining popularity.

    • If a smaller insurer has attractive rates, that does not mean you
      should shy away from them however, but be sure you do your homework on
      that insurer. To get good financial quotes, you need to consider
      basic information such as age, gender, driving record, marital status, occupation, residential area and
      so on. In case your car insurance fees are merely a tiny proportion of the service cost, it may be advantageous to
      claim from the insurance company.

    • Thanks a lot for sharing this with all of us you really know
      what you are speaking approximately! Bookmarked.
      Kindly also consult with my website =). We could have a link alternate arrangement
      among us

    • The last factor, but not least is the analysis of visitor activities.
      This is when search engines will give good evaluation to
      the content, as well. When Google Panda and Penguin updated were implemented the SEO world was shaken
      off tremendously.

    • It is uncommon that a individual will search about five hundred pages and then click on the link of your
      web site there. Search engine optimization is primarily
      used to increase rankings in SERPs, and effective SEO can increase the potential of your website and
      bring in more traffic. Above is an example of a You – Tube video
      we put together for a client, Tours – Key – West.

    • With artificial intelligence (there is no real intelligence –
      it just does what it is taught to do) comes voice recognition software.

      ➢ Preparation of Anchor Keywords linking on the pages.
      This can help a person on picking out precisely what keywords and phrases to make use of,
      and what more to stay away from.

    • Thanks for sharing your thoughts. I really appreciate your efforts and I am waiting
      for your further write ups thanks once again.

    • What’s up mates, how is the whole thing, and what you would like to say about this piece of writing, in my view its truly remarkable for me.

    • More than likely, you would type a simple keyword phrase
      that is clear and concise. Checking your websites back links is always
      essential if you are managing a website or doing SEO.
      To solve this problem, you can hire a SEO company to help you.

    • Hello there! This is my 1st comment here so I just wanted to give a quick shout out and tell you
      I really enjoy reading your blog posts. Can you suggest any other blogs/websites/forums that go over the same subjects?
      Appreciate it!

    • Pingback: Google()

    • Pingback: Raspberry Jam: So good we’re going to *preserve* it in our calendar | Farset Labs()

    • Pingback: Can I Cancel My Car Insurance Before It Starts | Johnstones Car Insurance()