Mon 31 January 2022 | -- (permalink)
So I've been playing with Kodi on a Raspberry Pi 4B as a media center. There turn out to be a lot of different ways to do this, documenting what I've learned so far in case it saves somebody else a bit of effort.
All of the following were on the same hardware, running Kodi Matrix.
OSMC
My initial experiments were with OSMC. This was also my introduction to Kodi, and I didn't really know the difference between them when I was starting with this.
I might have just stayed with OSMC since it was the first one I tried, except for one thing: video playback kept hanging, even for relatively simple stuff like an MP4 file on the local disk. Still don't know what this was about, attempts to track it down online were not helpful, just led to a bunch of random suggestions on settings to tweak, none of which really helped. Speculation was that this was a symptom of the OSMC release (Matrix) trying too hard to use hardware specific acceleration that's not really cooked yet for the Pi4. Sigh.
Leaving that aside, OSMC appears to suffer a bit from being neither
fish nor fowl: it's a Debian-ish Linux system, except that a lot of
the software isn't under control of the package system, so some things
one updates using apt-get
, others one updates via the Kodi
interface. Similarly, while handling the OSMC-specific settings in a
separate program (available via the Programs
menu entry in Kodi) is
sort of dictated by the Kodi architecture, OSMC's version of this
settings program feels like a bag on the side of Kodi held on with
binder twine.
Verdict: Inability to play video was a non-starter for me. Maybe the next release will be more usable.
Raspian / Raspberry Pi OS
My next attempt was using Raspian, or Raspberry Pi OS as it apparently now wants to be called. Specifically, I tried the Bullseye Raspberry Pi OS Lite image from the Raspberry Pi Website Downloads Page.
The choice of the "Lite" image (no GUI) was deliberate here: I was not
looking for a general purpose system, I wanted a basic system that
could run Kodi. So after installing the image and using apt-get
to
install Kodi, I wrote a systemd
unit file to run kodi-standalone
.
This worked pretty well, and was able to play videos without problems. Unfortunately, the Raspian version of Kodi is missing at least one of the plugins I really wanted (SFTP VFS support), and the Raspian packaging is different enough from the upstream Debian packaging that just building the Debian package doesn't work. Sigh.
Verdict: Usable if you don't need plugins it doesn't have.
Plain old Debian
After the Raspian attempt, I figured I might as well try real Debian
without all the Raspian tweaks, in the same kind of minimal install
with a systemd
unit file running kodi-standalone
.
The good news: while there is no official Debian installation
packaging for the Raspberry Pi, Debian developer Gunnar Wolf has put
together a very nice minimal installation, from which one can just
apt-get
whatever one needs, just like a normal Debian system.
Furthermore, the system for the Pi 4 is 64-bit, which Raspian doesn't
support. Very simple, very clean.
The bad news: Kodi doesn't even start on this platform. Speculation
on the Net of a Million Lies is that it's some kind of package release
skew, Kodi's package was updated just before somebody changed one or
more of the libraries it depends on and things haven't settled down
yet. I guess I could chase this, but it feels too much like $dayjob
to be much fun, so, nope, at least not today.
Verdict: Currently useless for Kodi, although the underlying Debian packaging for the Pi might be very nice for some other projects.
LibreELEC
And so, finally, we come all the way back to the other extreme: LibreELEC, a deliberately minimal system whose sole purpose is running Kodi.
Unlike OSMC, LibreELEC knows exactly what it wants to be, and
supports nothing else. This is a classic embedded system design: the
root filesystem is a squashfs
, the only user is root
, and root
's
home directory is the writable filesystem. We're not just talking
about BusyBox here, we're talking about a BusyBox configuration in
which somebody took the trouble to turn off diff
. If you want a
real text editor, you shut down the Pi, pop its MicroSD card into your
laptop, and use the editor there. Even OpenWRT isn't quite this hard
core.
For all of being so minimal, the integration seems smoother than OSMC, videos play, the SFTP plugin works, and of course Kodi itself does run. So we have a winner here.
Verdict: Works for me!
Remote Control
All of these (well, except for the Debian version where Kodi wouldn't
start) support the Kore
Android remote control app.
Welcome to Mos Eisley
One weird thing about the Kodi-verse: there are a lot of people playing in this space, and apparently some of them are not your friends. The Kodi project maintains a blacklist of people whose plugins they consider so evil that they refuse support to anybody who has them installed; they freely admit that such a blacklist will always be hopelessly out of date, but they try anyway. Interestingly, a lot of the web sites out there offering helpful instructions on how to set up Kodi tell you to install some of those blacklisted plugins; perhaps not coincidentally, a lot of those same web sites urge you to run all of your streaming traffic through a VPN.
Since I have zero interest in pirating content, this is mostly an annoyance: how does one navigate this minefield?
Bottom line: enjoy, but be careful out there.