This is a reproduction of the original topic which was accidentally deleted. For a copy of the original one see here:
https://web.archive.org/web/20190722103 ... 6&t=192499
Kodi on Raspbian Buster
For a temporary way to install Kodi 18.X on Raspbian Buster, only for Raspberry Pi 3 and below for now, see post #3 of this thread.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
INTRO:
After so many posts about people getting problems on installing Kodi on Raspbian, specially on the new Raspbian Stretch, 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 Stretch image released by the RPi Foundation, there was only available the generic Debian Kodi version (17.1) 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 repos, compiled against OpenGLES, optimized for the RPi.
Latest stable version available on Raspbian:
Kodi 18.2 Leia
INSTALLATION:
To install it you first need to update/refresh packages, and then install the main package. This can be done in a virtual terminal by running the respective commands:
Code: Select all
sudo apt-get update
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.
TWEAKS:
This is very important!
-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 now supports 10bit video files (at least h264 and h265) but they are software decoded. The Pi 3B / 3B+ may do 720p 10bit and 1080p 10bit low bitrate only! 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
ADDITIONAL INFO:
This is very important also!
Kodi 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. If you select the open-source OpenGL driver, it won't work!
Kodi package includes both an ARMv6 and ARMv7 binary, which is 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. There is no visible performance improvement in compiling Kodi for ARMv8 currently (like native compile for the PI 3).
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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
In this case If you are unable to mount/access disks and also have the options to reboot and shutdown missing, check this:
https://www.raspberrypi.org/forums/view ... 0#p1240007
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
Krypton (Kodi 17) branch used is "krypton_stable", for Leia (Kodi 18) it is "leia_stable", etc.
Each of this branches are the original Kodi respective branch + popcornmix Raspberry pi patches/fixes/tweaks + 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