In this Blog I'll explain how you can create your own state of the art media player with the awesome raspberry Pi. You will be able to watch movies, tv series and streaming content as well as listen to your cd collection and streaming content. I use the Raspberry Pi mainly to watch movies from a connected USB hard disk.
Main advantages of this media player above out of the box mediaplayers are (amongst others) the price, always having an up to date gui (latest version of XBMC), use one remote control of both your Raspberry Pi and your tv (if your tv supports CEC) and endless flexibility (such as choosing a skin, different distributionsof XBMC, etc).
What do you need?
You will need the following items: a Raspberry Pi with case - I bought mine at NewIT, a 4Gb SD card, a powered USB hub (with an adapter of at least 2 Ah) - like this one, a USB wireless ethernet adapter - like this one, a USB memory stick (or an 2,5 inch external USB hard disk), a USB to USB mini cable and finally an HDMI cable. You will also need a multi card reader connected to your pc (to read and write to the SD card), a USB keyboard (to make life a lot easier during configuration) and a tv with CEC. Make sure that all items work with the Raspberry Pi by checking this page.
Connect one of the USB port of the USB hub to the USB mini port of the Raspberry Pi to power it. Connect the USB memory stick (or USB hard disk) and the wireless ethernet adapter to the USB hub. Finally connect the HDMI cable to your tv.
I assume that you are using Windows in this blog. Slide the SD card in the multi card reader and do the following:
- install SD Formatter
- install Disk Imager
- download the latest stable version of OpenElec here (the .zip file) and unzip the .img file. At this time OpenElec 3.2.4 is the best and stable version.
- format the SD card with SD Formatter
- write the downloaded image of OpenElec to the SD card with Disk Imager
Remove the SD card from the multi card reader and slide it in the Raspberry Pi. Connect a USB keyboard to your Raspberry Pi and connect power to the USB hub to turn on the Raspberry Pi. If all goes well you will see the main screen of XBMC after about a minute.
Now configure the following things:
- set your wifi settings in System > OpenElec OS > Network. Use a static IP address to simplify reaching your Raspberry by SSH or FTP.
- turn on SSH and Samba in System > OpenElec OS > Services
- turn off "Show RSS news feeds" in System > Appearance > Skin
- set your language, region, etc in System > Appearance > International
- set "Adjust disply refresh rate match video" to "always" in System > Video > Playback
- set "Service for weather information" to None in System > Weather > General
Restart the Raspberry Pi and check if the date and time have been set correctly (since your Raspberry Pi can only obtain date and time settings from the internet this is a good check to see if you configured your wifi correctly).
Buy and install MPEG Codec
If you like to watch MPEG video's you'll need to buy the codec at the official Raspberry Pi store. Please note that it will take a day or so before the Codec will be sent to you. You will need to sent the serial code of your Raspberry Pi with the order. This is how you can get your serial code:
- Download the PuTTY executable and store it somewhere on your hard disk
- execute PuTTT
- enter the static IP Address of your Raspberry Pi and hit Open
- now enter the standard credentials (user: root, pw: openelec)
- follow these directions
After having received the Codec number do the following:
- use PuTTY to log on to your Raspberry Pi
now enter the following commands:
mount -o remount,rw /flash
- you are now in the somewhat Spartan but very well knwon Linux edit tool called vi. Press CTRL-G to go the bottom of the file you are editing and use the arrow keys to get to the beginning of the line that starts with: # decode_MPG2. Press the d key twice to remove the line. Go to the email with the license key in it. Copy the whole line with the key and return to PuTTY. Now press the i key, press the right mouse button and hit enter. Your license key has been copied in the file. Now press the ESC key and type :x to save and exit vi.
enter the following commands:
mount -o remount,ro /flash
Your Raspberry Pi will reboot and you are ready to enjoy your new media player! Browse through the tons of Add ons to get another skin, different scrapers or anything else you would like to use. I think XBMC is fairly intuitive in its usage so I won't bother giving you a full tutorial on using it. I'm sure these can be found in abundance on the web should you need it.
The only down side of this setup is the absence of an on/off switch. You need to power the HUB to turn on the Raspberry but this is about the only nuisance I have experienced so far.
Tips and Tricks
Since using the Raspberry Pi for a while I have learned a few things:
- I recomend to use simple skins because fancy skins slow down your Raspberry Pi significantly. Best experience can be achieved with the standard Confluence skin or the Quartz skin
- make a backup of your SD card once in a while to be able to restore your XBMC setup and your libraries. You can use Disk Imager to read an image from SD card and store it on your hard disk
- if you choose to overclock your Raspberry Pi (as I did), make sure that you use the correct settings. Using incompatible settings can lead to very strange behaviour. See this post for example