Pages

Sunday 9 August 2020

LibreELEC on the Raspberry Pi

Whether you like watching streaming media from the internetz or just want a unified interface that looks good, is skinnable and can be adjusted to your needs to watch movies from a home server or from local drive, look at your photo collection or listen to music, then chances are you want a media center. Not sure if Windows XP Media Center Edition made the idea popular or if it was the advent of cheap broadband that made it viable - probably both.

As always, it didn't take long until free and open source implementations became also available. One of them was of course XBMC, the Xbox Media Center, later to be renamed to Kodi and easily the most popular choice due to its options, add-ons and extensibility. There are of course other choices and if you have a Playstation you might want to use that for all your media needs. But real movie junkies and binge watchers will want a media center in every room.

The need for a dedicated device

Thinking of devices one again has several options. We could install Kodi on a PC, even a dedicated PC, but that would be a waste of computing cycles and consumes far too much power unnecessarily. With the price of electricity these days, in some areas close to 0,30 Cents per KWH, that quickly racks up an additional $100 or Euros. There is your need for a dedicated device.
We have tiny Android boxes with their own custom Kodi setups just as much as the ones that give you a stock experience. The bonus here is they already come with a remote control so no need to use a mouse or get up. Problem is most of the time you don't know what exactly you're going to get or how good the quality of the hardware as a lot of them are manufactured in China. I've even come across reports of melting plugs and short-circuits caused. That said, the one box I had was very good and I heavily used it for about two full years. I guess the magic is to find a reputable supplier, or rely on your luck. Another option is to load Kodi on a Fire Stick. Yet another one would be to cast from your phone to a (so-called) smart TV. Or one could just install LibreELEC on a Raspberry Pi for about the same price as a Kodi box and have an extremely energy-efficient solution.

LibreELEC is a cut down OS and just enough operating system to run Kodi and it shows. I first tried both Raspbian and Debian on a Pi 3B+ via Noobs and loaded Kodi on them. Navigation and trying to load anything like add-ons was painfully slow, let alone trying to watch a movie. Pointless so don't even go there. What's needed is a trimmed base that leaves as much resources as possible to the main purpose so we can relax and watch something without stutter.

LibreELEC comes with the latest version of the Kodi media center and is available as a gzipped image custom-built for various arm processor boards and boxes (126-129 MB for RPi´s) and for the x86_64 architecture (243 MB) from the download page. It is updated frequently, the latest version is from June 2020. There's also a virtual image in open format that can be imported. Unfortunately the system uses systemd but that's another discussion. The important thing here is that it works. It's also available fine-tuned for particular devices further down that page as well as in their respective formats for Windows and MacOS but these will not be standalone builds.

Installation

What can I say. Installation is extremely easy, just select it in Noobs and off you go. No hassle, no fuss. You need a Micro SD card or a USB adapter. Easy as pi (sic) so to speak. Or download it from their site and write the image to your storage of choice. Reboot.

LibreELEC in action

The system is booting straight into the media center which is, being a stripped-down specialist distribution built for a single purpose, the only graphical interface it comes with and exactly what we want. So far so good. A few things are different from a stock Kodi install.

A welcome screen pops up and launches a dialog straight after booting into the interface where we can set the host name (default is LibreELEC), connect to a network and decide whether to use Samba file sharing or ssh remote access. The latter is for advanced users who wish to interact with the underlying operating system - handy for pulling in the VPN plugin with wget as you cannot simply add the repo in the file manager (OpenVPN is already installed). The default user is root with password libreelec. Samba is enabled by default. After this we find ourselves in the media center to add repositories, set up media directories and network shares, install add-ons and all the rest like setting up locations for the weather forecast or whatever you use Kodi for.

Access system settings in the lower left

The main screen has a LibreELEC entry added where the above as well as time servers, Bluetooth, updates and keyboard type and layout can be reconfigured. We can set a PIN code and enable the firewall for more security. This is as close to a configuration panel for non-Kodi related operating system settings as it gets here. It can also be accessed from the Add-ons section.

Network settings to enable time server and firewall

The latest version 9.2.3 is an incremental update and has added Wireguard support, general updates and improvements in terms of better hardware support for the RPi4. If wanting to watch 4k output on the Pi4 one needs to add 'hdmi_enable_4kp60=1' to config.txt.

Memory consumption
Very unscientifically, performance is a lot better than running Kodi on top of an OS implementation not optimized for multimedia taking up resources. A fresh LibreELEC system used 118 MB of RAM but expect that to increase with add-ons. With a few more add-ons installed, a different skin loaded  and a bit of activity RAM usage went up to a still very reasonable 145 MB. CPU temperature stayed at a low 39 C.
Contrast that with Raspbian running Kodi which used more than 700 MB and where video playback was choppy.

A fresh virtual amd64 image used 195 MB in Virtualbox without any add-ons.

I found version 9.2.3 to work fluidly and smoothly in content delivery and browsing on the 3 B+ and not in any way worse than running Kodi on more powerful machines. Actually better, if anything. After setting up we can disconnect the keyboard and the mouse as well if your TV's remote is recognized. That makes it as easy as any Android box. Or get a USB pluggable remote (Bluetooth?). With that or a wireless mouse we only have cables for power and HDMI sticking out, plus possibly some form of USB storage connected.

If on the other hand you already have a Kodi box LibreELEC can also be run on them from SD card, circumventing the need to boot into Android.

Conclusion

If you're into media consumption, and I'm using this loosely to include picture and photo galleries or listening to internet radio, this is a great way to make use of a Raspberry Pi and save on your energy bill in the process. It runs great on a 3B+ model but will even do well on the lower clocked 3B or on the 3A+ with 512 MB RAM - tried this and had RAM to spare.

You might want to consider purchasing one of the many USB dongle or infrared remote controls for the RPi or you could use a virtual remote to control your media center over the network from your phone or tablet.

Disclaimer: Screenshots taken in a virtual machine for illustration purposes only.

1 comment:

  1. This is a great article for Kodi, if you plan to use a Raspberry Pi or other small device, although it is now outdated with the current new release of Kodi. On the other hand, if you want to build a true media PC that is full-featured and fully capable of controlling all your movies, audios, videos and even gaming functions, you have to go way beyond Pi or Android.

    My unit is a small-form factor PC with an Intel Core2-Duo @ 3.00Ghz, 12GB's of RAM and a 128-SSD. Installed is Ubuntu with Kodi as primary function as default. I plan to build an NAS tower from an existing unit also with Core2-Duo but only 4GB's of RAM. Plan is to add 4 16-TB Seagate drives from Newegg. They run a little over $300/each. This should store and feed all the media I can possibly accumulate over the next several years, and then some.

    LibreElec_10.0.2 may be an option after I do some more playing around. I tried the next earlier release a couple months ago, but my PC settings at that time would not let me run it perfectly, and reboot was a mess. I have since corrected and Ubuntu/Kodi runs fine, so I look forward to trying the New LibreElec on another unit soon.

    ReplyDelete

Please leave your comment here. Spam will be deleted.

Note: only a member of this blog may post a comment.