Media efficiency and cost effectiveness..

Media efficiency and cost effectiveness..

So if you are like me (and that might be a stretch...as I'm a complete tech nerd!!) you store a lot of your own media, in films and TV series and host your own media server. Think running your own Netflix with thousands of films and TV episodes on a NAS. Whilst this is great it does come at a significant cost, namely in running the NAS hardware and specifically in disks. To be serious about this you need to be at least running some form of RAID parity for protection, raid 5 being the most popular and least cost option. With a modest investment in 4 x 4TB NAS HDD drives (you need NAS specific disks) you are looking at a minimum spend of around £400.

When you are housing thousands of video and sound files it can chew through that total VERY quickly, so unless you want to get into constantly upgrading disks or deleting select items...you need to work smarter not harder.

This is where modern video codecs come into play. Most of the modern media over the last few years has been based upon the h.264 standard, however with the advent of streaming media a lot of research dollars have gone into ever more impressive compression ratios without sacrificing quality. Enter h.265 and AV1 onto the stage, both offer amazing compression rations with hardly any loss of quality, in fact both are now pretty standard for all of the online streaming giants and YouTube. They give them less bandwidth headaches and most importantly a hugely optimised storage estate.

So how can we take advantage of this? The most popular method of re-encoding video is the opensource ffmpeg. This, by default, uses CPU encoding which is both very slow and will consume a lot of power, making it both inefficient and costly. Luckily there are hardware based alternatives. Nvidia can do accelerated video encoding on all of it's high end cards (and some low-end P-Series cards). If you are looking at a modest video card they are still hugely expensive, mostly because a few years ago the global supply was drained by crypto-miners using GPU's to farm bitcoin, which drove the price up for everyone else. Since the bottom fell out of that market, the GPU price has come down somewhat, but is still extremely expensive, with the high end GPU's costing close to £2000!!!!!

So what can the budget conscious user do? Luckily there are cheap options. My personal favourite is Intel's on chip Quick Sync technology. This is hardware based encoding included in multiple CPU families going back to Haswell based architectures. If you're willing to shop about a bit you can find many second-hand systems with these older CPU's for literal pocket change. My personal favourite is Lenovo Tiny Thinkcentre M700 systems, which can be had complete for around £80-100. Not only are they cheap as chips, but consume a tiny power draw (35w) at full load. Running encoding they run at around 50%, so roughly 18w, making them exceedingly energy efficient and wallet friendly.

Once you have the hardware all sorted you need an encoder. Handbrake is an excellent choice (either on linux or windows) as it comes with both UI and cmdline options for doing ffmpeg jobs. My personal favourite is Shutter Encoder, which is windows only but allows for easy batch operations and is very easy to configure for h.265 hardware offload.

Assuming you setup the quality to good on the video stream you should achieve about a 30% space saving per file. Some are much less, others will actually consume more (if it's already h.265). It's very much trial and error, but if you take the time you can save terabytes of storage.

Other options for automated transcoding are tdarr, fileflows and Unmanic...all of which I've yet to try. Not only can all of these do automatic library processing, but they can also act in a distributed manor, with many workers contributing to a render farm for faster parallel encoding.

So rather than splashing out hundreds of pounds or dollars on bespoke GPU's, swallowing a large energy bill or forking out for a bunch of larger disks...you can recycle an old desktop PC, for little to no money, into a re-encoding system and possibly much more.