Ripping and Encoding DVDs with MakeMKV

(tl;dr - just show me how to rip DVDs with MakeMKV)

I don't buy a lot of movies anymore. Basically everything I want to watch is on one of the big streaming services, and that comes with both convenience (mobile apps, subtitles, correct naming) and sound morals compared to the olden days. I especially don't buy a lot of movies on DVD.

There is an exception however - specifically kids' movies. They are not as ready available on the streaming services, and those that are don't always have Swedish audio or remain in the catalog forever. I also have a bunch of classics on DVD. Hence: a need to rip DVDs into a format suitable for Plex.

A common recommendation is to use an application called Handbrake. That's not an entirely bad recommendation, but Handbrake has two big drawbacks. One is that it transcodes the content of a disc into some other (mp4) format. That can be a good thing - it makes the files smaller with no noticeable quality loss - but it takes a lot of time. A LOT. The other, more serious drawback, is that it doesn't bypass DRM (copy protection schemes) very well. (For the worried: in Sweden it's perfectly legal to make personal backups of movies you buy).

I've tried a bunch of trial versions of other commercial Handbrake-like applications that supposedly handle DRM better, but they've all struck me as weird in different ways (strange UIs etc) which have not convinced me they will be continually updated to keep working when new DRM appears.

Finally I found the real solution - it's called MakeMKV. MakeMKV is a free application that basically just copies files from a disc to a file. In the process it removes basically any copyright protect and rebundles the files in a MKV container instead of the VOB one used on DVDs. This means you get content that is the same size that it was on the disc - but it takes maybe 10-15 minutes instead of the 1, 2 or more hours the process takes in Handbrake. And you can always use Handbrake or another encoder to transcode the files later on if you want.

Basic ripping with MakeMKV

  1. Start MakeMKV
  2. Insert DVD
  3. Press the "Analyze DVD" button (that's the big DVD player icon)
  4. If everything works, a list of titles appear that you can select from. With the checkboxes in the list you can select a subset of the titles on the disc - if it's a movie there's typically only one interesting title, which is the movie itself. You can also select which audio tracks, subtitles etc you want to extract. If you don't get a list of selectable titles, see Advanced ripping below.
  5. Optional: change destination
  6. Press the Make MKV button
  7. Profit!

Advanced ripping

Sometimes the DRM on a disc cannot be bypassed by the MKV analysis phase. Usually this is not a result of encryption, which basically all applications including Handbrake bypass easily, but of very complicated file structures, fake sectors, virtual titles etc. on the disc.

You can still usually open the disc if you do it manually:

  1. Select "Open disc" from the File menu.
  2. Navigate to the DVD and select the file VIDEO_TS.IFO from the VIDEO_TS directory.
  3. Select "No" when it asks you to open it in disc mode, and wait for the "Manual open" dialog that basically only has one input field.
  4. Input the string describing which part of the disc to extract. This is the tricky part. If you are lucky you can just enter the title number here. To find which title is the movie or episode you want to extract, it's easiest to run the disc in a DVD player or DVD player software - the display usually shows which title is playing. Sometimes it's more complicated, and you have to specify chapters or even cells. The full format of the string is found here: http://www.makemkv.com/manualdvd/

Other handy tricks

Once you have a file extracted, you can manipulate it. One obvious thing to do is to transcode it into a more space-efficient format, for instance with Handbrake. I usually don't do that since disk space is cheap and my time is not (even though the CPU is doing the work, managing the transcoding process takes a lot of time and cognitive effort).

Another thing you can do is chop a file up. I accidentally ripped a Moomin DVD with multiple episodes into a single file. The media server I use, Plex, doesn't like that. It can't find metadata properly or play those episodes individually if they are in a single file. ffmpeg is the tool to use here.

How to extract the parts of a file between 25 minutes and 50 minutes into a separate file with ffmpeg:

~:>ffmpeg -ss 00:25:00 -i moomin.m4v -acodec copy -vcodec copy -to 00:25:00 "I Mumindalen S01E19 Muminfamiljen raddar vilda djur.m4v"

The -ss parameters is start time, -to is the duration (not the end time in the original file, despite its name). By specifying the audio and video codecs to copy it will just extract that part of the movie - no transcoding.

The number of options to ffmpeg is insane and you will probably end up googling command lines to do specific things rather than cook your own. Some stuff you can do with ffmpeg:

  • Extract parts of videos (like above)
  • Correct audio/video sync
  • Scale, pad, crop, flip, rotate, blur, sharpen and denoise video
  • Speed up or slow down audio and video
  • Create sounds with mathematical expressions
  • Text to speech
  • Display and record input from your webcam
  • Convert video to images and images to video
  • Add static or dynamic text on video
  • Add, edit or delete file metadata
  • Include a logo or provide Picture in Picture
  • Display input from 2 webcams in one window
  • Set the bitrate, frame rate, maximum file size and related options
  • Apply filters
  • Encode subtitles directly to the video stream
  • Join various file formats, modify streams and modify audio channels
comments powered by Disqus