It has been over two years since my original Raspberry Pi XBMC (nowadays referred to as Kodi) tutorial was published and this article has had over one million page views to date.
Now, it is time to revisit the whole guide with exciting new insights on how to build and set up a low-cost entertainment center using the latest Raspberry Pi model B+.
Raspberry Pi can replace your HTPC, but it will require a lot of configuration and testing.
Raspberry Pi is an amazing little computer that can be used as a complete XBMC (Kodi) entertainment center solution with the right software and accessories.
While just a bit slower than the Apple TV 2, it can provide output in 1080p high definition video, all for less than $40.
In this complete and up-to-date tutorial, you will learn
To complete this tutorial, you will need to buy the following components
The total price for the computer is about $88, plus $23 for the remote control (Flirc), for a total of $111. However, you may have most of the required accessories at home already.
You can also unlock MPEG-2 and VC-1 decoding by purchasing a license from the foundation’s online store.
The Raspberry Pi is a tiny computer that plugs into your TV with an HDMI cable.
It decodes 1080p H.264 HD video smoothly, and the XBMC user interface is quite responsive as long as you use a light weight skin.
The latest Raspberry Pi model is the B+ version.
Here are the highlights you need to know about this new model:
Nowadays, there are a lot of commercial cases to choose from that you can buy online.
Alternatively, you can build a case yourself.
For example, in the time it took for the official case that I ordered to arrive couple years ago, I built a case from LEGO bricks with my kids.
Building your own case can add more fun to this project, so I’d recommend you try this as well. If you build a case from LEGOs, just remember that the base size is 13 bricks by 9 bricks.
Please note that many users report issues with various memory cards, so make sure to get a supported SD card. When I got my first Raspberry Pi model B, I tested 3 cards before I found one that works properly with Raspbmc.
You can get a standard micro SD card with many model B+ bundles, but they may be low quality and do not necessarily last very long.
If you want to increase the longevity of the memory card, I recommend getting a separate micro SD card that comes with wear levelling. Only the more expensive micro SD cards come with wear levelling, which means that the card will try to spread wear out over the whole disk instead of writing and reading the same spot on the disk all the time.
I would also recommend getting a card with at least 8GB storage as more space increases the longevity of the card by having more space for wear levelling.
One good card that supports wear levelling is the SanDisk Extreme Pro 8GB MicroSDHC. However, I found that it is not actually the fastest option while Samsung’s memory card delivered even better performance in the real life usage scenarios.
You can also use a USB memory stick as the Raspbmc will run very well when running the XBMC off the USB stick. Please do not use a slow USB stick, but get a fast USB 3.0 such as Transcend Jetflash 700 or Kingston DT R3.0. Even when the RPi has only USB 2.0, using a USB 3.0 stick with 2.0 sockets will give much better read times.
In order to see how big difference there is between memory cards, I tested them using some common usage scenarios.
The following storage drives were tested:
|Booting up||32.0 sec||39.4 sec||32.7 sec||31.5 sec|
|Importing movies||82 sec||268 sec||126 sec||90 sec|
|Opening library||1.7 sec||1.8 sec||1.8 sec||1.9 sec|
|YouTube search||22 sec||54 sec||20 sec||28 sec|
As you can see from the results, the class of the micro SD card does not necessarily mean it will be faster as the random read/write speeds are even more important. Therefore, I would recommend getting Samsung’s class 6 micro SD card that is often sold together with the NOOBS operating system install manager.
However, if you want to make sure that your micro SD card will last longer without any issues, SanDisk Extreme Pro 8GB is a good choice.
The RasPi does not come with a power adapter, so you will also need to get a supported power adapter. Be sure to get a good quality power adapter as those cheap power adapters that come together with many Raspberry Pi bundles may not work properly.
For example, I had problems with a Flirc remote companion adapter when using a cheap power adapter. I got erratic key presses with the Flirc when using a power adapter that came together with the Raspberry Pi model B+ bundle. When I plugged the RPi to my TV’s USB slot or used my iPad’s power supply, problems were resolved.
If your television supports HDMI CEC, I recommend using it as that is the easiest way to control your Raspberry Pi. You can use your TV’s remote to control XBMC by sending signals over the HDMI cable. Usually, HDMI CEC works without further configuration.
If your television does not support HDMI CEC, then the most cost efficient and working solution is the Flirc (get it here). Flirc learns any remote control so you can use your old IR remote control and map it with the Flirc using a configuration application on Windows and Mac OSX.
You can follow this Flirc guide to map the keys with the configuration application. You can then plug the Flirc into Raspberry Pi and start controlling the XBMC.
Building your own system is very easy and by following these four simple steps, you will have the system ready to be booted up with an operating system in less than 30 minutes.
|First open the case and insert the board inside the case.
Please note that you will need to use a bit force to mount
the board inside the case.
|Insert the micro SD card to the slot under the case.
Please follow the instructions in the next chapter to
install an operating system.
|Insert the case cover back in place.|
|Insert HDMI, Ethernet and micro USB cables in place.
Plug in Flirc adapter, keyboard or any other controllers.
The latest XBMC v13 Gotham brings speed improvements to Raspberry Pi users. As stated earlier, XBMC will be called Kodi as of v14 Helix onwards. With the latest release, navigating menus, starting playback and browsing through libraries is much faster than before, so if you have not already updated your Raspberry Pi, now it is a good time.
In this chapter, you will learn which operating system you should choose and how to install it.
I tested three operating system alternatives from performance and stability point of view: OpenELEC, Raspbmc and Xbian. They all use XBMC (Kodi) as an entertainment center, but the Linux distribution in the background is slightly different in each of these alternatives.
Before going through the installation instructions, let’s have a look how these three operating systems performed in real life usage. Please note that these results are based on my experiments and your mileage may vary.
I compared these three alternatives on four different usage scenarios using the Samsung 8 GB micro SD card with each operating system.
|Booting up||39.7 sec||38.8 sec||61.1 sec|
|Importing movies||121 sec||82 sec||N/A|
|Opening library||1.8 sec||1.7 sec||N/A|
|YouTube search||29 sec||22 sec||48 sec|
The results show that OpenELEC and Raspbmc had quite similar performance while Xbian was considerable slower on booting up and YouTube searching. For some reason, I was not able to import movies to the media library on Xbian, so I was not able to test navigation speeds with fan arts.
All in all, both OpenELEC and Raspbmc are good choices for you, but I would recommend opting for Raspbmc as it is easier to configure, if you, for example, want to overclock it later on.
The easiest way to install an operating system is to use NOOBS (New Out Of the Box Software), which is an easy operating system install manager for the Raspberry Pi.
You can either purchase a pre-installed NOOBS micro SD card from an online store or download and install it yourself.
Buy a preinstalled microSD card
You can buy a micro SD card with NOOBS preinstalled, for example from Amazon.com.
Your RPi will boot automatically into NOOBS after booting up the system for the first time with the card inside. The NOOBS installation manager should display a list of operating systems that you can choose to install.
Or download and install NOOBS to microSD card yourself
If you already have a micro SD card (8GB recommended), then you can download NOOBS for free and install it on your card.
Follow these step by step instructions on how to create a NOOBS card.
Install operating system with NOOBS
Now, insert micro SD card with NOOBS to RPi, connect cables, keyboard and mouse and boot up the system.
Please note that you will need to plug in your keyboard and mouse before installing NOOBS as you will need to use a mouse to install the operating system on the RPi.
|After booting up your Raspberry Pi, a window will appear
with a list of operating systems that you can install.
Select either OpenELEC or Raspbmc and click on Install.
You can also install them both if you want to try them first.
|Confirm to overwrite all the data on the micro SD card.|
|OpenELEC and/or Raspbmc will run through its
installation process, which will take a while.
|When the install process has completed, the system will
reboot and you can choose the installed operating system
to be launched.
The Raspbmc distribution is created and maintained by Sam Nazarko and you can download the latest version here. I will use the Windows installer in this tutorial.
Before launching the application, plug-in the SD card reader and unplug any other USB storage devices to make sure you will not format an incorrect drive by accident.
Now, launch the Raspbmc installer application and select the SD card reader from the devices list.
After clicking the “Install” button, it will take less than a minute while the installer downloads and restores the image to the SD card.
After plugging in the memory card, USB stick, USB keyboard or remote control, Ethernet cable and power adapter, the computer will boot up and the installer program will run for about 15-20 minutes.
The Raspbmc will boot up the computer once the installer script is ready.
Congratulations, now you have XBMC (Kodi) ready to use.
I also tested Xbian, which is not included in the NOOBS to see how its performance compares with OpenELEC and Raspbmc.
You can download the Xbian here.
Now, launch the Xbian installer and install the Xbian to the selected drive.
Once the installer has downloaded and copied the image to the card, insert the micro SD card to the RPi and boot up the system to complete the installation process.
As mentioned earlier in this article, I was not too impressed with Xbian’s performance in the real life usage scenarios, so for the time being I would stick with either OpenELEC or Raspbmc.
I run a series of performance improvement tricks to see how they could improve the performance. By following these tricks, you can speed up the system 20-40 percentage compared to the original baseline.
|Booting up||32.0 sec||27.8 sec|
|Importing movies||82 sec||80 sec|
|Opening library||1.7 sec||1.4 sec|
|YouTube search||22 sec||15 sec|
You can safely speed up the RPi by overclocking it. Go to “Programs > Raspbmc Settings > System Configuration.
Next, change the “System Performance Profile” to Super to overclock the system. At least for me, the “Super mode” works reliably when running the Raspbmc.
Overclocking did not have as high of an impact as I was hoping for, but booting up time improved over 20 percent. However, movie library importing, navigation speed and YouTube searching remained on the same level.
Please note that many SD cards are unsupported by the Raspberry Pi, so be sure to get one that is on the list of supported cards such as Samsung’s Rapsberry Pi optimized micro SD memory card.
As seen at the beginning of this article, different memory cards have significant differences in their performance and high-class cards do not necessarily perform better compared to the lower class cards.
Reducing the XBMC user interface resolution to in Settings > System > Video will save memory it will make the system and menus a bit faster. Video will still play at full resolution (e.g. 1080p).
Go to “Settings > System > Video Output > Resolution” to change the resolution.
I noticed about 20 percentage improvement in the navigation menu speeds, so if you do not need 1080p resolution in the menus, this change will make your system feel snappier.
Confluence skin works fine, but you can improve the responsiveness of the system by using even more lightweight skin.
Amber skin is beautiful yet responsive skin and it was over 40 percent faster on YouTube searching and about 5 percent faster on navigation menu speeds. However, the booting up time was much slower compared to the Confluence skin.
Both SiO2 and Quartz skins delivered about the same results, so it is really about which interface you prefer. Navigation menu speeds and YouTube searching were about 20 percent faster compared to the Confluence skin. Booting up times were about the same as with Confluence skin.
By default, XBMC will extract thumbnails from videos that have no thumbnail in the library. As this consumes quite a lot of CPU performance, you should disable this feature to speed up navigation in the library.
Go to Settings menu and select Video > File lists > disable “Extract thumbnail and video information”.
You may also want to disable Actor thumbnails from the Settings > Video > Library > Download actor thumbnails when adding to library.
I would recommend adjusting display refresh rate to match video in order to get smoother video playback.
You can enable it by going to System > Video > Playback > Adjust display refresh rate to match video.
I have not tested this tip myself, but using audio passthrough should lower the CPU usage for DTS and AC3.
You can enable it by going to System > System > Audio output > Enable passthrough.
If you are using a Network Attached Storage (NAS) such as Synology Diskstation, it is recommended to use NFS protocol instead of SMB protocol to access media files in XBMC. SMB networking protocol uses much more of the RPi’s CPU, so NFS is a faster option.
For example, during my tests, a 1080p video was buffering frequently over a wireless network with SMB protocol, but with NFS it played smoothly without any buffering issues.
As this computer does not have a separate power button, a good trick is to connect it to your TV’s USB port, so that when you turn on your TV it will also boot up the computer. This way you will also need one less power plug.
In general, I would recommend avoiding using WiFi, as you may experience streaming issues compared to the Ethernet connection.
However, if you wish to use WiFi, I have been testing the Asus USB-N10 wireless adapter, which seems to work fine with Raspbmc. However, you will need to configure the WiFi adapter by following these steps.
Alternatively, if you have any problems in getting your WiFi adapter working, you should try the OpenELEC distribution.
In order to play MPEG-2 and VC1 video files, you will need to purchase codec licenses from the Raspberry Pi foundation.
Install the codecs by following these steps:
I think this online video streaming service is too cool to miss if you want to watch Hulu, Netflix, Amazon VOD, HBO Go and other premium content channels on your Raspberry Pi.
In order to watch premium channels on the RPi, you will need to install commercially available software called PlayOn Media Server on your Windows-based PC that allows you to stream premium content channels into XBMC running on any operating system.
The PlayOn Media Server costs about $60 (one-time fee), but according to my experience it is definitely worth it.
Just buy and download the PlayOn here and install it to your Windows-based computer.
In order to register your copy, open PlayOn Settings (Go to Start / All Programs / PlayOn / PlayOn Settings) and enter the license information on the Registration tab.
Next, go to Videos menu in the XBMC. Select Files > Add Videos… > Browse > UPnP Devices > PlayOn (your computer name) and select OK.
Now, you are ready to browse the large collection of premium content channels on your RPi.
Continue reading more advanced instructions here, if you want to seamlessly integrate Netflix and Hulu into XBMC (Kodi).
The RasPi does not have hardware decoding support for any other video codec other than H.264 out of the box, so you will need to have all video files converted into H.264 format in order to play them smoothly. Alternatively, you can buy a license to unlock MPEG-2 and VC-1 decoding.
Fortunately, there is an easier way should you have another desktop PC or a media server. You can use Plex Media Server to transcode any media file you have in your library and stream it using a PleXBMC add-on for XBMC.
First, you will need to download and install the Plex Media Server application either on your Windows, Mac OS X or Linux based computer.
After installation, configure the movie library with the media manager (go to http://your-desktop-pc-ip-address:32400/manage/index.html with your Internet browser).
Next, download the PleXBMC add-on.
In order to copy the plugin file to the RPi, you can use an FTP client such as FileZilla to copy the plugin.video.plexbmc.zip to /home/pi folder on your RPi. The username is pi and the password is raspberry.
Go to Settings > Add-ons > Install from zip file > Home folder > plugin.video.plexbmc.zip to install the PleXBMC plugin.
Go to Settings > Add-ons > Enabled Add-ons > Video Add-ons > PleXBMC > Settings to configure the add-on.
Go to Videos > Video Add-ons > PleXBMC > Movies and launch your first movie.
While PleXBMC works with any skin, I would recommend using Amber, which is a PleXBMC-enabled skin that can be installed from the standard skin repository. Once you have installed Amber skin, select “Go PLEX” from the Home Screen by scrolling to Settings and selecting “Go PLEX”.
If you want to get the best audio playback quality and turn your Raspberry Pi into audiophile music player, I recommend trying out the HiFiBerry DAC+ and Volumio music player. HiFiBerry DAC+ is a special sound card for the Raspberry Pi that is optimized for 192kHz/24bit high-quality sound.
Volumio is a great music system that replaces your XBMC based operating system to play all your music, whether it is a high resolution file or Spotify, with the highest quality. You can control it with your mobile phone, tablet or PC.
To enjoy high-quality sound, you will need
|Download and extract Volumio1.5PI.img.zip file.
Download and open Win32DiskImager, right-clicking on the
file, and selecting “Run as Administrator”.
Insert the MicroSD Card on your computer, and browse the
Volumio1.5PI.img file and click on Write.
|Insert the HiFiBerry DAC+ board to the RPi board.
Insert the micro SD card and cables and boot up system.
|Type volumio.local/ on your device’s browser.
Be sure that you are connected to the same network as
Volumio. From here, you can configure it such as
adding NAS drives or Spotify credentials.
|Done! Now you are ready to play your first song.|
I have been very satisfied with Volumio, and I have a separate HiFiBerry powered RPi and active speakers in my living room to easily play music whenever I want.
All in all, the Raspberry Pi is almost ready to replace your home theater PC, but it will require some tweaking before you can realize its full potential as an entertainment center front-end.
One question that many of my readers ask is: “How does this system compare to my other reference HTPCs in terms of performance.”
In order to answer to this question, I compared my optimized Raspberry Pi system with my budget HTPC and as you can see, there is still quite big difference. But, it all comes to how much time and money you are willing to spend. In my case, I still use a full blown HTPC in the living room while other rooms have RPis as secondary HTPCs.
|Raspberry Pi||Budget HTPC|
|Booting up||27.8 sec||9.7 sec|
|Importing movies||80 sec||15 sec|
|Opening library||1.4 sec||0.6 sec|
|YouTube search||15 sec||2 sec|
Now go and build RPi yourself: get the list of required components.
Next, continue customizing the XBMC (Kodi) user interface with this extensive guide (over 4,000 words including a free PDF version) to learn other useful tips and how to set up live TV on Raspberry Pi.
You might also find these XBMC Netflix and Hulu integration tips useful.