Dev Blog

Home Pi PicoSystem Dev Server OS & Networking Thoughts Misc Pi Microcontrollers C & Embedded Web Dev

Building a Pi Media Center

My partner and I have finally decided to ditch traditional cable/satellite services, our TV already has Netflix built in along with a range of others such as ITVX and Freeview, meaning we have a whole host of things to watch at our disposal even if we don't wish to fork out 120 moneys a year for Netflix. Furthermore, I firmly believe I can build something much better, that's more reliable, extendable and content rich while remaining relatively inexpensive.

The solution is a media center & NAS, that works over our network and can stream content such as video, audio or even large files across our network, internally and securely. I have actually been considering this for a while now and just in case it came to fruition, I bought a spare carrier board for a CM4/CM5 module if the situation ever arose and it seems like this is it's moment.

Why a Media Center?

The main reason is the price. Sure, the convenience is there, but functions such as play/pause and record are irrelevant with a media center as the files are hosted locally. We rarely watch live TV anyways, except for background noise which is a habit we can soon budge out of by streaming music instead. Sky sets us back over 400 moneys per year and I think I can build a decent media center for around 200 moneys. Saving 200 moneys in the first year and 400 thereafter.. Even with netflix it's still a massive saving, it's also fully upgradable and will always flow with current technologies.

Choosing Pi

Pi, will be useful as ever here. Compute Module would be perfect for the main media center and as the NAS. The power of the CM4 will be plenty, I did consider using a CM5 but considering the current price of them on eBay compared to the CM4, and the price of the CM5 on the PiHut (plus 20% tax and delivery charge) I opted for the less currently desirable CM4 which is (sure, less powerful than the beast of the CM5 which I use in my DevServer, but) still more than adequate for our current needs. Don't forget either, the CM4 & CM5 are drop in replacements for each other and the board I am using works with the CM5 too, I've tested it and can confirm the CM5 is fully compatible with the Waveshare CM4 Mini Baseboard C.

This setup will also be fully upgradable too, with a spare CM4 module going if I do upgrade, I can build another module to stream files from (or to, as backup), or a dedicated mini games center, another devserver... I could even buy a dedicated HAT and train AI with it. The possibilities are absolutely endless.

CM4 Module
The CM4 Module will be perfect for our purposes.

Inventory

Equipment I will need:

CM4 Module (4GB+ RAM)
Media Center/NAS

Pi4 (4GB+ RAM)
Streaming Module 1

1TB+ USB Hard Drive (file storage)
For CM4

Ethernet Cables (0.5m, 1m, 5m, 10m)
Smaller cables to connect devices to the switch and to the LAN, longer cables for Media Center connections

SD Card (for the Pi4)
Stores the Base OS for Streaming Module 1

Enclosures (cases for the CM4 and Pi4)
Prevents Dust and ESD

Equipment I own:

CM4 Carrier Board (Waveshare CM4 Mini Baseboard C)

Network Switch (4 Port)
8 port would have been preferable, but this switch is low power and 1Gbps over 100/1000Mps

PoE Injector
2 Port Injector that I think I can use to power the Pi4 for now.

Nailing a Bargain

Main Modules

Upon my quest to the land of Bay, I discovered a Pi4 with PoE HAT for sale. An absolute steal at 43 moneys considering the HAT itself goes for around 35. That went straight in the basket. I wasn't holding out much hope for a good CM4 module, but surprise befelled me when I stumbled on a CM4 module with 16gb of eMMC and 8GB RAM for 50 moneys. Now, this was good. Okay, 16gb of eMMc wasn't but that was immaterial as the carrier board has a 128gb nVME installed on it. It's RAM I need and at 8GB for 50 moneys I wasn't saying no. Basket for you. That's the modules sorted at 93 moneys, I quickly bought these before someone else did and then got back to shopping.

Pi4 & PoE
Pi4 with PoE (Power over Ethernet) support.

Hardware

Ethernet Cables were next on the list and I grabbed those in lengths of 25cm, 50cm, 1m, 5m and 10m, sufficient to connect everything to the main network switch in the living room, and our bedrooms connected. Hard Drives next, I want something that's budget and satisfactory for now and settled on an unbranded external 2TB USB hard drive at 18 moneys. Hard drives will be the next upgrade for the Media Center, so we can sacrifice this with a more budget friendly option for now in order to get the system up and running. The Pi4 required a SDCard for the operating system, so an SDCard of 32GB at 6 moneys was added to the basket, a Micro HDMI cable is also required here as the Pi4 does not support a full HDMI port, 3 moneys. Total hardware cost of 27 moneys

Enclosures

Enclosures are going to be important here, with the areas these modules being stored are high traffic areas and prone to dust. Pi4 will be easy to find a case for, but the Waveshare CM4 Mini Baseboard C is not. Project boxes are inexpensive and are great for the Compute Modules as I have previously discovered when building one for my CM5 DevServer. A 100x68mm box was added to the basket for 8 moneys, and a custom orange (fancied a change from black) Pi4 case at 4 moneys. That's the enclosures sorted at 12 moneys.

Quest Complete, +12 RAM

Shopping for a Module, Pi4 and everything else we needed turned out fruitful. This was definitely a right place, right time moment with the Pi4 4GB RAM + PoE HAT & CM4 8GB RAM at such a great price, way more ram than I bargained for and the PoE HAT is a nice addition, especially for later down the line when I upgrade our current switch to PoE. Although, I do own a tiny 2 port POE Injector, so maybe I can incorporate this somehow as it would save me having to find a USB cable and dedicate a USB plug to it. I have plenty of cables and a few spare plugs, but would like to keep the plugs spare so using PoE in this fashion is an option, I grabbed plenty of ethernet cables in my order, also.

CM5
CM5, a possible upgrade in the future.

The RAM is honestly great, and it opens up a whole host more of possibilities with not just the media center, but the Pi4 Streaming Module too. I have already eyed some replica NES and SNES USB controllers, just find to find a PSX one as a retro games center is definitely on the cards. I feel that 8GB of RAM not only allows us to explore PSX, but (legal) PS2 emulation too. At a total cost of 138 moneys, including delivery we haven't done half bad.


The media center itself can also be extended with a simple generic USB DVD/RW drive connected to the CM4 Module. Watching DVDs (extremely cheap to buy at all secondhand stores), as well as ripping them for use on the NAS would be completely viable. There are definite upgrades here, such a better external hard drives, SSDs or nVME drives. While not an upgrade for the media center itself, a larger ethernet switch is on the cards, especially one that is PoE enabled.

Well, that's it for tonight. Simply have to wait for it all to arrive and then assemble it.

Catch you next time,
Dru


Blog GitHub LinkedIn ORCID Stack Overflow