I have been building home theater computer setups for quite some time. In the era of streaming services having an HTPC it is not as useful as it once was, and equivalent devices can be purchased “assembly not required” such as the Apple TV 4K or Vero 4K+. For me, building computers is something I enjoy doing and yields a sense of satisfaction–a much-needed avocation.
In between my last build project documentations and now, I have been using an early-generation Intel NUC with LibreElec installed on a flash drive. This worked marvelously for about seven years but recently started showing its age. With a lack of time to spend diagnosing more obscure hardware problems, and all other leisure activities fallen victim to COVID-19, I was motivated to start fresh.
Computer: Raspberry Pi 4 model B. Although it is a bit more expensive, I sprung for the 4 GB RAM version in the hopes of future-proofing a little and giving myself some headroom for more resource-intensive software.
Storage: 16 GB Class 10 MicroSD card. I made sure to get a Class 10 card for the faster write speed.
Case: Flirc Raspberry Pi 4 case. Every Raspberry Pi needs a case, and these guys build a nice aluminum one that can also act as a passive heatsink. Unfortunately, the all-black Kodi Edition I wanted was a limited edition that had already sold out.
Accessories: Flirc USB for using any remote to control the HTPC, official Raspberry Pi power supply, and a micro HDMI cable. Not mini, micro. The Pi 4 has tiny HDMI ports that need either an adapter or an A/M type cable to use.
OS: LibreELEC, a less-is-more installation that provides, in their words, “just enough OS for Kodi.”
Media player: Kodi, formerly known as XBMC. It’s a great open-source media manager and can play just about anything thrown at it. This is the original project that was forked to start Plex, the popular closed-source application.
First step was installing the Raspberry Pi into the Flirc case. They include a thermal pad that allows the CPU to contact a special portion of the aluminum case for heat transfer. The bottom of the case screws on through the Pi and holds it all together, with cutouts throughout for all the ports. This is the perfect case for anyone using the Pi as a computer, although less useful for hackers who want to wire things directly onto the board’s pins.
Next, I installed the OS onto the SD card using my laptop’s SD card reader. LibreELEC has a great little application for writing the OS to USB drives and SD cards. At the time, the current version was 9.2.1.
Kodi 18.6 (Linux Kernel 4.19.x) LibreELEC-RPi4.arm-9.2.1.img.gz
At this point, connecting the computer directly to the TV worked perfectly with all default settings, but of course, stopping there would be too easy. I have a slightly more complicated setup with the TV connected through an AV receiver (Onkyo TX-NR616), which promptly asserted itself as a bottleneck for 4K resolution output. To get a boot screen to display, I made a few changes to the Raspberry Pi’s config.txt (the complete file is also available for download).
# Force HDMI even if unplugged or powered off hdmi_force_hotplug=1 disable_overscan=1 hdmi_group=1 hdmi_mode=16
After getting the boot screen working, the screen was blanking once Kodi loaded. Turns out that by default, Kodi was trying to output 4K resolution which the receiver couldn’t handle. Since I couldn’t see anything, I used SSH to manually change the output resolution to 1920x1080p at 60 Hz, after which it worked perfectly.
A new addition I had never tried before was the Flirc USB device. I plugged it into my laptop and installed the software, pointed the remote at it and selected some buttons, and plugged the device into the HTPC. Voilà, I was controlling the computer with the TV remote. Highly recommended.
Once everything was working, it was time to test the system out. This morning, Rachel watched the first movie on it: Contagion.