2023-06-20, 03:09 AM
(This post was last modified: 2023-08-01, 04:43 PM by Perseverant. Edited 24 times in total.)
Introduction
So you're new to this whole media server thing and you have some DVDs or Blu-rays you want to put on your Jellyfin server. What's the best way to go about that? What software will you need? What challenges might you run into? As you can see by the amount of content in this guide, there's a lot to it, but it's long because it's designed to be understandable to someone who is very new to media servers. My hope is that this guide will make what can be a technically challenging process more approachable and that you'll come away knowing what order to do things in, and the best tool for each job.
First, a couple of quick disclaimers:
Hardware
If you're just backing up DVDs, or you just have a small handful of non-UHD Blu-rays, you might be okay with any old Blu-ray drive. But, if you have a large collection you want to archive, you will eventually run into some discs that just won't rip, as I did. In that case, you might want to invest in a drive that can be flashed with custom firmware, which allows you to rip any disc. There is a full guide on the MakeMKV forum.
Note: If you find the prospect of flashing your own drive intimidating, then there are users over there that will sell you a pre-flashed drive, but it's really not a difficult thing to do yourself.
Other than that, the only real consideration hardware-wise is the strength of your CPU and whether or not your CPU/GPU support hardware encoding. We'll get into encoding later.
Software Workflow
Below, you're going to learn how to rip media off of your discs, organize the clips that were ripped, name the various audio/subtitle tracks within those clips, and optimize their file size by transcoding them. Each section explains the tool(s) you need, and the various challenges you might run into along the way. It can be helpful to see real-world examples, so at the bottom of each section will be a "Case Study" area where we gradually walk through the archival of Toy Story, step-by-step.
1) Establishing a Staging Folder
You'll want a directory to "stage" your data in (i.e. store it temporarily) because it needs to be organized before it's moved to your Jellyfin server. The most favorable location is a hard drive on the PC you're ripping the disc on. You wouldn't want to use a network share for staging, such as a folder on a NAS, because transferring the files through your network would slow everything down. I have a folder named Staging and within that I have a folder named "Movies" and a folder named "Shows" and from there I follow the folder structures recommended in the official documentation for Movies and Shows. You'll want to look up your media on TheMovieDB.org (TMDB) and name your media to match what's on there, because Jellyfin uses TMDB to pull its metadata.
Case Study 1:
We've made our folder structure of ...Staging\Movies and within that we've made a folder named "Toy Story (1995)", because that matches TheMovieDB.org page for the film.
2) Ripping Discs
MakeMKV is the gold standard for ripping DVDs and Blurays.
It produces files with an MKV extension out of any video files on the disc. MKV, like MP4 and AVI, is a not a video format, but a type of media container. Think of a media container like a bookshelf where you have shelves for video, audio, subtitles, and chapters. You can have multiple video, audio, and subtitle tracks and they can be encoded in all manner of formats. One MKV might have x264 video with PCM audio. Another might have x265 video with AAC audio. The MKV container just houses them. Of all of the containers, MKV is the most versatile and the easiest to work with, because you can edit them with ease. More on that later.
For now, there are a couple of things you should know about MakeMKV. It is "free while in beta" and has been "in beta" for many years, but it works excellently. However, the free registration keys expire every few months. You can get the latest key from this forum post, but just know that when it expires, it sometimes takes the developer a few days to update the page with a new key. Please don't harass the guy - just plan around it. Alternatively, you can buy the software and never have to worry about it again. It's a great way to support his work, and in the unfortunate event something were to happen to the developer, you'll still be able to keep using the software.
A few things to know before you start ripping discs:
We've put our bluray of Toy Story into our disc drive and MakeMKV has recognized the disc:
Click the photo of the disc drive and it will begin loading all of the clips on the disc. After a minute or two we'll have a list of files. If you so choose you can deselect certain files. You can also opt to exclude certain audio and subtitle tracks here, but I'd recommend leaving everything defaulted and handling the particulars later on in step 5.
Once we've set our file path, we can click the button with the green arrow. This step can take upwards of 1.5+ hours depending on how much there is to rip, and MakeMKV will have a notification popup when it's finished.
3) Curating Your Media Pt. 1 - Organization and File Naming
When MakeMKV rips the files, they aren't labeled nicely as they might be in the disc's menus. They'll just be a numbered list of files in the folder you specified.
This is the part where you determine what you want to keep (like the movie and special features) and what you want to trash (like advertisements and fbi warning messages). If you only care about archiving the feature film, then your task will usually be fairly straightforward, but if you want all of the special features as well, you're in for a lot of work; sorting through the sometimes 100+ files ripped off of the disc makes this the most time-consuming step. Within the staging folder for the movie/show, I usually create one folder named "junk", where I store the files I intend to delete, and another named "extras", where I store special features. It's better not to delete the "junk" files until the end because sometimes you realize you missed something or picked the wrong file between two similar files.
One tool that can tremendously shorten your work time is DvdCompare.net
Here, you can look up the film you want details on and there are lists with timestamps for the various special features. You can just play the video file on your PC, search the DvdCompare page for the length of the clip, and then name the file accordingly. If there is no DvdCompare entry for your media, you'll probably want to play the disc in a DVD/bluray player and manually go through the special features to visually compare the clips on the disc with the clips you've ripped. I prefer the special features match the order on the disc, so I take photos of the disc menus with my cell phone and prefix each special feature with 01, 02, 03 so that they sort on the file system the same way they do on the disc. Jellyfin doesn't sort special features alphanumerically at this time, but I hope they will in the future.
Case Study 3:
Our disc has finished ripping and we now have 155 files in our Toy Story folder. Disney/Pixar films in particular can end up having an enormous number of files to go through, but other films can have just a small handful of files.
As shown earlier in this section, there is a a great entry on DvdCompare.net for Toy Story (with timestamps that are a little off). But, what would we do if we didn't have that information? While the disc is in the drive, we can take photos of all of the menus so we know what to name the files. I usually do audio first, subtitles second, and special features after that. You can do this in just a minute or two with your cell phone:
After going through the files, we have taken the 155 files we started with and ended up with 1 film, 27 extras, and 127 "junk" files comprised of advertisements, sub-clips of longer "play all" files, localized clips for other languages, FBI warnings, bluray disc menu backgrounds, and anything else we don't care about.
4) Curating Your Media Pt. 2 - Ripping Oddities
You can think of this section as a troubleshooting guide for MakeMKV. If you're very new, and just trying to form a general understanding of the overall process, you're probably best off skipping this section for now and coming back to it later. But, if you're in the thick of it, these examples could save you a headache; they're situations I've run into enough that they're worth mentioning.
MakeMKV will basically rip every combination of things it can find on the disc. It's not a flaw in the software as much as it is the unusual way content is stored on the bluray discs. Nevertheless, it makes sorting out what you want to keep even more chaotic and time-consuming. Here are some common scenarios to watch out for:
In the first screenshot of case study 3, we can tell from the file sizes that the feature film ripped three times. Why is that? If we play each of them, we'll see that their lengths are 1:21:27, 1:21:27, and 1:21:04 respectively. Usually, a film will be longer or shorter because of something at the beginning or the end of it, so if we check all of these, we'll see that the reason the first two are longer is because they have additional credits tacked onto the end after the Pixar lamp outro. If we look at the second screenshot in case study 3, we can determine why that is. The film is available in English, French, or Spanish. If we choose English, we get the film that is 1:21:04, but if we choose French or Spanish, we get one of the two 1:21:27 films with the extra credits for the language localization. Mystery solved! Since I'm an English-speaker I now know which one to keep, and which ones to put into my "junk" folder (but we won't delete them just yet, because of what we're doing in the next step).
5) Curating Your Media Pt. 3 - Multiplexing
Multiplexing, or "muxing", in this context is where you edit the component parts of your MKV files. Specifically, you're modifying, adding, or removing the tracks within the MKV container. The tool you'll use to do this is MKVToolNix and it's very user-friendly.
You can drag and drop, you can check and uncheck the tracks you want, and when you're done, you just click "Start multiplexing" at the bottom and it'll spit out a new file that contains the alterations you've made. Even if you made no alterations at all, the resulting file will usually be smaller, because MKVtoolNix removes certain elements that are not necessary for playback, but take up space (more info here, if interested).
Here are the most common operations I do with this tool (none of which require re-encoding):
Now it's time to name and sort the tracks for the film we've kept. We can reference the screenshots of the disc menu to give us some idea of what to name them. For the audio and subtitle tracks, you'll want to play the file in VLC and check them. Many people might decide to remove all tracks except the "English 5.1 DTS-HD Master Audio ES" or might like to name them differently than I did. That's a personal call that's up to you. For the sake of comparison, I left the track order the same as the "before" image earlier in this section, but I normally group all of the English tracks/commentary at the top, then alphabetize all other languages after that:
6) Transcoding
Transcoding is when you transform a video clip from using one encoder to another. You can think of encoders as the programming behind how a video is being compressed. We need compression because without it video files would be enormous.
A video clip might start out as an MPEG or an x264 clip and you might want to encode it in x265. The downside of transcoding is processing time and some level of quality loss (though it can be very small to the point of near-indistinguishability). The upside can be a tremendous reduction in file size. For example, animated films like Tarzan can go from over 20GB to less than 8GB with virtually no loss of quality. Epic films like Lawrence of Arabia can drop from almost 40GB to 28GB. The films that seem to benefit the least are ones with lots of film grain, which might only shave off 1-2GB.
The tool of choice here is Handbrake. I won't cover all of the ins and outs of Handbrake here, because there are plenty of other resources on the web to help with that, but I will cover enough for you to get started.
The main encoders you'll probably be interested in are:
x264 - This is broadly compatible and encodes fairly quickly, but will have larger file sizes than alternatives
x265 - This can result in very compact file sizes with minimal loss of quality, but its encode times can be very long
AV1 - This is a new contender and one that I've not personally worked with. Time will tell how popular it ends up being.
Hardware Encoding vs. Software Encoding
Hardware encoding can be FAST, but you might not see much of a reduction in file size, and video quality can suffer. If you're using settings that utilize Intel Quick Sync, or nVidia's NVENC, then you are using hardware encoding. Software encoding is SLOW, but you will see the greatest quality retention, and the greatest reduction of file size at a given quality level with software encoding. Where you choose to land depends on how powerful your PC is, your patience level, and your priorities. Some choose not to transcode their video at all, but they'll need larger servers to store it all. My philosophy is "suffer now and benefit later", so I transcode for excellent quality at the smallest filesize, which means a single 1080P film can take 1-5 days to transcode on my i5-13600K CPU. Handbrake can be a rabbit hole, and there are plenty of resources online to teach you about various encoders and Handbrake settings, but if you want to just do what I do and forget about it, I've attached four presets in the file named "Handbrake_Presets.zip". We warned, though... I'm not exaggerating when I say encodes will take a very long time!
Things to know about Handbrake:
1) Setting your Default Path - To to Preferences>Output Files> and put this in the default path (without the quotes): "{source_path}\transcoded" By doing this, Handbrake will always drop your transcoded items within a folder named "transcoded", in the source directory. I would also set File Format to (again, no quotes) "{source}"
2) Power Outages and PC crashes - There is no way to resume an encode if it gets interrupted, so if you're 2 days into an encode and your PC loses power, that 2 days is lost. You'll need to reset the queued item and restart the queue. Knowing this, you might consider buying an uninterruptable power supply (UPS) to prevent power loss during outages. If you're transcoding multiple files in parallel, then it also makes sense to run the minimum number of jobs necessary to utilize 100% of your CPU, in order to minimize data loss. The more jobs you run, the slower they'll run on-average and the longer they'll take to finish, which increases the risk that they get interrupted many days into encoding. As an example, let's say you have 6 jobs in the queue you're trying to get through and you lose power on day 3. If you run 2 at a time you might be able to finish 2-per day, so you'd get through files 1 and 2 on the first day, files 3 and 4 on the second day, and on the third day files 5 and 6 would be interrupted. But hey, it's not a total loss! You got through 4 of your 6 files. If you ran all 6 in parallel, it'd take 3 days to get through all of them. They'd all be encoding on day one, still encoding on day two, and then on day three they all get interrupted and you've lost ALL progress. Running fewer jobs faster reduces your risk of loss. You can alter the number of files that can encode at once via Tools>Preferences>Advanced>""Maximum number of simultaneous encodes"
3) PCM Audio - Handbrake has no support for PCM audio passthrough, so if you're like me and you don't transcode audio tracks, you'll find that your PCM audio has been stripped out of the resulting files. When I have files with PCM audio I just transcode video-only and multiplex all of the other tracks back in after the fact using MKVToolNix
4) SRT Subtitles - Handbrake will automatically convert SRT subtitles to SSA/ASS format without any option not to. To say I was annoyed to discover this very far into populating my media server would be an understatement. This unavoidable "feature" cost me hours of work going back and replacing the unwanted SSA subtitles with the SRT files they should be. So, consider yourself warned! You'll have to multiplex SRT files in after transcoding.
5) Tags - Handbrake adds tags within your MKV files. I find them annoying, but there is no way to disable them. You can set MKVtoolNix to always disable tags and global tags in your preferences and just multiplex the tags out. To do this, follow this menu path: MKVToolNix GUI>Preferences>Multiplexer>Enabling items and remove "Global tags" and "Tags" from the selected box using the arrows. Even better, you can run batch files to remove tags for all items in a folder. I've included said files as an attachment at the bottom of this post named "Multiplex_Batch_Files.zip". Just drop the .bat files into the folder with the files you want to multiplex and double-click it to process everything in the same folder. One is an example file that you can modify for your own purposes, another will remove tags and also rename the internal name of the file that shows up in the file properties, and another will only multiplex and remove tags without changing the name. Even if you don't care about tags, multiplexing your files one more time after transcoding is a good idea, because it tends to shrink them all, saving even more file space.
6) File Size - There are occasions where files can end up LARGER than the source file after transcoding. As such, it's good practice to compare your transcoded files with the original files. In such cases you can either opt to keep the smaller original files, or try encoding them at a lower quality a second time.
7) Idling/Overnight Encoding - If you're using your PC as a 24/7 transcoding box, you want the CPU at 100% at all times. However, I've seen an issue on my PC where the CPU will drop to around 45% utilization if it's been left idle for long enough. This can happen even if you set my PC to never go to sleep and to never idle the hard drive. And yes, this can happen even if you go into the advanced settings of Handbrake and check the box labeled "Prevent the system from sleeping while encoding." There is a solution to this problem: When you are done working on your PC and want to leave it for the night, you must click on the main handbrake window, or the queue window to make it the active window. As long as a handbrake window is the active window, the CPU will stay at 100% utilization without interruption.
Case Study 6:
I'm going to assume you've imported the Handbrake presets attached to this thread for the sake of simplicity. Since Toy Story is an HD film, I'm going to select the "HD x265 No Crop (Passthrough All) Very Slow" preset, click "Open Source" in the upper-left corner, and drag the film into the box. Once that's done, I'll click "Add to Queue" along the top of the window. For extras, we don't want to add them one-by-one, so we'll click "Open Source" again, drag the extras folder into the box, and instead of clicking "Add to Queue" we'll click the tiny arrow to the right of those words and select "Add All" from the list. By doing it this way, it adds every file in the folder to the queue. Note that the "Add All" feature only adds items at the first level of a folder. If you had a folder within a folder, the files within the nested folder would not be added.
In this case, we have a mix of HD and SD extras, so if you really want to optimize things you could use a tool like MediaInfo to determine the resolution of each clip, and use the HD preset for the HD clips, and the SD preset for the SD clips. As far as my presets go, the only difference between them is the quality setting (you'll usually want to set SD clips to higher quality to retain as much detail as possible).
Now that we have our queue loaded up, we can click start and get to transcoding! Here's what things will look like in the queue once it's all done. I've clicked on the statistics tab in the queue so we can see the details of the encode:
Time for a little math to determine how much space we saved by transcoding. The original movie and 27 special features had a total file size of about 32.45GB. After transcoding, that number drops to about 13.80GB, or just 42.54% of the original size. If we multiplex our files once more after transcoding, we reduce the size even further to about 13.58GB, or just 41.86% of the original size.
...but what about quality? Who cares about file size if it looks bad, right? Seeing is believing, so click the following link and slide the bar back and forth to compare the video quality before and after transcoding. There is an ever-so-slight softening of detail in the transcode, but it's difficult to notice, and remember that this is a single still frame! In motion, I truly think that no one would be able to accurately point out which one is the original. Keep in mind that this is if you're patient enough to use the Handbrake presets I've attached to this thread. Most people aren't willing to wait 1-2+ days for a single film to transcode and use presets that result in larger file sizes and/or poorer quality.
7) Transfer Files to Jellyfin Server
Time to move those files to your server! You can use software like TeraCopy to do this if you like, since it has a verification step to make sure everything transferred correctly. If you structured your folders and files correctly as mentioned in step 1, Jellyfin will automatically pull all of the metadata for the film, as shown below
...and you're done. Enjoy!
Other Helpful Software
(Coming soon!)
Conclusion
Any comments, corrections, or ideas? Post them below! I'm not saying this is the only way, and "best" will be different for different folks, but I hope this has made your journey a little easier. Thanks for reading!
So you're new to this whole media server thing and you have some DVDs or Blu-rays you want to put on your Jellyfin server. What's the best way to go about that? What software will you need? What challenges might you run into? As you can see by the amount of content in this guide, there's a lot to it, but it's long because it's designed to be understandable to someone who is very new to media servers. My hope is that this guide will make what can be a technically challenging process more approachable and that you'll come away knowing what order to do things in, and the best tool for each job.
First, a couple of quick disclaimers:
- This isn't a guide for setting up Jellyfin itself, only for extracting and transforming your media. Hopefully one of our other members is up to the challenge of writing such a guide!
- I don't support piracy. The expectation is that you own the media you are archiving, that you are using it for personal use, and that you hold onto the physical copies after backing them up.
Hardware
If you're just backing up DVDs, or you just have a small handful of non-UHD Blu-rays, you might be okay with any old Blu-ray drive. But, if you have a large collection you want to archive, you will eventually run into some discs that just won't rip, as I did. In that case, you might want to invest in a drive that can be flashed with custom firmware, which allows you to rip any disc. There is a full guide on the MakeMKV forum.
Note: If you find the prospect of flashing your own drive intimidating, then there are users over there that will sell you a pre-flashed drive, but it's really not a difficult thing to do yourself.
Other than that, the only real consideration hardware-wise is the strength of your CPU and whether or not your CPU/GPU support hardware encoding. We'll get into encoding later.
Software Workflow
Below, you're going to learn how to rip media off of your discs, organize the clips that were ripped, name the various audio/subtitle tracks within those clips, and optimize their file size by transcoding them. Each section explains the tool(s) you need, and the various challenges you might run into along the way. It can be helpful to see real-world examples, so at the bottom of each section will be a "Case Study" area where we gradually walk through the archival of Toy Story, step-by-step.
1) Establishing a Staging Folder
You'll want a directory to "stage" your data in (i.e. store it temporarily) because it needs to be organized before it's moved to your Jellyfin server. The most favorable location is a hard drive on the PC you're ripping the disc on. You wouldn't want to use a network share for staging, such as a folder on a NAS, because transferring the files through your network would slow everything down. I have a folder named Staging and within that I have a folder named "Movies" and a folder named "Shows" and from there I follow the folder structures recommended in the official documentation for Movies and Shows. You'll want to look up your media on TheMovieDB.org (TMDB) and name your media to match what's on there, because Jellyfin uses TMDB to pull its metadata.
Case Study 1:
We've made our folder structure of ...Staging\Movies and within that we've made a folder named "Toy Story (1995)", because that matches TheMovieDB.org page for the film.
2) Ripping Discs
MakeMKV is the gold standard for ripping DVDs and Blurays.
It produces files with an MKV extension out of any video files on the disc. MKV, like MP4 and AVI, is a not a video format, but a type of media container. Think of a media container like a bookshelf where you have shelves for video, audio, subtitles, and chapters. You can have multiple video, audio, and subtitle tracks and they can be encoded in all manner of formats. One MKV might have x264 video with PCM audio. Another might have x265 video with AAC audio. The MKV container just houses them. Of all of the containers, MKV is the most versatile and the easiest to work with, because you can edit them with ease. More on that later.
For now, there are a couple of things you should know about MakeMKV. It is "free while in beta" and has been "in beta" for many years, but it works excellently. However, the free registration keys expire every few months. You can get the latest key from this forum post, but just know that when it expires, it sometimes takes the developer a few days to update the page with a new key. Please don't harass the guy - just plan around it. Alternatively, you can buy the software and never have to worry about it again. It's a great way to support his work, and in the unfortunate event something were to happen to the developer, you'll still be able to keep using the software.
A few things to know before you start ripping discs:
- Cleaning Discs - Even brand-new discs can sometimes have greasy fingerprints on them. Always inspect them and clean any dirty discs before ripping. If they're very dirty, you can use some isopropyl alcohol on the cloth to help clean the gunk off. It's best to clean them from the center of the disc out to the edge in a straight line (rather than around the disk in circles). That way, if you scratch the disc you're creating a small line for the laser to cross instead of a long scratch along the path of the laser.
- Corrupt Discs - Some discs just have mastering errors. They will play fine in a bluray player since it'll skip over problem areas, but MakeMKV will fail on them over and over because it needs ALL of the data to successfully rip the files. I ran into this with The Lion King bluray.
- MakeMKV Preferences - Take note of the setting in Preferences>Video>"Minimum title length (seconds)". You're usually safe setting this to 15 or 30 seconds, but you can adjust this to your liking. If you only care about feature films, you can set it to 2700 (45 minutes) to ignore all of the small stuff. If you want to make sure you get everything like me, you can set to 0. The lower you set this, the more junk you'll have to sort through, but you end up saving things like photo galleries that would be excluded otherwise.
We've put our bluray of Toy Story into our disc drive and MakeMKV has recognized the disc:
Click the photo of the disc drive and it will begin loading all of the clips on the disc. After a minute or two we'll have a list of files. If you so choose you can deselect certain files. You can also opt to exclude certain audio and subtitle tracks here, but I'd recommend leaving everything defaulted and handling the particulars later on in step 5.
Once we've set our file path, we can click the button with the green arrow. This step can take upwards of 1.5+ hours depending on how much there is to rip, and MakeMKV will have a notification popup when it's finished.
3) Curating Your Media Pt. 1 - Organization and File Naming
When MakeMKV rips the files, they aren't labeled nicely as they might be in the disc's menus. They'll just be a numbered list of files in the folder you specified.
This is the part where you determine what you want to keep (like the movie and special features) and what you want to trash (like advertisements and fbi warning messages). If you only care about archiving the feature film, then your task will usually be fairly straightforward, but if you want all of the special features as well, you're in for a lot of work; sorting through the sometimes 100+ files ripped off of the disc makes this the most time-consuming step. Within the staging folder for the movie/show, I usually create one folder named "junk", where I store the files I intend to delete, and another named "extras", where I store special features. It's better not to delete the "junk" files until the end because sometimes you realize you missed something or picked the wrong file between two similar files.
One tool that can tremendously shorten your work time is DvdCompare.net
Here, you can look up the film you want details on and there are lists with timestamps for the various special features. You can just play the video file on your PC, search the DvdCompare page for the length of the clip, and then name the file accordingly. If there is no DvdCompare entry for your media, you'll probably want to play the disc in a DVD/bluray player and manually go through the special features to visually compare the clips on the disc with the clips you've ripped. I prefer the special features match the order on the disc, so I take photos of the disc menus with my cell phone and prefix each special feature with 01, 02, 03 so that they sort on the file system the same way they do on the disc. Jellyfin doesn't sort special features alphanumerically at this time, but I hope they will in the future.
Case Study 3:
Our disc has finished ripping and we now have 155 files in our Toy Story folder. Disney/Pixar films in particular can end up having an enormous number of files to go through, but other films can have just a small handful of files.
As shown earlier in this section, there is a a great entry on DvdCompare.net for Toy Story (with timestamps that are a little off). But, what would we do if we didn't have that information? While the disc is in the drive, we can take photos of all of the menus so we know what to name the files. I usually do audio first, subtitles second, and special features after that. You can do this in just a minute or two with your cell phone:
After going through the files, we have taken the 155 files we started with and ended up with 1 film, 27 extras, and 127 "junk" files comprised of advertisements, sub-clips of longer "play all" files, localized clips for other languages, FBI warnings, bluray disc menu backgrounds, and anything else we don't care about.
4) Curating Your Media Pt. 2 - Ripping Oddities
You can think of this section as a troubleshooting guide for MakeMKV. If you're very new, and just trying to form a general understanding of the overall process, you're probably best off skipping this section for now and coming back to it later. But, if you're in the thick of it, these examples could save you a headache; they're situations I've run into enough that they're worth mentioning.
MakeMKV will basically rip every combination of things it can find on the disc. It's not a flaw in the software as much as it is the unusual way content is stored on the bluray discs. Nevertheless, it makes sorting out what you want to keep even more chaotic and time-consuming. Here are some common scenarios to watch out for:
- The feature film has ripped 2, 3, maybe even 4+ times - If you look at the screenshot under section three above you'll see that there are three large movie files at the top of the file list. When you see a situation like this, don't just choose one of the films haphazardly. There is a reason it ripped more than once. You'll see this in particular with modern animated films because they will have not just multiple audio tracks for different languages, but multiple video tracks for different languages as well. They will localize things like the movie's title, store signs, logos, and other things to be in the language chosen in the bluray menu (usually English, Spanish, French, and/or Portuguese). You will need to find the track that has the video matching the language you prefer. Other times, the film rips more than once because one file will have Japanese and English while the other file(s) will have all of the other languages. Sometimes one file has most audio tracks while the other one has only the commentary track. Sometimes certain movie files are shorter than the others and cut off the intro or credits, so pay attention to track length. Other times there is a "movie" file and a "commentary" file (like Harry Potter's "Maximum Movie Mode" where the actors talk about behind the scenes details), so just make sure you do your due diligence before selecting a file at random.
- I'm seeing a ton of files that are just random clips of the movie - This goes back to the animated-films-being-localized-by-language thing. The way they do this is by chopping the movie up into a bunch of clips. Some clips are shared across all languages (since they have no language content in the footage), while others are localized by-language. In a normal bluray player, the movie is dynamically assembled from each of the clips when you select your language in the bluray menu, and because they're stored like this, MakeMKV rips all of them.
- I'm seeing deleted scenes as one long track, and also as individual clips - This is because deleted scenes (and sometimes other groupings of special features) have a "play all" option, so the "play all" list of tracks will be ripped as one video while the individual clips will also be ripped. I prefer to store the "play all" versions since it keeps things more concise on Jellyfin.
- Repetition in audio tracks - Sometimes a special feature might have 10 subtitle tracks, and it will also have 10 audio tracks, however, the audio tracks will all be in English while the subtitle tracks are different languages. Basically the audio track has been duplicated. It's easy to remove the redundant audio tracks (see the next section on multiplexing), but it's just something to watch out for
- Repetition in subtitle tracks - There are four common scenarios you'll run into when you're seeing a language repeated among the subtitle tracks:
a) One is an "English" track and one is an "English (for the Hearing Impaired)" track that will prefix certain lines with character names and include sound effects like "(thunder crashes outside)". You can check the disc menu to be sure. If there's only one track for that language in the menu then it's almost certainly not this scenario.
b) One is the movie track and another is the commentary track. Even if the commentary track is in another language, you can check this by jumping to the front of the film and you will see english names among the foreign language as people introduce themselves.
c) One is a functional track and one is a broken track. I've seen many cases where there might be two french tracks, for example, and one works, and the other just does nothing when it's selected. The only way to be sure is to play the movie in VLC and try each track.
d) One "false duplicate" can be tracks labeled español. For some reason Castilian Spanish (not to be confused with Catalan, which is its own language), cannot be specified as a language. So, if a movie has a Castilian/Castellano track and a Spanish/Español track, they will both be marked as "español".
In the first screenshot of case study 3, we can tell from the file sizes that the feature film ripped three times. Why is that? If we play each of them, we'll see that their lengths are 1:21:27, 1:21:27, and 1:21:04 respectively. Usually, a film will be longer or shorter because of something at the beginning or the end of it, so if we check all of these, we'll see that the reason the first two are longer is because they have additional credits tacked onto the end after the Pixar lamp outro. If we look at the second screenshot in case study 3, we can determine why that is. The film is available in English, French, or Spanish. If we choose English, we get the film that is 1:21:04, but if we choose French or Spanish, we get one of the two 1:21:27 films with the extra credits for the language localization. Mystery solved! Since I'm an English-speaker I now know which one to keep, and which ones to put into my "junk" folder (but we won't delete them just yet, because of what we're doing in the next step).
5) Curating Your Media Pt. 3 - Multiplexing
Multiplexing, or "muxing", in this context is where you edit the component parts of your MKV files. Specifically, you're modifying, adding, or removing the tracks within the MKV container. The tool you'll use to do this is MKVToolNix and it's very user-friendly.
You can drag and drop, you can check and uncheck the tracks you want, and when you're done, you just click "Start multiplexing" at the bottom and it'll spit out a new file that contains the alterations you've made. Even if you made no alterations at all, the resulting file will usually be smaller, because MKVtoolNix removes certain elements that are not necessary for playback, but take up space (more info here, if interested).
Here are the most common operations I do with this tool (none of which require re-encoding):
- Merge tracks that are in two different files into a single file
- Remove any unwanted video/audio/subtitle/chapter tracks
- Name tracks to add clarity
- Append one clip to another (for movies that are split across two or more discs)
- Edit chapters
- Edit aspect ratios (if a clip is playing in widescreen, but should be fullscreen, or vice versa)
- Edit fps to be 0.25FPS for photo galleries that play way too fast
- Removing DTS tracks (I leave all audio tracks in, but when there is an DTS-HD Master Audio track, there is almost always a DTS track that some opt to remove to save even more space)
Now it's time to name and sort the tracks for the film we've kept. We can reference the screenshots of the disc menu to give us some idea of what to name them. For the audio and subtitle tracks, you'll want to play the file in VLC and check them. Many people might decide to remove all tracks except the "English 5.1 DTS-HD Master Audio ES" or might like to name them differently than I did. That's a personal call that's up to you. For the sake of comparison, I left the track order the same as the "before" image earlier in this section, but I normally group all of the English tracks/commentary at the top, then alphabetize all other languages after that:
6) Transcoding
Transcoding is when you transform a video clip from using one encoder to another. You can think of encoders as the programming behind how a video is being compressed. We need compression because without it video files would be enormous.
A video clip might start out as an MPEG or an x264 clip and you might want to encode it in x265. The downside of transcoding is processing time and some level of quality loss (though it can be very small to the point of near-indistinguishability). The upside can be a tremendous reduction in file size. For example, animated films like Tarzan can go from over 20GB to less than 8GB with virtually no loss of quality. Epic films like Lawrence of Arabia can drop from almost 40GB to 28GB. The films that seem to benefit the least are ones with lots of film grain, which might only shave off 1-2GB.
The tool of choice here is Handbrake. I won't cover all of the ins and outs of Handbrake here, because there are plenty of other resources on the web to help with that, but I will cover enough for you to get started.
The main encoders you'll probably be interested in are:
x264 - This is broadly compatible and encodes fairly quickly, but will have larger file sizes than alternatives
x265 - This can result in very compact file sizes with minimal loss of quality, but its encode times can be very long
AV1 - This is a new contender and one that I've not personally worked with. Time will tell how popular it ends up being.
Hardware Encoding vs. Software Encoding
Hardware encoding can be FAST, but you might not see much of a reduction in file size, and video quality can suffer. If you're using settings that utilize Intel Quick Sync, or nVidia's NVENC, then you are using hardware encoding. Software encoding is SLOW, but you will see the greatest quality retention, and the greatest reduction of file size at a given quality level with software encoding. Where you choose to land depends on how powerful your PC is, your patience level, and your priorities. Some choose not to transcode their video at all, but they'll need larger servers to store it all. My philosophy is "suffer now and benefit later", so I transcode for excellent quality at the smallest filesize, which means a single 1080P film can take 1-5 days to transcode on my i5-13600K CPU. Handbrake can be a rabbit hole, and there are plenty of resources online to teach you about various encoders and Handbrake settings, but if you want to just do what I do and forget about it, I've attached four presets in the file named "Handbrake_Presets.zip". We warned, though... I'm not exaggerating when I say encodes will take a very long time!
Things to know about Handbrake:
1) Setting your Default Path - To to Preferences>Output Files> and put this in the default path (without the quotes): "{source_path}\transcoded" By doing this, Handbrake will always drop your transcoded items within a folder named "transcoded", in the source directory. I would also set File Format to (again, no quotes) "{source}"
2) Power Outages and PC crashes - There is no way to resume an encode if it gets interrupted, so if you're 2 days into an encode and your PC loses power, that 2 days is lost. You'll need to reset the queued item and restart the queue. Knowing this, you might consider buying an uninterruptable power supply (UPS) to prevent power loss during outages. If you're transcoding multiple files in parallel, then it also makes sense to run the minimum number of jobs necessary to utilize 100% of your CPU, in order to minimize data loss. The more jobs you run, the slower they'll run on-average and the longer they'll take to finish, which increases the risk that they get interrupted many days into encoding. As an example, let's say you have 6 jobs in the queue you're trying to get through and you lose power on day 3. If you run 2 at a time you might be able to finish 2-per day, so you'd get through files 1 and 2 on the first day, files 3 and 4 on the second day, and on the third day files 5 and 6 would be interrupted. But hey, it's not a total loss! You got through 4 of your 6 files. If you ran all 6 in parallel, it'd take 3 days to get through all of them. They'd all be encoding on day one, still encoding on day two, and then on day three they all get interrupted and you've lost ALL progress. Running fewer jobs faster reduces your risk of loss. You can alter the number of files that can encode at once via Tools>Preferences>Advanced>""Maximum number of simultaneous encodes"
3) PCM Audio - Handbrake has no support for PCM audio passthrough, so if you're like me and you don't transcode audio tracks, you'll find that your PCM audio has been stripped out of the resulting files. When I have files with PCM audio I just transcode video-only and multiplex all of the other tracks back in after the fact using MKVToolNix
4) SRT Subtitles - Handbrake will automatically convert SRT subtitles to SSA/ASS format without any option not to. To say I was annoyed to discover this very far into populating my media server would be an understatement. This unavoidable "feature" cost me hours of work going back and replacing the unwanted SSA subtitles with the SRT files they should be. So, consider yourself warned! You'll have to multiplex SRT files in after transcoding.
5) Tags - Handbrake adds tags within your MKV files. I find them annoying, but there is no way to disable them. You can set MKVtoolNix to always disable tags and global tags in your preferences and just multiplex the tags out. To do this, follow this menu path: MKVToolNix GUI>Preferences>Multiplexer>Enabling items and remove "Global tags" and "Tags" from the selected box using the arrows. Even better, you can run batch files to remove tags for all items in a folder. I've included said files as an attachment at the bottom of this post named "Multiplex_Batch_Files.zip". Just drop the .bat files into the folder with the files you want to multiplex and double-click it to process everything in the same folder. One is an example file that you can modify for your own purposes, another will remove tags and also rename the internal name of the file that shows up in the file properties, and another will only multiplex and remove tags without changing the name. Even if you don't care about tags, multiplexing your files one more time after transcoding is a good idea, because it tends to shrink them all, saving even more file space.
6) File Size - There are occasions where files can end up LARGER than the source file after transcoding. As such, it's good practice to compare your transcoded files with the original files. In such cases you can either opt to keep the smaller original files, or try encoding them at a lower quality a second time.
7) Idling/Overnight Encoding - If you're using your PC as a 24/7 transcoding box, you want the CPU at 100% at all times. However, I've seen an issue on my PC where the CPU will drop to around 45% utilization if it's been left idle for long enough. This can happen even if you set my PC to never go to sleep and to never idle the hard drive. And yes, this can happen even if you go into the advanced settings of Handbrake and check the box labeled "Prevent the system from sleeping while encoding." There is a solution to this problem: When you are done working on your PC and want to leave it for the night, you must click on the main handbrake window, or the queue window to make it the active window. As long as a handbrake window is the active window, the CPU will stay at 100% utilization without interruption.
Case Study 6:
I'm going to assume you've imported the Handbrake presets attached to this thread for the sake of simplicity. Since Toy Story is an HD film, I'm going to select the "HD x265 No Crop (Passthrough All) Very Slow" preset, click "Open Source" in the upper-left corner, and drag the film into the box. Once that's done, I'll click "Add to Queue" along the top of the window. For extras, we don't want to add them one-by-one, so we'll click "Open Source" again, drag the extras folder into the box, and instead of clicking "Add to Queue" we'll click the tiny arrow to the right of those words and select "Add All" from the list. By doing it this way, it adds every file in the folder to the queue. Note that the "Add All" feature only adds items at the first level of a folder. If you had a folder within a folder, the files within the nested folder would not be added.
In this case, we have a mix of HD and SD extras, so if you really want to optimize things you could use a tool like MediaInfo to determine the resolution of each clip, and use the HD preset for the HD clips, and the SD preset for the SD clips. As far as my presets go, the only difference between them is the quality setting (you'll usually want to set SD clips to higher quality to retain as much detail as possible).
Now that we have our queue loaded up, we can click start and get to transcoding! Here's what things will look like in the queue once it's all done. I've clicked on the statistics tab in the queue so we can see the details of the encode:
Time for a little math to determine how much space we saved by transcoding. The original movie and 27 special features had a total file size of about 32.45GB. After transcoding, that number drops to about 13.80GB, or just 42.54% of the original size. If we multiplex our files once more after transcoding, we reduce the size even further to about 13.58GB, or just 41.86% of the original size.
...but what about quality? Who cares about file size if it looks bad, right? Seeing is believing, so click the following link and slide the bar back and forth to compare the video quality before and after transcoding. There is an ever-so-slight softening of detail in the transcode, but it's difficult to notice, and remember that this is a single still frame! In motion, I truly think that no one would be able to accurately point out which one is the original. Keep in mind that this is if you're patient enough to use the Handbrake presets I've attached to this thread. Most people aren't willing to wait 1-2+ days for a single film to transcode and use presets that result in larger file sizes and/or poorer quality.
7) Transfer Files to Jellyfin Server
Time to move those files to your server! You can use software like TeraCopy to do this if you like, since it has a verification step to make sure everything transferred correctly. If you structured your folders and files correctly as mentioned in step 1, Jellyfin will automatically pull all of the metadata for the film, as shown below
...and you're done. Enjoy!
Other Helpful Software
(Coming soon!)
Conclusion
Any comments, corrections, or ideas? Post them below! I'm not saying this is the only way, and "best" will be different for different folks, but I hope this has made your journey a little easier. Thanks for reading!
New to media handling? Check out my guide: From Disc to Drive: A Beginner's Guide to Preparing Your Media for Jellyfin