This tutorial has everything you will ever need to know about using Kodi on the Raspberry Pi 3 B+ mini computer.
If you want to learn how to set up Raspberry Pi Kodi (was XBMC) entertainment center solution with the right accessories and software, you’re in the right place.
— Raspberry Pi (@Raspberry_Pi) July 17, 2015
Chapter 1: Parts You Will Need
In this chapter, you will learn which components you should choose for optimal performance based on my experience.
You’ll learn how to choose the right:
- Case to prevent overheating
- Memory card for optimal performance
- Power supply to avoid any reliability issues
- And more tips on component selection
What you will need:
- Raspberry Pi 3 model B+ (released in March 2018)
- The Flirc Raspberry Pi case
- Ethernet cable
- HDMI cable
- MicroSD memory card (at least 8GB)
- Micro USB power adapter
- Flirc USB IR receiver (if your TV does not support HDMI CEC)
- HDHomeRun TV tuner (if you wish to watch live TV)
The total price for the computer depends on the accessories, but you may have most of the required accessories at home already.
Get the Raspberry Pi 3 B+ board
Over the past couple of years, I have had mixed feelings about using the Raspberry Pi board as a Kodi based front-end device, because even after using all possible optimization tricks it simply was not responsive enough for my requirements.
Fortunately, with the Raspberry Pi 3 and the latest B+ model this is no longer the case, so I have included RPi in my recommended HTPC builds.
Get a case with a built-in heat sink
The Flirc case is compatible with both the latest third generation and older second generation and B+ models. It is made out of aluminum 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 this high quality Raspberry Pi case here.
Get a supported microSD card
Please 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 microSD card with many Raspberry Pi 3 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 microSD card that comes with wear levelling. Only the more expensive microSD 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 16GB storage as more space increases the longevity of the card by having more space for wear levelling.
One good card that supports wear levelling and performed really well in my tests is the SanDisk Extreme Pro 32GB MicroSDHC.
Samsung’s class 6 microSD 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 microSD 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 microSD card will last longer without any issues, so I would recommend using the SanDisk Extreme Pro 32GB.
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.
The Raspberry Pi does not include an on/off switch, so if you prefer to turn off your RPi for the night, I would suggest using this On Off power switch for Raspberry Pi.
Use supported input devices
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.
The third option is to use your mobile phone or tablet as a remote control using an app such as the Official Kodi Remote.
Chapter 2: Build Your Raspberry Pi
In this chapter, you will learn just how easy it is to put everything together.
You’ll learn how to:
- Assemble your Raspberry Pi system
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 apply the thermal tape to the built-in heatsink. Then, insert the board inside the case.
- Insert the case cover back into place and tighten the screws.
- Insert the microSD card in the slot under the case. Please follow the instructions in the next chapter to install an operating system.
- Insert the HDMI, Ethernet and micro USB cables in place. Plug in the Flirc adapter, keyboard or any other controllers.
Chapter 3: Install Kodi on Raspberry Pi
In this chapter, you will learn which operating system you should choose and how to install it.
You’ll learn how to:
- Format the microSD card
- Install LibreELEC with their USB-SD Creator app
- Install OSMC (recommended)
I have tested the OpenELEC, OSMC, LibreELEC and XBian operating systems from a performance and stability point of view. They all use Kodi (XBMC) as an entertainment center, but the Linux distribution in the background is different.
From a pure performance point of view, there is no significant difference between LibreELEC, OpenELEC, XBian and the OSMC.
LibreELEC is a just enough operating system for Kodi, which means that every additional operation has been taken away and the whole distribution has been optimized for Kodi use only.
LibreELEC is a fork of OpenELEC, so they are essentially the same. However, LibreELEC has bigger development team and gets updated more frequently.
While LibreELEC is a good option for many, you may sometimes prefer to have the full Linux operating system running in the background, so that you can add additional features such as home automation and media server capabilities.
The OSMC is based on the Debian operating system and it will give you more freedom to customize the system compared to LibreELEC or OpenELEC.
Secondly, OSMC has a more lightweight and optimized skin than LibreELEC/OpenELEC by default, which makes it feel a bit faster when navigating around Kodi.
All in all, both LibreELEC and OSMC are good choices for you, but I would recommend opting for OSMC as it provides better overall user experience, it is easier to configure and it will give you more customizability.
Format the microSD card
Here are the detailed instructions on how to format your microSD card:
- Download SD Formatter 4.0 for either Windows or Mac.
- Launch the SD Formatter installer and follow the installation instructions.
- Insert your microSD card into the computer’s SD card reader.
- Select the drive letter for your microSD card. Keep the “Quick Format” option and specify the name of the card.
- Click the “Format” button and soon you are done.
Install operating system
Option 1: Install LibreELEC with USB-SD Creator
Note: You can use Raspberry Pi foundation’s easy operating system installer called NOOBS to install and get started with LibreELEC.
However, this method makes the system a bit slower to start up.
LibreELEC’s development team recommends to use their own USB-SD creator app for a dedicated Kodi setup.
Here are the detailed instructions how to install LibreELEC using their USB-SD Creator:
- Download the LibreELEC USB-SD Creator.
- Insert your microSD card into the computer’s SD card reader.
- Launch the Creator app with administrator rights.
- Make sure to select “Raspberry Pi 2 and 3” as version.
- Click “Download” and then select the folder where you wish to download the image file.
- Make sure your SD card drive has been selected correctly.
- Click “Write” and select “Yes” to confirm the operation.
- After writing is done, press the “Close” button and safely remove the card from your computer.
- Insert the card into your Raspberry Pi.
- Plug in the power cord to boot up RPi for the first time.
Let’s proceed with installing the LibreELEC operating system.
- Once RPi has booted, you will see the LibreELEC wizard. Press “Next”.
- If you wish, you can rename your host name. This is how your RPi will be shown to other devices in your home network.
- Select your Wi-Fi network. Press “Connect” and enter your Wireless Network Passphrase to connect to the Internet. Then, select “Next”.
- You can skip sharing and remote access, so just press “Next”.
- That’s it. You are ready start configuring Kodi Media Center.
Option 2: Install OSMC operating system
The OSMC is the successor to Raspbmc and it is created and maintained by Sam Nazarko.
You can download the latest OSMC version here.
Before proceeding with these instructions, plug in the microSD card reader and unplug any other USB storage devices to make sure you will not format an incorrect drive by accident.
- Download the OSMC installer.
- Launch the OSMC installer application and select the language and Raspberry Pi 3 device in the welcome screen.
- Then, click the “next” button and select the latest OSMC version.
- Next, select where you would like to install OSMC. Usually, you should install it on the SD card.
- Then, click the “next” button and configure whether your system connects to the web via a wired or wireless connection. If you select wireless, you will be prompted to select network encryption (usually it is WPA/WPA2 PSK), write your network’s name (SSID) and password.
- Now, select the device path where you would like to install OSMC.
- Click “next” and accept the license agreement.
- When the download process has completed, confirm installation by selecting “Yes” when prompted.
- After installation is completed, you are ready to insert the microSD card onto RPi and boot it up.
- Wait a moment while OSMC formats the device and install files.
- Next, select your locale and confirm by pressing “Yes”. Then select your time zone.
- Next, if you wish, you can change your device name. Select “Accept”.
- You can skip SSH sharing and remote access, so just press “Accept”.
- Next, confirm the license agreement.
- Next, you can choose whether you prefer using OSMC’s own skin or Kodi’s default skin (Classic).
- Finally, you can choose whether you prefer receiving OSMC’s newsletter.
- That’s it. You are now ready to enjoy OSMC. Press Exit to leave the configuration wizard.
Chapter 4: Add Media Content Sources
In this chapter, you will learn ways to add more content sources such as live TV streaming, Netflix streaming, high-fidelity music streaming and local media files.
I will use OSMC as a demonstration operating system.
You’ll learn how to:
- Install video codecs
- Set up a media library
- Add live TV
- Add premium online channels
- Add add-ons
- Integrate with Plex Media Server
I would also suggest checking out my complete Kodi guide, if you wish to learn more ways to set up and customize Kodi.
Install MPEG-2 and VC1 video codecs
Install the codecs by following these steps:
Set up a media library
Here are the detailed instructions to add sources to video, music, and photo menus:
- In the videos tab on the home screen, select “Files”.
- Select “Add Videos” and “Browse” in the add video source.
- Browse to the folder where your media files are stored. If your files are located on a network attached storage, you will need to add the SMB or NFS share from the NAS server.
- Rename the media source, if needed, and select “OK”.
- In the set content window, you can set the type of media. Kodi will automatically scrape the movie, TV show, or music information after you have set up the media content.
- If your movies are located in separate folders, enable “Movies are in separate folders that match the movie title”.
- Confirm Yes in the “Change content” question.
- Now, you can go back to main menu where you will find a new “Movies” menu with your recently added movies.
If you wish to check for new media files on Kodi startup, go to Settings > Library settings > Databases and enable “Update library on startup”. You can also select “Hide progress of library updates” if you do not wish to see the progress indicator every time the library gets updated.
Add HDHomeRun LiveTV
If you do not already have HDHomeRun, you can use this guide to get and install HDHomeRun.
You can also record TV shows with Raspberry Pi using a TVHeadend server, but it is still much more complicated to set up and will not provide an optimal user experience like a DVR.
Live TV recording in the background consumes Raspberry Pi’s resources, so using OSMC/LibreELEC at the same time will not be a very smooth experience.
Therefore, I would recommend building a Windows-based DVR back-end system using this guide.
However, Raspberry Pi works well for watching live TV and timeshifting, so let’s see how you can easily watch live TV with HDHomeRun and RPi.
- Go to “Settings” > “Add-on browser” > “Install from repository” > “Video add-ons” > “HDHomeRun”.
- Select “Install” and Kodi will download and install this add-on.
- Now, you can go to “Videos” > “Video Add-ons” > “HDHomeRun Live TV” to watch TV streams.
- In order to add live TV to the home menu, go to “Settings” > “Appearance” > “Skin – Settings” > “Home – Customize Home Menu”. Scroll down to “Live TV” and “Choose shortcut”.
- Select “Add-on” > “Video Add-on” > “HDHomeRun Live TV”. Select OK to save settings.
- Now, you can launch the Live TV shortcut to watch TV.
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.
Just buy and download 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.
Now, let’s configure OSMC to be able to view Netflix and other premium services.
- Go to “Videos” > “Files”. Select “Add Videos…” > “Browse” > “UPnP Devices” > “PlayOn (your computer name)”.
- From this list, you can browse the service you want to add as a source (e.g. Netflix).
- Next, you can rename the name of this media source (e.g. Netflix).
- In order to add Netflix to the home menu, go to “Settings” > “Appearance” > “Skin – Settings” > “Home – Customize Home Menu”.
- Select “Add” on any existing shortcut and “Choose shortcut” > “Video Library” > “Sources” > “Netflix”. Select OK to save settings.
- Now, you can start browsing your favorite TV shows and movies via PlayOn Media Server.
Continue reading more advanced instructions here if you want to seamlessly integrate Netflix and Hulu into Kodi.
Add Tidal music service
Installing Tidal is as easy as adding any official Kodi add-on:
- Go to “Settings” > “Add-on browser” > “Install from repository” > “Music Add-ons” > Select “Tidal”.
- Select “Install” and Kodi will download and install this add-on. Now, you can go to “Music” > “Music Add-ons” > “Tidal”.
- Press “C-key” to access to the context menu and select “Add-on settings”.
- Select the quality and input your Tidal username and password.
- In order to add Tidal to the home menu, go to “Settings” > “Appearance” > “Skin – Settings” > “Home – Customize Home Menu”.
- Select “Add” on any existing shortcut and “Choose shortcut” > “Add-on” > “Music Add-on” > “Tidal”. Select OK to save settings.
- Now, you are ready to enjoy high-fidelity music streaming with Tidal from the home screen.
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.
If you don’t have the Plex Media Server already running, you can follow this guide to set it up.
Here are the the steps to install and set up the official Plex for Kodi add-on:
- Go to “Settings” > “Add-on browser” > “Install from repository” > “Video Add-ons” > “Plex”.
- Click on the Plex add-on and select install to download it.
- You can go back to Videos menu, and you will find the new Plex add-on under the Video Add-ons folder.
- Launch Plex add-on and select “Sign In”. On your web browser (on any device), go to plex.tv/link and enter the code presented on your TV screen.
- Now, you’re all set and you can start discovering your content on Plex.
Chapter 5: Optimize and Speed Up
In this chapter, you will learn performance improvement tricks that are particularly important if you own an older Raspberry Pi model.
You’ll learn how to:
- Change resolution
- Change default skin
- And more tips to optimize the speed
If you are not satisfied with your Raspberry Pi’s performance, there are multiple ways to speed up your system.
By following these tips and tricks, you can significantly speed up your Raspberry Pi 1 system compared to the original baseline.
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. However, movie library importing and navigation speed remained on the same level.
Change resolution to 720p
Reducing the Kodi user interface resolution 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 Kodi default Estuary skin, Aeon Nox and Mimic that work fine on Raspberry Pi 2 and 3 according to my tests.
Go to “Settings” > “Interface” > “Skin” > “Skin” > “Estuary” to download and change a new skin.
Disable thumbnail extraction
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 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
I 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
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.
Chapter 6: Make Your Home Smarter
In this chapter, you will learn ways to add home automation features with Raspberry Pi to make your home smarter.
- How to use RPi as a multi-room music player
- Other ideas on awesome home automation projects
Turn Raspberry Pi into a multi-room music player
If you have replaced your old Raspberry Pi with a newer third generation model, it would be a shame to throw the old model away.
One great way to still use your old Raspberry Pi is to repurpose it as a music player around your home.
To get the best audio playback quality and turn your Raspberry Pi into a music player suitable for all audiophiles, 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 Kodi (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:
- Raspberry Pi board
- HiFiBerry DAC+ – RCA or Phone jack version
- HiFiBerry DAC+ compatible case
- Volumio music player (download here)
- Win32DiskImager (download here)
- Download and extract the VolumioX.XPI.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 microSD card and cables and boot up the 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! 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.
Other ideas on awesome home automation projects
Did you know that you can also turn your Raspberry Pi into Alexa-enabled Amazon Echo or Google Assistant-powered Google Home?
These are more advanced instructions and go beyond the scope of this tutorial, so you can find the instructions here:
Now It’s Your Turn
All in all, the Raspberry Pi 3 B+ is an excellent mini computer and coupled with the Flirc remote companion and a high-quality Raspberry Pi case, it works great as an entertainment center front-end.
To help you to get started, I created a free step-by-step eBook that you can use to quickly apply the relevant steps from this post to your Raspberry Pi and Kodi installation.
The eBook contains the 8 most important steps from this post…
… and actionable tips that you can use today to simplify your user experience.
Click below to download the free eBook:
After you have set up your own Raspberry Pi, be sure to continue reading my guide to customizing Kodi with all the bells and whistles.