Skip to content

Instantly share code, notes, and snippets.

@crwolff
Last active November 9, 2023 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crwolff/6af2948f73dfeecb2ef868e506ebb561 to your computer and use it in GitHub Desktop.
Save crwolff/6af2948f73dfeecb2ef868e506ebb561 to your computer and use it in GitHub Desktop.
Kodi on Raspberry Pi 4B / Raspios Bookworm / MCE remote

Initial installation on Pi console

  • Install 64-bit Raspbian lite (2023-10-10-raspios-bookworm-arm64-lite.img)
    • Setup WiFi
    • Create user (for SSH)
  • Run raspi-config
    • Set hostname
    • Boot to console requires login
    • Enable SSH server
  • Reboot

From a remote computer

% ssh hostname
% sudo su
# apt update
# apt dist-upgrade
# apt install kodi kodi-inputstream-adaptive kodi-pvr-mythtv lirc lirc-compat-remotes
# adduser kodi
    * All defaults - If no password set, account can't be logged into (not required for kodi)
# usermod -a -G audio,video,input,dialout,plugdev,netdev,users,cdrom,tty kodi
# 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 = kodi
Group = kodi
Type = simple
ExecStart = /usr/bin/kodi-standalone
Restart = on-abort
RestartSec = 5

[Install]
WantedBy = multi-user.target
_EOF_
# systemctl enable kodi.service
# sed -i -e 's#^include.*#include "/usr/share/lirc/remotes/mceusb/lircd.conf.mceusb"#' /etc/lirc/lircd.conf
# sed -i -e 's#^driver.*#driver          = default#' -e 's#^device .*#device          = /dev/lirc0#' /etc/lirc/lirc_options.conf
# sed -i -e 's#Cmnd_Alias KODI_VT.*#Cmnd_Alias KODI_VT = /bin/fgconsole, /bin/chvt, /usr/bin/openvt *#' /etc/sudoers.d/020_kodi
# sed -i -e 's#^dtoverlay=vc4-kms-v3d#dtoverlay=vc4-kms-v3d,cma-512#' /boot/config.txt
# shutdown -r now

In Kodi

  • Install addons
  • Enable DRM Prime decoding (Settings->Player->Video expert setting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment