Ripping Multilanguage DVDs with Subtitles using Mencoder

Yesterday at Christmas I got the Akira Kurosawa Samurai Edition, which is a 7 disc DVD set of his awesome movies. I am converting it into the best quality files currently possible: MKV as the container, x264 codec for the video, dual audio, and with subtitles. This is short Howto so that I won’t forget how 🙂

  1. Create a file ~/.mplayer/mencoder.conf with default compression settings. I use this, with encoding quality settings I have from mplayer’s x264 examples:

  2. I use constant quality setting. The advantage is that it requires only one pass, and you get, well, constant quality 🙂 In the config file find the crf=20 section and change it to your desire.
  3. Find out which DVD chapter you want to rip, starting with 1 up (e.g. mplayer dvd://1).

  4. If the DVD has black borders, find out their sizes with

    Fast forward a bit into the movie so that the ratio can be trusted.
    WARNING Some DVDs like Natural Born Killers are shot with multiple different films, so the border changes! Take care not to crop anything important away. Copy the -crop printouts into the clipboard.

  5. Open another console window, run mplayer dvd://2 -identify, and quit. Now scroll up, there is some important information about the tracks which you need in the next step. I have extraced the important information here:

    So there is audio language de and ja, and 2 subtitles for de. Mplayer the DVD and press J to find out which subtitles you want to have. (mplayer shows the ID, like (0) de).

  6. I have chosen AID 129 and sid 1. In the other window, start ripping the movie:

    This will get you 3 files: Yojimbo.avi with Japanese audio and x264 encoded movie video, and subs.idx and subs.sub with the subtitles. Play the movie to check everything works as it should.

  7. Rip additional sound tracks now, if you want them. You can rip one additional subtitle at the same time. To do this, increase the vobsuboutindex by one, or choose another filename. I choose to rip the german audio and another subtitle track:

    The -ovc frameno part is important, because this skips video encoding. Encoding is much faster this way because we already have the video anyways.

  8. Merge everything together with mmg, this is a GUI interface for mkvmerge which you get via sudo apt-get install mkvtoolnix. Select the correct languages for the audio and subtitle tracks.

I think that’s about it. This way you will get very high quality, multi language rips with subtitles. Oh, some other interesting points to note:

  • I always encode with the same resolution as the source, no rescaling. Rescaling is very bad, I much prefer that quality is reduced by the codec and not preemptively through scaling down. Even a HDTV ripped to 700MB gets you a much better quality when not rescaled than a DVD ripped to 700MB. The x264 does an awesome job at preserving quality where it is important.
  • I only rip with variable bitrate VBR. It has very good quality, but it is not surround sound.

4 Comments on "Ripping Multilanguage DVDs with Subtitles using Mencoder"

Notify of

great tutorial


Just in case if someone is interested, “-nosub” will disable Subtitles. So, if you want to rip a movie without Subtitles then pass -nosub to MEncoder.


Thanks! awesome info.

It would be great though, if you include an example or script to merge the second language with mmg from the command line.

Ben in Seattle

Thanks for this great HOWTO! I’m going to use almost exactly this recipe, but I’m encoding to Google’s webm (Matroska + VP8), because of the license issues with H.264.