How to Install Kodi on the Raspberry Pi 3 running Raspbian
Kodi is a open-source home entertainment media center. It’s basically a Roku but a different flavor and more open. There are many programs and video add-on’s that you can add to Kodi compared to the Roku which is a closed source media center. Kodi is the new re-branded XBMC (Xbox Media Center). XBMC was originally designed for the original Xbox to create it into a media center. It has come a long way and no longer just run on the Xbox, you can run Kodi on your phone, computer, and as I will show you today, the Raspberry Pi. We will be using our Raspberry Pi to run Kodi and use it to stream our movies on our network.
There are many different tutorial out there for installing Kodi on the Raspberry Pi but many of the tutorials require you to be running a custom OS, today I will be showing you how to install Kodi on Raspbian. The reason I installed Kodi on Raspbian is because I already had my Raspberry Pi running Raspbian and had my web server and ad-blocking software running on it and it was right behind my TV. Instead of getting a dedicated Raspberry Pi I just installed Kodi along side my server. The Raspberry Pi is great for running Kodi, it has more then enough GPU and processing speed compared to the older versions of the Raspberry Pi and the performance is great. I recommend running Kodi on the Raspberry Pi 3. If you want to install Kodi on an older Raspberry Pi like the Raspberry Pi 1 or Raspberry Pi 2, you may get some lag when browsing the menu’s or playing back video and your overall experience will suffer.
To install the Kodi media center on a Raspberry Pi 3
You will need the following:
- Keyboard / Mouse
- Kodi Remote (You can use your cellphone as a remote)
Installing the Kodi Media Center on the Raspberry Pi is super easy and only requires one command to install it on your system. There will be a few configurations you will have to do after to make it work properly as well as updating Kodi if you would like. Run the following command in a terminal window on your Raspberry Pi, it can also be run over SSH:
sudo apt-get install kodi
That’s basically it. This will grab the latest stable compiled version of Kodi built for Raspbian. It grabs the files from the official Raspbian Repositories. The download should be around 200MB so it will take a while. It will also download some dependencies and install them. The whole process after running the command took me about 20 minutes on the Raspberry Pi 3, so you might want to walk away and come back.
Auto-start Kodi on the Raspberry Pi 3
Now once you installed Kodi and want it auto-start when you boot your Raspberry Pi you will need to edit the config file. You can manually start Kodi by just typing ‘kodi-standalone’ in the terminal. If you don’t want Kodi to start when you boot your Pi you can skip this step.
Lets edit our config for Kodi so that it can start when we boot our Raspberry Pi. Edit the config with the following command:
sudo nano /etc/default/kodi
There are only 3 settings in this file and we need to change the ENABLED and USER settings. Your configuration most likely has ENABLED=0 and we will need to change this to ENABLED=1 to auto-start. The next line that we need to change is the USER. If you USER line says ‘pi’ then you are good to go, mine had ‘kodi’ as the user to run Kodi as and I had weird issues with trying to change Kodi’s settings. We need the USER to be a root user and the ‘pi’ user works. Below is what the configuration file should look like when you are done. Be sure to save the file by hitting CTRL + X then Y to save it.
Important Raspberry Pi Boot Configs for Kodi
The following steps are crucial and need to be done to get proper playback on the Raspberry Pi. If you are having Kodi performance issues or Kodi is only playing audio and the video is black then it could be because of these settings in the Raspberry Pi’s /boot/config.txt’ file. Type the following command to edit the Raspberry Pi’s configuration file.
sudo nano /boot/config.txt
This file contains some important configurations for our Raspberry Pi. We can overclock the Raspberry Pi or change our HDMI or Audio settings. What we will be doing is scrolling all the way to the bottom of the file and creating 2 new settings. One for GPU_MEM and one for Start_X.
GPU_MEM is the GPU memory in megabytes. This value sets the memory split between the CPU and GPU. The CPU will get the remainer of the unused memory. We will be setting our value to 256 MB.
Start_X will allow codec’s to be enable so that you can playback video’s in Kodi.
Let’s go to the bottom of the configuration file and add the following 2 lines:
Now simply reboot with the following command and you have successfully installed Kodi on the Raspberry Pi 3.
Installing Kodi on the Raspberry Pi is very easy and will allow you to watch all your movies and music on your network with ease. There are many Kodi Add-on’s which will also allow you to stream the newest movies and TV shows as well. The performance of Kodi on the Raspberry Pi 3 is great. I found no lag and everything was very responsive. The best part is you can use your web browser or your phone as a remote to control Kodi. Just search your Android or IPhone’s app store for Kodi Remote. They should be free and very easy to setup and use. Be sure to enable the Web Server on Kodi if you want to use your phone as a remote.