The Only Raspberry Pi 2 Kodi (XBMC) Tutorial You Will Ever Need

Posted By

Mar 28th, 2015

Over the past couple of years, I have had mixed feelings about Raspberry Pi as a HTPC, because even after using all possible optimization tricks it simply was not responsive enough for my requirements. Now that a new model is out, is the Raspberry Pi 2 finally ready to replace your HTPC?

Comparison-2My answer is yes, because according to my tests, Raspberry Pi 2 is 55% – 100% faster compared to the Raspberry Pi 1 model B+ with Kodi (XBMC) entertainment center.

Raspberry Pi 2 is an amazing little computer that can be used as a complete Kodi (XBMC) entertainment center solution with the right software and accessories. This comprehensive guide gives you exciting new insights on how to set up a low-cost HTPC using the Raspberry Pi 2.

In this complete and up-to-date tutorial, you will learn

  • which components you will need
  • how to build your Raspberry Pi 2
  • which operating system you should choose
  • how to configure the Raspberry Pi for better performance
  • how to find more media content sources
  • how to turn Raspberry Pi into an audiophile music player

RPI_PDF_mediumDo you need to print this guide or download it to your iPad to follow these instructions?

Download the free PDF version of the Raspberry Pi 2 Media Machine eBook.


What’s New?


The Raspberry Pi 2 Model B is the latest tiny computer by the Raspberry Pi Foundation that plugs into your TV with an HDMI cable.

It decodes 1080p H.264 HD video smoothly, and the Kodi user interface is now very responsive on Raspberry Pi 2 thanks to its upgraded processor.

Here are the highlights you need to know about this new Raspberry Pi 2:

  • A new 900MHz quad-core ARM processor that provides much better performance.
  • 1GB RAM which is two times more memory than before.
  • Complete compatibility with Raspberry Pi 1.

This guide also includes instructions to set up the new OSMC operating system that replaces the Raspbmc OS I used earlier in this guide.

Components you will need for optimal performance

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 hardware decoding by purchasing a license from the foundation’s online store.

Get a case with a built-in heat sink

Flirc_case_medium2Nowadays, there are a lot of commercial cases to choose from that you can buy online.

My favorite case is the Flirc Raspberry Pi 2 and B+ compatible case, which is hands down the best case for RPi.

The Flirc case is made out of aluminium and it looks absolutely stunning compared to other RPi cases in the market. The case has a built-in heat sink, which is useful especially if you intend to overclock the system.

Get a supported microSD card

SD_cardPlease note that many users report issues with various memory cards, so be 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 worked properly with the operating system.

You can get a standard micro SD card with many Raspberry Pi 2 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.

Comparison-3One good card that supports wear levelling and performed really well in my tests is the SanDisk Extreme Pro 8GB MicroSDHC.

Samsung’s class 6 micro SD card that is often sold together with the NOOBS operating system install manager performed as well as the class 10 SanDisk Extreme Pro in my tests.

I also noticed with a Kingston class 10 memory card that the class of the micro SD card does not necessarily mean the memory card will be faster than class 6, as the random read/write speeds are even more important.

You can also use a USB memory stick with OSMC operating system, but I did not see any speed improvements between the Kingston DT USB 3.0 stick and the SanDisk Extreme Pro.

As a conclusion, you should make sure that your micro SD card will last longer without any issues, so I would recommend using the SanDisk Extreme Pro 8GB.

Get a supported power adapter

The RPi 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 ones 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 into my TV’s USB slot or used my iPad’s power supply, the problems were resolved.

Supported input devices

remoteHDMI CEC

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 Kodi (XBMC) by sending signals over the HDMI cable. Usually, HDMI CEC works without any 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 OS X.

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 Kodi.

Mobile apps

The third option is to use your mobile phone or tablet as a remote control using an app such as Constellation.

Build your Raspberry Pi 2

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.


1 First, open the case and apply the thermal tape to the
built-in heatsink. Then, insert the board inside the case.
2 Insert the case cover back into place and tighten the screws.
3 Insert the micro SD card in the slot under the case.
Please follow the instructions in the next chapter to
install an operating system.
4 Insert the HDMI, Ethernet and micro USB cables in place.
Plug in the Flirc adapter, keyboard or any other controllers.


Choose an operating system


In this chapter, you will learn which operating system you should choose and how to install it.

I tested the OpenELEC and OSMC operating systems from a performance and stability point of view. They both use Kodi (XBMC) as an entertainment center, but the Linux distribution in the background is different.

There is also a third alternative called Xbian, which is not included in the NOOBS. However, I have not been too impressed with Xbian’s performance in the real-life usage scenarios or overall user friendliness, so for the time being I would stick with either OpenELEC or OSMC.

Before going through the installation instructions, let’s have a look at how these operating systems performed in real-life usage. As a reference, I use the Raspbmc operating system (predecessor of the OSMC) performance with Raspberry Pi 1 Model B+. 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 SanDisk Extreme Pro 8 GB micro SD card with each operating system.

Update on March 29th 2015: Thanks to the feedback from the OpenELEC team, I repeated the performance tests using the latest OpenELEC v.5.0.7, which seems to have some performance improvements compared to the older v.5.0.6.

on RPi 2
on RPi 2
on RPi 1
Booting up 15.2 sec 17.1 sec 38.8 sec
Importing movies 35 sec 30 sec 82 sec
Opening library 1.0 sec 0.8 sec 1.7 sec
YouTube search 3.6 sec 3.1 sec 22 sec


The results show that OpenELEC v.5.0.7 boots up a bit faster than OSMC Release Candidate version, but the overall Kodi experience is slightly faster out of the box with the OSMC. The OSMC uses a more lightweight and optimized skin than OpenELEC by default, which probably explains the difference in the navigation speed.

All in all, both OpenELEC and OSMC are good choices for you, but I would recommend opting for OSMC as it is easier to set up and configure, if you, for example, want to overclock it later on.

OpenELEC operating system


In this chapter, I will show you how to install OpenELEC operating system using two alternative methods: NOOBS installer and diskimage installation.

Option 1: Install the OpenELEC operating system with NOOBS

The easiest way to install an operating system such as the OpenELEC is to use NOOBS (New Out Of the Box Software), which is an easy operating system install manager for the Raspberry Pi.

Please note that the OpenELEC booting up time via NOOBS will be a bit slower compared to a diskimage installation method, because NOOBS starts its own firmware, kernel and userspace tools before it loads the OpenELEC operating system. However, the overall installation experience is a bit easier with NOOBS installer especially for beginners.

You can either purchase a pre-installed NOOBS micro SD card from an online store or download and install it yourself.

You can buy a micro SD card with NOOBS preinstalled, for example from

Your RPi will automatically boot 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.

Alternatively, you can download and install NOOBS to the 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.


1 Download SD Formatter 4.0 and install it.
Insert your micro SD card into the computer’s SD card reader.
In SD Formatter, select the drive letter for your SD card
and format it.
2 Next, extract the .zip file using 7zip and
drag all the files from the extracted NOOBS folder to the
SD card drive. After file transfer is completed, safely
remove the micro SD card and insert it into your RPi.


Follow these step-by-step instructions on how to create a NOOBS card.

Now, insert the microSD card with NOOBS into 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.


1 After booting up your Raspberry Pi, a window will appear
with a list of operating systems that you can install.
Select OpenELEC_Pi2 and click on Install.
2 Confirm to overwrite all the data on the micro SD card.
3 OpenELEC will run through its installation process,
which will take a while.
4 When the install process has completed, the system will
reboot and launch the OpenELEC for the first time.


Option 2: Install the OpenELEC operating system with a Disk Imager

If you want to speed up boot times, then you should install the OpenELEC to the microSD using a DiskImager tool on Windows instead of using the NOOBS installer.


1 Download the RPi2 ARMv7 diskimage, and
extract the OpenELEC-RPi2.arm-5.0.7.img.gz using 7zip.
Insert your microSD card into the computer’s SD card reader.
2 Download Win32DiskImager and run it as an administrator
on Windows. Select the OpenELEC-RPi2.arm-5.0.7.img image
file and choose the SD card drive letter as the device.
Click “Write” and wait until the file transfer is completed.
Safely remove the microSD card and insert it into your RPi.


OSMC operating system


Download and launch the OSMC

The OSMC 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 proceeding with these instructions, plug in the micro SD card reader and unplug any other USB storage devices to make sure you will not format an incorrect drive by accident.


Then, click the “next” button and configure whether your
system connects to the web via a wired or wireless

1 Launch the OSMC installer application and select the
language and Raspberry Pi 2 device in the welcome screen.
Then, click the “next” button and select the latest
OSMC version.
2 Next, select where you would like to install OSMC.
Usually, you should install it on the SD card.
3 Now, select the device path where you would like to
install OSMC. Click “next” and accept the licence
4 When the download process has completed, confirm
installation by selecting “Yes” when prompted. After
installation is completed, you are ready to insert the
micro SD card onto RPi and boot it up.


After plugging in the memory card, USB stick, USB keyboard or remote control, Ethernet cable and power adapter, the system will boot up and the Kodi will launch for the first time.

To finalize the installation, select your locale and confirm the licence agreement and you are ready for show time.

Performance optimization and customization tips

optimizeThe following performance improvement tricks are particularly important if you own a Raspberry Pi 1 Model B+ or earlier model, but they can slightly improve performance on the Raspberry Pi 2 as well.

For example, by following these tricks, you can speed up the Raspberry Pi 1 system by 20-40 percent compared to the original baseline.

RPi 1 Before RPi 1 After
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


Overclock it


You can safely speed up the RPi by overclocking it. Go to “My OSMC” > “Overclock”.

Next, change the system performance profile to “Turbo” to overclock the system.

Overclocking did not have as high of an impact as I was hoping for, but booting up time improved by over 20 percent on RPi 1. However, movie library importing, navigation speed and YouTube searching remained on the same level.

Change resolution to 720p

resolutionReducing the Kodi user interface resolution to in “Settings” > “System” > “Video” will save memory and 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 a 20 percent improvement in the navigation menu speeds on RPi 1, so if you do not need 1080p resolution in the menus, this change will make your system feel snappier.

Change the default skin


On OSMC, the default skin is lightweight enough and already optimized for performance, so you don’t need to change the skin to improve system responsiveness.

However, there are even more beautiful skins available such as Aeon Nox and Mimic that work fine on Raspberry Pi 2 according to my tests.

Go to “Settings” > “Skins” > “Skin” to download and change a new skin.

Disable thumbnail extraction

thumbBy 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 the “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”.

Adjust display refresh rate to match video

refreshI would recommend adjusting the 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.

Another way to smoothen the playback is to use audio passthrough. 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.

Use NFS instead of SMB share

networkIf 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.

Power it from a USB port on your TV

usbAs 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.

Add more media content sources

Install MPEG-2 and VC1 video codecs


In order to decode and play MPEG-2 and VC1 video files using hardware acceleration, you will need to purchase codec licenses from the Raspberry Pi foundation.

Install the codecs by following these steps:

  • Purchase MPEG-2 and VC1 codec license keys
  • You will receive the license key through your email within 72 hours
  • In OSMC, go to My OSMC > Pi Config > GPU Mem & Codec
  • Enter the license key from your email to MPEG2 and/or WVC1 licence under the Codec status
  • Reboot the system

Add Hulu, Netflix and other premium channels


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 Kodi (XBMC) running on any operating system.

The PlayOn Media Server costs about $60 (a one-time fee), but according to my experience it is definitely worth it.


Just buy and download the PlayOn here and install it on 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 the Videos menu and then Files in the OSMC. Select 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 Kodi (XBMC).

Use the Plex Media Server to transcode video files


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 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 > to install the PleXBMC add-on.

Go to Settings > Add-ons > Enabled Add-ons > Video Add-ons > PleXBMC > Settings to configure the add-on.

  • In the General tab, change the Primary Server Address to the IP address of your desktop PC or media server where the Plex Media Server is running.
  • In the Transcoding tab, tick Enable transcoding to allow Plex to transcode the video to the H.264 format supported by Raspberry Pi’s hardware decoding. Choose the video quality according to your preferences.

Go to Videos > Video Add-ons > PleXBMC > Movies and launch your first movie.

Install Amber skin for the full Plex experience

While PleXBMC works with any skin, I would recommend using Amber skin, which is a PleXBMC-enabled skin that can be downloaded here. Once you have installed Amber skin, select “Go PLEX” from the Home Screen by scrolling to Settings and selecting “Go PLEX”.

Turn Raspberry Pi into an audiophile music player


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


1 Download and extract the 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.
2 Insert the HiFiBerry DAC+ board to the RPi board.
Insert the micro SD card and cables and boot up system.
3 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.
4 Done! You are now 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.


flirc_doneAll in all, the Raspberry Pi 2 is now ready to replace your home theater PC, but it will still 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 this question, I compared the Raspberry Pi 2 system with my budget reference HTPC and as you can see, there are still some, but not anymore significant difference. So, it all comes down to your requirements and 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 2 Budget HTPC
Booting up 17.1 sec 9.7 sec
Importing movies 30 sec 15 sec
Opening library 0.8 sec 0.6 sec
YouTube search 3 sec 2 sec


Now go and build the RPi yourself: get the list of required parts.

Exclusive for subscribers: download the PDF version


I have a nice surprise for you! After finishing this extensive article, I thought to make an eBook version that includes 8 easy steps to build your own Raspberry Pi machine.

This exclusive Raspberry Pi eBook is only for my weekly newsletter subscribers, so subscribe and download the free PDF version of the Raspberry Pi 2 eBook.

What’s next

ideas2Next, continue customizing the Kodi (XBMC) user interface with this extensive guide (over 4,000 words including a PDF version).

You might also find this advanced guide to integrate Netflix and Hulu into Kodi useful.