If you want to have a media center plugged in to your TV, but you don’t want to buy an expensive box or to hook-up your computer to your TV, then a Raspberry Pi with Kodi might be the perfect solution for you.
In this tutorial we’ll teach you how to install one of the most popular media centers in one of the most affordable and tiny computers in the market.
What’s Raspberry Pi?
A Raspberry Pi is a very small computer (it fits in your hand) that can be used to learn programming or to install a plethora of programs on it. You can use it as a media center, as a platform to emulate games and as whatever you can think of — as long as you can program it, of course.
There are several versions of the Raspberry Pi, but the most recent version is the Raspberry Pi3 Model B+.
Kodi, formerly known as XBMC, is a free and open-source media player which allows users to stream media directly to their TV. With Kodi you can stream hundreds of videos, podcasts, movies and TV shows directly from a simple interface.
Although Kodi is perfectly legal, it can be used to stream pirated content, so you should always be aware of what you’re streaming.
The best part about Kodi is that it features a vast library of addons which can deeply enhance your media center experience.
How to Install Kodi on a Raspberry Pi
Things You’ll Need
Before you can install Kodi on a Raspberry Pi, there are a few things you should have. For optimal performance you should have:
- A Raspberry Pi (we recommend Raspberry Pi 3 Model B+, otherwise you might have a less-than-optimal experience).
- A case for your Raspberry Pi — Cases prevent overheating and protect the delicate and exposed electronics of the Raspberry Pi.
- A memory card — You’re going to need the storage to install Kodi on your Raspberry Pi.
- A dedicated power supply — Although it’s possible to run a Raspberry Pi with a portable battery, a dedicated power supply is more reliable and lasts for however long you have electricity. The Raspberry Pi doesn’t come with a power adapter, so you will need one as well.
- An ethernet cord — Kodi requires internet in order to be used. You can plug an ethernet cord from your modem/router straight into your Raspberry Pi.
- An HDMI cable — You need an HDMI cable in order to plug your Raspberry Pi into your TV/computer monitor.
- If your TV doesn’t support HDMI CEC then you should also get a remote adapter. HDMI CEC lets you use your TV remote to control Kodi on the Raspberry Pi. You can also use a mobile app which allows you to control Kodi.
One thing you should note: the Raspberry Pi doesn’t feature an ON/OFF switch. So if you want to turn it off, you might need to unplug it. You can also buy a power supply with an ON/OFF feature.
Assembling The Raspberry Pi
Once you have everything you need, assembling the Raspberry Pi is very simple. You should be able to do it in about 20 minutes or less.
If you’ve bought a case you should first assemble the Raspberry Pi into the case. Premium cases usually come with thermal tape or paste. You should use it — it helps to keep your Raspberry Pi cool.
Insert the microSD card in the appropriate slot and plug every cable in. Once everything is ready to go we will proceed with installing Kodi on your device.
Installing Kodi on the Raspberry Pi
Formatting the Memory Card
Before using your memory card it’s a good idea to format it properly, to ensure that it will run fine. You can download a program such as SD Formatter 4.0 and quick format it.
There are also other options of formatting your microSD card, but SD Formatter 4.0 is very simple to use and formats your cards rather quickly.
Windows can also format your cards, but it’s a bit more complicated to the less tech-savvy user.
Choosing an Operating System
The Raspberry Pi comes without any semblance of an operating system installed. You will need to install a system that suits your needs. Since we’re interested in installing Kodi on the Raspberry Pi, we’re looking for an operating system which uses Kodi.
There are several operating systems with Kodi, such as: OpenELEC, OSMC, LibreELEC and Xbian. If you’re looking for the best performance-wise, there’s not any discernible difference between the four.
We recommend OSMC for a better overall user experience, but LibreELEC is a good choice as well.
OSMC is a Debian-based operating system and is the operating system which gives you the most freedom to customize it. It also has a better optimized skin by default, which makes it feel a little faster than its competitors when using Kodi.
LibreELEC is an operating system optimized for Kodi. It has been stripped away of everything else other than Kodi.
It’s a fork of OpenELEC, so they’re pretty much the same. The main difference is that LibreELEC is updated more often and has a bigger team developing it.
Although LibreELEC is a great choice for whoever’s focused on running only Kodi and nothing else, there might be some times in which you’re interested in using additional Raspberry Pi features, such as home automation and other media server capabilities, unavailable in LibreELEC.
Installing the Operating System
After formatting the memory card and choosing an operating system you’ll need to install it on your Raspberry Pi. In this tutorial we’ll teach you how to install either LibreELEC or OSMC. So, depending on your choice, jump into the appropriate section.
Installing LibreELEC with the USB-SD Creator
Even though you can install an operating system with Raspberry Pi’s easy installer NOOBS, it makes the system a bit slower to start-up than with our alternative.
LibreELEC’s team made their own app to install Kodi on the Raspberry Pi and it’s faster than NOOBS.
To install Kodi on the Raspberry Pi with LibreELEC USB-SD Creator you need to:
- Download the LibreELEC USB-SD Creator from their website
- Insert your MicroSD card into the appropriate slot on your computer
- Open LibreELEC USB-SD Creator
- Choose “Raspberry Pi 2 and 3” under “Select Version”
- Click “Download” after selecting the folder in which to store your downloaded image
- Check if the right SD card drive is selected
- Press “Write” and confirm the operation by pressing “Yes”
- Wait until writing is done, then press “Close”
- Put the card into your Raspberry Pi
- Plug-in your power cord and boot up Raspberry Pi for the very first time
Even though the trickier part is already done, once you boot up your Raspberry Pi, you will need to properly install LibreELEC.
Installing it is pretty straightforward due to their install wizard.
- Press “Next” on the LibreELEC wizard
- Rename your host name if you wish so. The host name is the name of your Raspberry Pi on your local network
- Choose your Wi-Fi network and press “Connect”. You will need to insert your Wi-Fi password
- Hit “Next” and skip sharing and remote access by pressing “Next” one more time
After following this procedure, LibreELEC will be installed on your Raspberry Pi. The next step is configuring Kodi. We’ll get to that in a minute.
Installing OSMC is also very simple, even though it can seem a little more complicated than the alternative.
First you need to:
- Download the OSMC installer from their website
- Insert your SD card in the appropriate slot on your computer
- Launch the installer and choose your preferred language and the correct device you’ll be installing OSMC on (in our case, the option is Raspberry Pi 2/3)
- Click “Next” and choose the latest version
- Choose where you’d like to install OSMC. We recommend installing it on a folder inside the SD card
- Click “Next” and configure your internet connection (whether it’s wired or wireless). If you choose the wireless option you’ll need to insert your SSID and password
- Confirm the path where you’ll install OSMC
- Click “Next” and “Accept”
- Click “Yes” when prompted to do so (after the download finishes)
- Remove the SD card from your computer and place it in the Raspberry Pi
- Boot up the Raspberry Pi by plugging it in to the power cord
- Wait for OSMC to format the device and install the appropriate drivers
- Select your locale and press “Yes”
- Select your Time Zone
- Change your device name if you wish to and press “Accept”
- Skip SSH sharing and remote access if you don’t intend to use it by pressing “Accept”
- Confirm the license agreement and choose which OSMC skin you prefer
- Opt-in or out of their newsletter and press “Exit”
Although it seems like a more bothersome install than LibreELEC, OSMC allows you to do much more with your Raspberry Pi, so it’s worth the hassle.
Next up, we will configure Kodi.
Configuring Kodi on Your Raspberry Pi
Setting up a Media Library
To use a media center to its full extent, you should have a dedicated server in your home with the video files you wish to play on your Raspberry Pi. There’s also the possibility of streaming content directly from the internet.
To add video, music and photo sources you need to:
- Go to the videos tab and select “Files”
- Choose “Add Videos” and “Browse” in the “add video source” field
- Search for the folder in which you’ve stored your media content
- Rename your media source if you wish to
- Set the type of media you want Kodi to scrape. You can choose from movies, TV shows or music content.
- If you have your movies in separate folders, tick the box that says “Movies are in separate folders that match the movie title”.
- Press “Yes” when prompted
Afterwards you’ll find a new menu in your home screen called “Movies”. There you will find the movies in your media server.
You can also tell Kodi to check for new media files on startup. To do so you need to:
- Go to Settings > Library Settings > Databases
- Enable “Update library on startup”
- If you wish for the library update indicator to stay hidden, enable “Hide progress of library updates”
Kodi allows you to install add-ons. There are several add-ons you can install. The procedure of installing them is the same for every official add-on.
- Go to Settings > Add-on Browser > Install from repository
- Select your preferred category
- Choose your add-on
- Select “Install” and wait for Kodi to download and install your preferred add-on
Transcode Video Files with Plex Media Server
The Raspberry Pi can only decode H.264 videos out-of-the-box. If you wish to play MPEG-2 and VC1 files with hardware acceleration, you must purchase codec licenses from the Raspberry Pi foundation.
After purchasing them you will receive them in your email within 72 hours. If you use OSMC, you then need to go to My OSMC > Pi Config > GPU Mem & Codec, enter the license key(s) you’ve acquired and reboot your system.
Alternatively, you can convert your video files into H.264. Luckily, there’s an easy way to do it.
You will need to install and set up the Plex Media Server on your computer, then you just need to install the Plex for Kodi add-on. Here’s how you do it:
- Go to Settings > Add-on browser > Install from repository > Video add-ons > Plex
- Choose the Plex add-on and click “install”
- Wait for Kodi to download and install Plex
- Go to the Video add-ons folder under the Video menu
- Launch Plex and sign-in
- Open a web browser on any device and go to “plex.tv/link” and enter the code shown to you on your TV screen
Afterwards you’ll be able to find your decoded content from your Plex Media server and stream it through your Raspberry Pi.
Optimizing Your Raspberry Pi
In the case that your Raspberry Pi stutters or lags and makes you unhappy with its performance, you can speed-up your system through a plethora of tricks.
Overclocking Your Raspberry Pi
OSMC allows you to overclock your Raspberry Pi safely. You just need to go to “My OSMC” and choose “Overclock”. Then, you need to change your profile to “Turbo” and the system will be overclocked.
Overclocking will not speed up your library importing times nor your navigating speed. However it will considerably speed up booting times.
Changing Your Resolution to 720p
If you don’t have a 1080p TV, or if you wish to stream content at a lower resolution in order to improve your performance, you can change your streaming resolution to 720p.
On Kodi, go to “Settings”, then into “System” and into “Video Output” to access the resolution menu and change it to 720p.
You can also change the Kodi interface resolution under “Settings > System > Video”. Reducing the interface resolution will make Kodi snappier and still allow you to play videos at Full HD.
Changing Your OSMC Skin
OSMC’s default skin is optimized for system performance, so changing it will not have an impact on your Raspberry Pi’s performance. However, you might want to spice things up a little bit and to change into a more aesthetically pleasing skin.
To do so, go to “Settings > Interface > Skin” and choose your preferred skin, download it and install it.
Disabling Kodi’s Thumbnail Extraction
Kodi will extract thumbnails from videos which do not have one in your library by default. This can have a high impact on your Raspberry Pi’s performance. If you’re experiencing lag, this is an option you should consider disabling.
To disable thumbnail extraction go to “Settings > Video > File lists” and disable “Extract thumbnail and video information”.
While you’re at it, you might also want to disable actor thumbnails. To do so go to “Settings > Video > Library” and disable “Download actor thumbnails when adding to library”.
That’s it. After following this guide you’ve successfully installed Kodi on your Raspberry Pi and optimized it to get the most out of your media center. If you have any questions during the process or if you’re having any issues, let us know in the comments below.
We hope you enjoy your new media center, and remember that there’s always more that you can do with your Raspberry Pi.
Petr is a serial tech entrepreneur and the CEO of Apro Software, a machine learning company. Whenever he’s not blogging about technology for itechgyan.com or softwarebattle.com, Petr enjoys playing sports and going to the movies. He’s also deeply interested about mediation, Buddhism and biohacking.