After so many posts about people getting problems on installing Kodi on Raspbian Buster, this is a complete guide on how to do it, and an attempt to keep things together in the same place. You will see that after all, it is not so hard.
In the time of the first Raspbian Buster image released by the RPi Foundation, like on previous Raspbian verisons, there was only available the generic Debian Kodi version (17.6 in this case) which is compiled against OpenGL, so not optimal to run on the RPi (at least by this time), it runs very slow.
But now, the latest stable version is available on the raspberrypi.org repo, compiled against OpenGLES, optimized for the RPi.
Latest stable version available on Raspbian:
Kodi 18.6 Leia
INSTALLATION:
To install it you just need to run the following command:
Code: Select all
sudo apt-get install kodi
Code: Select all
apt-cache search kodi
For example in this case, we will install the joystick support, IPTV Simple PVR and the inputstream addons:
Code: Select all
sudo apt-get install kodi-peripheral-joystick kodi-pvr-iptvsimple kodi-inputstream-adaptive kodi-inputstream-rtmp
Here are some more recommend binary addons to install (only for Kodi 18 and above):
-kodi-vfs-libarchive - compressed files support
-kodi-vfs-nfs - NFS support
-kodi-vfs-sftp - SFTP support
Alternatively and easier, if you are running Raspbian with Desktop, you can just open the graphical package manager "Dont know the name of it" on the upper left corner menu, search for "Kodi" and install the packages you want.
RASPBERRY PI 3 AND BELOW ONLY TWEAKS:
This is very important!
-Kodi on the Raspberry Pi 0/1/2/3 will only function if you are using the Broadcom drivers! This is the "Original non-GL desktop driver" on raspi-config, which is currently the default on the Raspbian images for the RPi 0/1/2/3. If you select the open-source OpenGL driver, it won't work!
-Kodi on Raspbian requires a minimum of 160 MB of RAM dedicated to the GPU to function properly! This can be done by running "raspi-config" -> "Advanced Options" -> "Memory Split" -> 160.
-If you have a RPi 2/3, the recommended is 256 MB of RAM for the GPU.
-Kodi 18 on the Raspberry Pi 2/3 supports 10bit video files (at least h264 and h265/HEVC) but they are software decoded. The Pi 3B / 3B+ may do 720p 10bit and 1080p 10bit low bitrate only at max! For that you need at least 300MB of RAM for the GPU.
-Raspbian by default, doesn't play some video codecs like VP6, VP8, MJPEG, Theora, etc, so to be able to play this codecs, you need to go to "raspi-config" -> "Interfacing Options" -> "Camera" -> Enable,
or just add a new line in /boot/config.txt with:
Code: Select all
start_x=1
Code: Select all
disable_auto_turbo=0
RASPBERRY PI 4 ONLY TWEAKS:
This is very important!
-Kodi on the Raspberry Pi 4 will only function if you are using the Open Source drivers! This is the "GL (Fake KMS) OpenGL desktop driver with fake KMS" on raspi-config, which is currently the default on the Raspbian images for the RPi 4. If you select the Broadcom/Legacy driver, it won't work!
-Kodi on Raspbian requires a minimum of 160 MB of RAM dedicated to the GPU to function properly! This can be done by running "raspi-config" -> "Advanced Options" -> "Memory Split" -> 160. The recommended for the RPI 4 is 320 MB.
-Kodi 18 on the Raspberry Pi 4 supports up to 4K h265/HEVC 10bit video files. HEVC HDR/10 bit is still not complete/optimal on the RPi 4, the playback may not be smooth and present "washed" colors. This may be fixed on Kodi 19.
-If you have a 4K monitor/TV, Kodi will automatically limit the GUI interface to 1080p, for a faster and better experience, since rendering the interface at 4K gives a considerable penalty hit. 4K videos will still play at that resolution whitout user interferance. If you want you can always change this going to Kodi -> Settings -> System -> Limit GUI size
-If you have a 4K monitor/TV, by default, the Raspberry Pi 4B will select a 30hz refresh rate. To allow selection of 60Hz refresh rates go to raspi-config -> Advanced Options -> Pi 4 Video Output -> Enable 4Kp60 HDMI or add a new line to /boot/config.txt with the following:
Code: Select all
hdmi_enable_4kp60=1
ADDITIONAL INFO:
Kodi package includes an ARMv6 (for the RPi 0 and 1), ARMv7 (for the RPI 2 and 3) and ARMv8 (for the RPi 4) binaries, which are autoselected accordindly to which version of the Raspberry Pi you have for best performance. Optimizations available in Open/LibreELEC like H265/HEVC NEON acceleration are also included and enabled automatically if you have a RPi 2/3/4.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
EXTRA INFO (not required for proper function):
RUNNING KODI WITH ANOTHER USER DIFFERENT FROM THE DEFAUL "PI":
If you want to run Kodi with a user different from the default "pi", that user needs to be part of the following groups, for everything to work fine:
audio, video, input, dialout, plugdev, netdev (needs confirmation), users, cdrom (only if you have cd/dvd drives) and tty (needs confirmation).
For that, run the following command:
Code: Select all
sudo usermod -a -G audio,video,input,dialout,plugdev,netdev,users,cdrom,tty "username"
AUTO-STARTING KODI AT BOOT:
Option 1 (without desktop):
If you want to auto-start Kodi automatically at boot, go to rc-gui on Raspbian desktop or raspi-config on a virtual terminal, and choose the option to boot to CLI/console.
Then copy/paste the following to a virtual termianl to create a systemd service for auto start:
Code: Select all
sudo tee -a /lib/systemd/system/kodi.service <<_EOF_
[Unit]
Description = Kodi Media Center
After = remote-fs.target network-online.target
Wants = network-online.target
[Service]
User = pi
Group = pi
Type = simple
ExecStart = /usr/bin/kodi-standalone
Restart = on-abort
RestartSec = 5
[Install]
WantedBy = multi-user.target
_EOF_
Code: Select all
sudo systemctl enable kodi.service
Option 2 (with desktop):
If you want autostart Kodi at boot but also keep the Desktop Environment on the background, just edit the file (with sudo) /etc/xdg/lxsession/LXDE-pi/autostart and add a line, preferably at the beginning of the file with:
Code: Select all
@kodi
SOURCE CODE:
The source code of this packages/binaries are available here:
https://github.com/PIPplware/xbmc
For the Raspberry Pi 0/1/2/3 binaries, the Kodi 18 Leia branch used is "leia_backports", and for the Raspberry Pi 4, the Kodi 18 Leia branch used is "leia_pi4".
Each of this branches are the original Kodi respective branch + popcornmix Raspberry pi patches/fixes/tweaks respective branch + some litle patches/fixes/tweaks for Raspbian.
If you have any problem, please include your Kodi log. Information on how to do it here: http://kodi.wiki/view/Log_file