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.
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.
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.
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.