James Newman October 6, 2023

Building your own media library

#media #disc #cd #dvd #Blu-ray #uhd #handbrake #makemkv #plex #jellyfin
Building your own media library

I’m a big proponent of physical media, be it games, video or music. The future of streaming does not sit well with me. My favourite shows are spread across multiple platforms, they can disappear at any point because of licencing, being written off as a loss, or any other controversy. There have even been instances where people have purchased digital copies of movies and shows from digital storefronts like Amazon, only to loose access over licencing. You are just buying temporary access to the media, or a long term rental.

The same applies to music, albeit less frequently, with songs and albums disappearing from platforms because of distribution agreements. Not to mention services like Spotify pushing more and more podcasts and audiobooks in my face, when I am simply not interested.

Over the past year or two I have been building out my own digital libraries from physical media. Purchasing Blu-rays and CDs on sale, on eBay, even from charity shops (£1 for Muse - Black Holes and Revelations, steal!). The chances are you, your family or friends already have a collection of media you can take advantage of.

This post walks through my process of backing up discs, processing, and consuming your own library. It’s not for everyone, but if you too believe in owning what you purchase, this might just be up your street.

Before I start, I want to emphasise the legal grey area around backing up disc media. This can depend on the region you reside in and its copyright laws.

We in no way endorse piracy.

Prerequisites

To start backing up your physical media, you’re going to need a few things:

  • Physical media to backup (This guide focuses on movies and shows).
  • A compatible reader for your computer.
  • Storage for the backed up files.

CDs, DVDs & Blu-rays

CDs and DVDs are the simplest, however DVDs come with the downside of lower quality compared to Blu-ray. Typically DVDs are anywhere from 352x240 to 720x766 (SD - Standard Definition), where as Blu-ray is typically 1920x1080 (HD - High Definition), but Blu-rays don’t support HDR, you’ll need to step up to UHD Blu-ray for that. Blu-rays also tend to include higher bitrate audio.

DVDs can contain up to 8.5GB of data, which is mostly likely with TV shows, but for you average movie, expect up to a few GB.

Blu-rays can hold up to 50GB, on average I’d say most movies are in the 30GB range from my own collection.

For backing up Blu-ray media, you’ll need a Blu-ray reader.

UHD Blu-rays

As the name suggests, UHD Blu-rays are Ultra High Definition, supporting 4K but also HDR, Dolby Vision, Dolby Atmos and DTS-X surround sound. This doesn’t mean every release has all the bells and whistles, but it is likely the best release you can get.

UHD Blu-rays can hold up to 100GB, on average I’d say most movies are in the 50-60GB range from my own collection.

For backing up UHD Blu-rays you’ll need to choose from a specific range of drives and flash them with a custom firmware to work. I personally use (and can recommend) the ASUS BW-16D1HT, however you can find a full list on the MakeMKV forums. There you’ll also find a guides and support for flashing the supported drives as it’s not something we’ll cover in this post.

Software

There is a number of options when it comes to software for backing up CDs, DVDs and Blu-rays, the most common being Handbrake and MakeMKV (the latter being my choice). If you are just backing up CDs, iTunes or Music as it has been rebranded to on Mac is still a valid option.

Handbrake is also great for re-encoding the backed up file, to compress, change resolution or format.

How I Backup Discs

Currently I use an ASUS BW-16D1HT on my home server connected directly via the motherboard’s SATA connectors. This is then passed through to the MakeMKV docker container in Unraid via device path, /dev/sr[id] and /dev/sg[id]. I previously used a cheap PCI SATA card to pass the device through to a VM, specifically on Proxmox.

This works great most of the time. However, occasionally MakeMKV either can’t read a disc or just doesn’t see a disc. So far I’ve found two solutions:

  • Stop the MakeMKV container or VM, open the drive and remove the disc. Then start the container or VM again, letting MakeMKV load up before inserting a disc.
  • Remove the disc, shutdown the entire machine wait a few seconds. Optionally, unplug the power cable, press and hold the power button for a few seconds, then plug it back in (I’ve only needed to do this once). Power up the machine again, start the container or VM, and then insert the disc.

Unfortunately, the files you’ll see on the disc in MakeMKV aren’t usually named in a helpful manor. Usually, I uncheck the smaller files, these are typically disc menus, extras or specials. If it’s a movie, there maybe multiple versions of the same movie on a disc.

Click the drop down to reveal what language audio tracks and subtitles are available as sometimes these can be for different regions. You can also deselect any audio tracks and subtitles you’re not interested in. Otherwise, it might be a version with commentary, or an extended cut which is usually mentioned on the box.

It’s worth noting the file that is backed up from the disc is a 1:1 copy, it has not been re-encoded or altered in anyway.

File Naming

In most cases the files aren’t going to be named in a helpful manor. For movies, this shouldn’t be an issue as the big long files going to be the movie. But for shows, this becomes bit of an issue, and to add salt to injury, they’re not usually in order either.

I’ve not found a straight forward or easy way around this, it’s manual work and bit of a chore. However, there’s some resources that can help.

  • DVDCompare - They have a huge collection of physical media, the releases and usually the lengths of each episode. However these can be unreliable at times, or just missing.
  • IMDB and TMDB - These two sites have the cast, crew and still images from each episode. You can then use these to identify which episodes which.

I think there’s a space here for some cool “AI” program to identify credits, or still images in each episode to name, but I’ve not found anything. I’ve considered using image mapping in ffmpeg to find still images in video files, but ultimately decided doing so would take too long to process and be resource intensive.

Another handy bit of software here is FileBot, it’s a powerful renaming tool designed for movies and TV.

It’s also worth highlighting that different media servers (Plex, Jellyfin, Emby) have naming conventions for specials, extras, trailers and extended cuts. Naming them correctly will enable them to be shown correctly in your media server.

Transcoding & Compression

Transcoding and compressing your output files is a rabbit hole of its own and something I am still tweaking, tuning and figuring out. It is slow and resource intensive, but depending on energy prices and storage prices in your region, it can save you a lot of money on storage.

Before starting, it’s worth noting there is occasions you may want to keep the original file, such as rips with Dolby Vision and Dolby Atmos. While you can find ways to re-encode these, it’s very tricky. And even with beefy hardware, transcoding 4K is a real slog. Usually I encode 1080p media, opting to keep 4K content untouched (usually movies).

I would recommend using a tool like Media Info to inspect the original and compressed files. Doing so will help you to identify bitrate, colour space, audio channels, subtitles and much more. Using this information you can fine tune the profiles you use in tools such as HandBrake.

There are a number of factors that effect the output of a transcode, the areas of focus being transcode time, quality and file size. Generally speaking, the higher the quality, the longer the transcode and the bigger the file. Want a faster transcode? The lower the quality and larger the file. It’s about finding the sweet spot that works for you and your library.

Of course there is hardware acceleration however I have personally found the results lacking. Sure it is fast, but the quality is pretty bad, not to mention the unimpressive file sizes.

Settings

Video:

  • Video Encoder: H.265 (10-bit for HDR content), which runs on the CPU.
  • Framerate: Same as source.
  • Quality: Generally around RF18, or RF21 if I’m less concerned. If I really want to keep a higher quality, I will opt for RF16 or set an average bitrate of 18000kbps.
  • Preset: Slow, always. This makes a big difference to the quality and file size.

As for audio, I usually opt to pass through a 5.1 and stereo channel.

I would also recommend keeping the subtitles for your language. Most importantly you’re going to want to keep “Foreign Audio Search”, as this will add the relevant subtitles for foreign languages spoken in the media, for example an American movie with a character speaking Spanish on a phone. Choosing “burn-in” will burn the subtitles into the video, meaning you can’t disable them.

There are of course many other options you can play with and fine tune, but these settings should give you a good starting point. Also consider where you intend to playback the media, is directly on a mobile device or via media server. Depending on this, you will need to take into consideration format, resolution and file size.

Playback

Now you have a digital backup of your media it’s time to enjoy it! I have been a long time user of Plex, while Blag is a long time Emby user, but there are plenty of other options out there such as Jellyfin, which is a fork of Emby that has quickly grown in popularity.

The benefit of using a media server such as these is that it allows you to stream your library to most devices, both at home or on the go, along with a sleuth of additional features, many that aren’t even included in many streaming services.

Depending on the media you are playing back, you may want to compare the features of each media server to make sure they cover your needs, i.e. HDR & Dolby support if applicable.

As mentioned I use Plex and paid for the lifetime Plex Pass which goes on sale a few times a year. For me Plex offers the best support and features, with apps on just about every ecosystem, from mobiles, to TVs, to consoles. They even have a nice app called Plex Amp, dedicated to music libraries which I have started to use while growing out my music library.

Some features however are quite buggy, such as offline downloads not syncing properly and “Watch Together” playing back the wrong episode. It is a bit frustrating with the recent focus from Plex being on their own library of media and channels. Plex, please focus on core of your business and users once again. But with that said, I do think Plex still offers the best home media server solution.

Conclusion

Building out your own media library can be somewhat laborious, but absolutely rewarding too. Not only can you access the media you own any point from basically any device you own, it’s likely in a higher quality than you would receive from a streaming service. But more importantly, at least to me, is that it’s not going to disappear over night.

From watching 4K HDR movies at the best quality, to enjoying shows with my partner while we are both in different cities, owning my media library has been a game changer.


More Recent Articles