Install Kodi on Raspbian

Do you want to turn your Raspberry Pi into a media center, but also need it for other tasks? Maybe you use your Pi for programming or playing Minecraft. It may have a role as a general project machine, which means you need to access Raspbian regularly.

One solution to this problem might be to have several microSD cards on hand, each with a different operating system. You might have one version with Raspbian ready to go, another with a retro game distribution, and a third with OSMC, OpenELEC, or LibreELEC. These are the three Kodi-based Raspberry Pi distributions and the most common solutions. It is quite easy to write one of them to the microSD card to set up your Raspberry Pi-based Kodi box.

 

Before proceeding, you must ensure that your Raspberry Pi is running the latest version of Raspbian, Stretch. You should perform upgrades on a regular basis.

If you are running an older version, you can download Raspbian Stretch from the Raspberry Pi website and flash it to your microSD card. How to install an operating system for your Raspberry Pi Here’s how to get a new operating system installed and running on your Pi – and how to clone your perfect setup for a quick disaster recovery. Read more . This is the recommended option, although a manual upgrade from Raspbian Jessie is possible. However, you may run into problems this way, and it’s always good to start with a fresh install.

If flashing doesn’t suit you, install Raspbian using the NOOBS installer.

If you have data on your Raspberry Pi that you will need later in Raspbian, make sure you back it up first.

Also, make sure you are using a Raspberry Pi 2 or higher. The Raspberry Pi 3 and the Pi Zero are both suitable. The Raspberry Pi Board Guide: Zero vs. Model A and B The Raspberry Pi Board Guide: Zero vs. Model A and B With so many different Raspberry Pi models, do you know which to buy? Our ultimate guide will tell you everything you need to know! Read more ; Unfortunately, the original Raspberry Pi Model B is too slow to run Kodi reliably.

 

Configuring your Raspberry Pi for Kodi

Before you install Kodi, you need to make sure your Pi is set up correctly. Three things need to be changed:

  • Expanding the filesystem (this should happen automatically the first time you boot Stretch).
  • Changing the memory allocation
  • Enabling video codecs
    In addition, you need to make sure Broadcom desktop drivers are set up.

All three of these things can be done with raspi-config. You can do this on the desktop via reach Preferences> Raspberry Pi Configuration, or in the command line:

 

If you have not yet expanded the file system and it was not done automatically at boot time (giving your Pi more space to run software), you should do so now.

This will improve the overall performance of your Kodi box, as there will be more space on the microSD card for installing add-ons and caching data. (By default, Raspbian is installed on a partition smaller than the microSD card).

To fully utilize the capacity of your microSD card, open raspi-config and select the first option, Expand File System. Select OK Confirm your choice and follow the instructions to reboot your Raspberry Pi.

 

Next, you need to change the memory allocation. Kodi on the Raspberry Pi 2 or Raspberry Pi 3 requires 256 MB for the GPU to run properly.

Run raspi-config again and then go to Advanced Options> Memory Split and set the split to 256 MB.

 

Enable video codecs

Finally, you need to enable certain video codecs that do not run by default. These include VP6, VP8, MJPEG, and Theora, among others. To do this, you must enable the camera. If no camera needs to be connected, enabling this feature will ensure that the codecs can be used.

Do this via Interface options> Camera> Yes. Confirm with OK. Note that you can also make this change via the config.txt file. This directory is located in the / boot / directory of your Raspberry Pi microSD card. It is the only directory that can be read under Windows.

To do it this way, open config.txt on your desktop computer and add the following:

start_x = 1

Save the file, exit the microSD card, and eject it safely before inserting it into the Raspberry Pi and rebooting.

Set the right desktop driver

The last pre-installation change you need to make is to the desktop driver. Kodi will not work if you do not use Broadcom drivers for your Raspberry Pi’s display. Therefore, you need to make sure that the default driver is set.

In raspi-config select Advanced options> GL driver and set Original non-GL desktop driver. Select OK to confirm, and reboot when prompted.

Install Kodi on Raspbian Stretch

In order to run Kodi on Raspbian, you need to start with the basics. Update the packages first and then check for updates:

sudo apt-get update
sudo apt-get upgrade

Once these updates are complete, you can install Kodi:

sudo apt-get install kodi

However, there is a bit more to it than that. Installing Kodi is only part of the challenge, as you’ll also need to configure it slightly. This probably works best on Raspbian, although this is by no means the only operating system you can use.

After Kodi has downloaded and installed, you will probably want to make some changes. This will ensure that you get the best performance out of the media center.

Optimize Kodi installation on Raspbian

Kodi should already work, but maybe not to your taste. You can make further adjustments, such as selecting some additional components or configuring Kodi to start automatically when your Pi boots.

To find out which binary add-on packages are available, run the following:

apt-cache search kodi

Scroll through the list to see what is available. For example, if you want to add joystick support and DVBLink PVR, use

sudo apt-get install kodi-peripherer joystick kodi-pvr-dvblink

You should now be able to control your Raspberry Pi Kodi box with a joystick and record live TV streams to a connected storage device.

To start Kodi after powering on the Raspberry Pi, you will need to edit the autostart file via SSH (as you do) or the command line on your Pi:

sudo nano ~ / .config / lxsession / LXDE-pi / autostart

Add the following line at the end:

@kodi

Then save the file and exit with Ctrl + X. The next time you boot your Raspberry Pi, it should boot directly into Kodi. When you exit Kodi, you will be taken back to the Raspbian desktop!

Leave a Comment

Your email address will not be published. Required fields are marked *