Convert BluRay or DVD to MKV (x264) using free open source applications

We will be using 2 free open source applications. The first application to rip the video files from the BluRay or DVD, for this we will use MakeMKV, this will take the main video from the BluRay or DVD and create an MKV using the video and audio straight from the disc. With BluRay discs this can create large files 15GB+. To shrink the files to a slightly smaller size without sacrificing quality too much we can use a cross-platform program called HandBrake.

Ripping the BluRay or DVD to MKV using MakeMKV

Download and install MakeMKV.

Open MakeMKV and insert the DVD or BluRay you wish to backup.

Select the drive you put the disc in to and press the button of the DVD pointing to the hard drive.

MakeMKV will then scan the disc for all the different videos on the disc. Untick any additional video or audio streams that you don't want and select a destination folder.

MakeMKV will then start creating your MKV file.

The time the backup takes depends on the size of the data on the disc, the speed of your drive and the speed of your hard drive.

Once MakeMKV has finished you will have an MKV file that you can play on your computer.

Due to copyright restrictions on most DVD's and BluRay's you may not be able to rip the video off. To circumvent this, you can purchase AnyDVD.

Shrinking the MKV using HandBrake

Download and install HandBrake.

Note: The latest release as of writing (0.9.4) is unstable on Windows 7 x64 when encoding large BluRay rips. To get around this you can download the latest development snapshot of HandBrake.

Select Source at the top left of the window and select Video file.

HandBrake will the process the file, getting information about the different streams contained within the MKV file.

Double click "regular" on the right hand side to load up the profile.

Change the container to MKV.


For BluRay, set Anamorphic to Strict. For DVD, set Anamorphic to none and make sure the Keep Aspect Ratio option is ticked. Under cropping, make sure Automatic is selected. This will remove the black bars at the top and bottom of the video to reduce the filesize further.


Change the Video codec to H.264 (x264).

For the quality settings you have 3 options.

Target size*

Set the size of the output you want in MB. Take in to account that the smaller this is the lower the bitrate will end up giving you poorer video quality than you would get with a larger filesize.

For a DVD, setting this between 1,400-2,500MB should give you good enough quality for a backup.

For BluRay, setting this between 8,000-15,000MB should give you a good backup with no visible loss in quality.

Average bitrate*

The default bitrate for DVD's is around 4,500kbps. The more action in the DVD the higher you will want this. Anything from 700 to 2,000kbps should be fine for most films.

For BluRay, setting this to anything greater than 8,000kpbs should give you no visible loss although if you want slightly better quality, it may be worth upping this to 12,000kbps.

Constant quality

This will use a constant bitrate throughout the film dependant of what is going on in the video. Setting this to anything below 18 is more beneficial. The smaller the number the higher the quality.

* Average bitrate and target size allow you to select 2-pass encoding. This will produce better results but will take longer.


Select the first audio stream. Then above it select the audio format you want.

For BluRay, it is best to select either DTS Passthru or AC3 Passthru for optimum sound especially if playing through a receiver with SPDIF.

For DVD, you can either chose AC3 Passthru to keep the original audio stream pretty much intact or MP3 (lame).

Start the encode

When you have the options set how you want, click the Start button at the top. The CLI (command line interface) will popup showing you the progress of the encoding.


Very neatly written. I guess the two programs you introduced are the only free programs that do the job! =)

That's what I first tried to do...
1 (big) problem: Handbrake cannot "read" the subtitles from the mkv created by MakeMKV !

Not everyone has english mothertongue and watching US/UK-movies only! (I speak French and I like US, German and Asian movies! And I hate dubbed movies!)

Any solution? (I'm on Mac)Thanks!

No idea as most films I have don't have subtitles and I often find it easier to download a copy of a bought DVD or BluRay as the quality is generally better than what I can achieve.

Hi Bruno
You could use MKVtoolnix (
So you rip it with MakeMKV where you selected all subtitles...etc.
Then you select the mkv file in Handbrake and only rip the video, no audio or subtitles.
Then you use MKVtoolnix to merge the video from Handbrake and the rest from the MKV file made from MakeMKV.
That's it...good luck.

having problems using handbrake to compress MKV file.

MakeMKV worked like a charm. I retain true audio DTS as well as 5.1 AC3, as well as Dolby digital. I follow your directions and select audio source as well as pass thru AC3, however when I play the file audio is choppy. I am able to select audio track 2 when I compress the file with DTS, and it plays in 5.1 format. However what I would like to be able to do is play the file in its best audio format which is DTS. The original mkv file that was created from MakeMKV plays all the audio formats I stripped from the original blu ray. Can you help me solve this because I would like to compress the files.
I was unsuccessfull getting the newest version of handbrake to work with XP (which is the current system Im using), so using handbrake version 0.9.3 Your help would be greatly appreciated.
This is awesome!


I think I may have figured it out. I wasn't selecting DTS AC3 when selecting the audio track to passthrough. I will find out if it works later today

You can download subtitle files. If you give the file the same name as the video file (with the .srt extension) and put both files in the same directory, most players will open it automatically.

This page has an big list of sites, with solutions that might work for you:

So do you need to use AnyDVD to decrypt the Bluray? I can't see how MakeMKV will work without some type of decryption.

Excellent guide, after hours researchin bit rates with my mkv rips this nails it down to a tee. I use makemkv and handbreak which works fine but my biggest issue was quality loss due to bit rate change, this now explains where I'm going wrong

Thanks man!

MakeMKV doesn't work for HD for FREE unless in the 30 day trial, after that you have to pay for it. Bogus

It was free at the time.

just buy it. Your buying all these blu rays anyways

I vaguely recall installing MakeMKV the other night and it was - and still is - totally free. As far as I can remember, I went to the official MakeMKV user forum where I picked up a legal license key.

Found a forum the other night where people complained that Handbrake was actually a pretty shitty compressor / re-encoder due to.. hmm.. something technical, I guess :-)

Do you know of any similar programs that does the job better, or more accurate?

I don't think so, Tim!

"VidCoder uses HandBrake as its encoding engine."