how to use makeMKV to losslessly rip DVDs and blu-ray discs
hi hello! are you interested in ripping a copy-protected DVD or blu-ray, in the best quality possible, without having to jump through hoops to break said copy protection? i'd like to introduce you to MakeMKV! it's a nifty little multi-platform program that's capable of cracking most methods of disc copyright protection, and rips the entirety of a disc (or just certain chapters, if you'd like) into lossless MKV format.
this guide serves as an introduction to using makeMKV, as well as re-encoding the MKV files it produces into a codec friendlier for media streaming, local or server-based (for example, if you use VLC media player, or use a media server such as plex or jellyfin), and to shrink the (somewhat large) resulting file sizes with little to no visual loss in quality using ffmpeg.
makeMKV installation and usage
the program's website (linked above) has instructions on downloading for any platform. if you're on linux, you have to build from source, but in my experience, it's quite simple, if you follow the official source building guide provided on their forum.
it's worth noting that makeMKV promotes itself as being 'free while in beta' - this means that it is both freeware and shareware. in other words, it's free for the time being, but will require license renewals every month. don't worry about this! makeMKV's forum updates the license key every month on the same page of their forum, which can be found here. this can mostly be ignored until it prompts you for a new key every month, so be sure to bookmark that page.
to use makeMKV, first launch the application, and make sure that you have a DVD or blu-ray disc in your optical drive. this drive can be internal to your PC, or external. quick note: my external drive does not support blu-ray, so i have only ripped DVDs with makeMKV. however, i'm aware that the program is more than capable of ripping blu-rays, just that it will definitely result in larger file sizes for its outputted rips.
that brings me to my next point: the files that makeMKV encodes will be large! for a movie on DVD, the highest i've seen for a movie and its included chapters/features is 5-7GB. for blu-rays, this can be much higher. make sure you have plenty of disc space when ripping, and if needed, rip to an external HDD/SSD.
after launching makeMKV with your disc in your drive, it should auto-detect the disc in the drive, and present you with a two-panel UI: the left side shows a large button that looks like a disc drive, and the right side has a default directory for your outputted files. be sure to change this directory if needed, especially if you're ripping to an external drive.
click the left side button so it can begin scanning your disc for files.
after the scan is complete, it'll output a list of check-boxes. these are for each chapter/feature included on your disc. they don't have useful names attached to them to determine what they are for, but usually, i rip all of them to be sure i don't miss anything. pro-tip: uncheck anything under 10MB, as these are usually anti-piracy warnings (lol) or promotional commercials on the disc. also, if you want an idea of what features you'll be ripping, you can launch the disc in a media player such as VLC media player, and view the features included with the disc. lastly, the movie part of the disc is almost definitely the largest in the list of check-boxes, usually a couple gigabytes, so be sure to leave that checked. if ripping a TV show with multiple episodes per disc, you'll see several entries in the list with similar file sizes; these are your episodes, leave them checked.
to begin ripping, click the new button on the right-side panel next to the output folder directory - it's an icon of a hard drive with a green arrow on it. and the ripping begins!
be sure to monitor the ripping process, especially if your discs are damaged in any way, as any damage may result in makeMKV failing to rip certain (if not all) sectors of the disc. the ripping process can take a while, so you might want to step away from your computer and find something to do while waiting.
post rip and optional re-encoding
you'll know that the rip is complete when makeMKV prompts you that it's done. after that, you're free to do whatever you like with these outputted files: rename them to their appropriate names (as makeMKV will rip them according to their on-disc names, which can be confusing), and leave them as-is. however, as i mentioned in the intro, these files can be large, and the codec that makeMKV outputs its files in is kind of unfriendly for media playback, from your computer or from a server.
to re-encode, you have a multitude of tools available at your disposable. my main recommendation for a GUI-based tool is handbrake, which is quite powerful and easy to use. however, in my experience, when re-encoding with handbrake, i find it difficult to get it to preserve the quality of the original files.
this is where ffmpeg comes in: it's a command line-based program that, with one simple command, can re-encode every file outputted by makeMKV into a friendlier format.
as ffmpeg is command-line based, it may be a little nerve-wracking to use the terminal for the first time, if you're unfamiliar. i personally use linux, so ffmpeg and its usage is very familiar to me, but i understand that most users who have interest in data hoarding may be unfamiliar and uncomfortable with it. and that's alright! if you don't want to use ffmpeg, i once again highly recommend handbrake, and looking into the best way to tweak its settings (and probably avoid its default presets!) to output the best quality possible. but if you'd like to learn, here's a brief summary.
first, make sure you install ffmpeg. on linux, this is as simple as installing it from your package manager. for example, from debian/ubuntu based distros, the command is:
sudo apt install ffmpeg
however, for macOS and windows, this is a little more difficult.
installing command-line programs from macOS and windows is a bit beyond me, but there are many guides out there on how to do this. the easiest way for a beginner, i feel, is simply downloading the ffmpeg binary (in the left-hand section titled "packages & executable files"), putting it in your PATH (windows, macOS guides for that), and launch it from the terminal (macOS) or powershell (windows) after doing so, simply by running "ffmpeg"!
once you've done this, you're able to encode using ffmpeg! from your terminal, make sure you change directories to the directory your MKV files are in. on any platform, this can be done in the terminal using the "cd" command. for example, here's how you use it on linux/macOS:
cd /home/kat/Videos
on windows, you change the path to match windows' path syntax:
cd C:\Users\Kat
you can copy and paste the directory path from your file manager, usually by double-clicking the path itself.
after changing directories, you're ready to run some ffmpeg commands!
as a pre-requisite: the below commands will re-encode your files to the HEVC/x265 codec, with the original audio preserved. feel free to change these codecs as needed. i prefer HEVC as it results in smaller files; however, it's important to know that HEVC, though much better supported these days on most clients, will often result in trans-coding, if streamed from a media server to an unsupported client, such as a smart TV. do your research on what your devices support, and, if you don't know what's best, you should change the video codec to the AVC/x264 codec, which is universally supported.
the command i'll first provide is my personal ffmpeg bash loop for encoding every file in the current directory to HEVC, using Nvidia CUDA GPU hardware acceleration. it leaves the original files intact while re-encoding them to new HEVC files, which are distinguished from the originals by an 'HEVC' suffix added to the end of the re-encodes. only use this command if you have Nvidia CUDA GPU hardware acceleration supported on your computer! if you don't, look below for the next command!
for f in *.mkv; do ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i "$f" -c:v hevc_nvenc -vtag hvc1 -crf 23 -c:a copy -c:s copy -map 0 "${f%.*} HEVC.mkv"; done
this will preserve all aspects of your files, including video, audio, chapter metadata, and the original subtitles provided in the original MKV files, while re-encoding to friendlier formats.
if your computer does not support GPU hardware acceleration, here's another command that can re-encode to HEVC, without hardware acceleration.
for f in *.mkv; do ffmpeg -i "$f" -c:v libx265 -vtag hvc1 -crf 23 -c:a copy -c:s copy -map 0 "${f%.*} HEVC.mkv"; done
if you want a more universal codec on your files, you can use AVC/x264 as previously mentioned, with the below command:
for f in *.mkv; do ffmpeg -i "$f" -c:v libx264 -vtag hvc1 -crf 23 -c:a copy -c:s copy -map 0 "${f%.*} HEVC.mkv"; done
lastly, if you wish to encode files one-by-one rather than through a loop, which you have to do if you are on windows, you have to remove the loop parts of the above commands. to remove the loop functionality, simply remove all parts of the command that aren't a part of the middle section that's all ffmpeg, and edit the output filename; in other words, remove the following from the beginning and end of the commands, and edit the output filename:
for f in *.mkv; do
; done
"${f%.*} HEVC.mkv" becomes "placeholder.mkv" - change to whatever you want.
wrap-up
that's it! if you opted for re-encoding, you should have newly encoded files with HEVC suffixes in your folder. it's up to you if you want to preserve the original makeMKV files or not. personally i do not, as their file sizes can be big, but if you wish to archive the original physical discs in the highest quality possible, these are probably the files you want to keep.
happy ripping! and apologies if this guide is a little linux/macOS (in other words, unix) biased; i personally haven't used windows in years, not since before the pandemic, so i'm rather unfamiliar with it. if you have any windows-specific questions, i may not be able to answer them, but i can try my best.