Page 1 of 1

MacOS X – HandBrake – Copy a DVD to MP4 or MKV file

MacOS X – HandBrake – Copy a DVD to MP4 or MKV file
   2

Now-a-days everyone can rip or copy a DVD with just a few clicks … once you know how!

Back in the day, you needed all kinds of complex tools and the process was not just challenging, but also very time consuming on those old computers. I used to have my computer run overnight to get a single DVD it done. With my current computers we’re talking about mere minutes.

Why rip a DVD?

Maybe you’d like to use it with XBMC, play the movie on your tablet computer or smartphone, or you’d like to have a copy for your kids to handle, and smear their little pizza fingers on.

In this article I’ll show you how to use the free and awesome HandBrake on a Mac.




Before you start …

Verify your local laws! 

This article is not intended to promote pirating Copyrighted Materials!

Laws, when it comes to copying Copyrighted materials, differ from country to country. It is your responsibility to be aware of these laws and comply to them. See also our Disclaimer!

The movie industry in general does not want you to copy a DVD for any reason. Fair use proponents however claim that the law leaves room for making a private backup (in the US: DMCA or Digital Millenium Copyright Act). But it’s all a matter of interpretation – so think for yourself before you act!

Other countries, like The Netherlands, are more liberal when it comes to this – Consumers pay a few cents extra for empty media, and for personal use you are allowed to make a copy (see Stichting Thuiskopie).

Why DVD to MP4 or MKV?

So you might wonder what MP4 (or M4V) and MKV stand for?

Both are file types; in this case they are so called containers that can contain multiple parts which can be video, audio, subtitles, etc. These particular file types can hold multiple video, audio, and subtitle parts or so called streams.
For example videos in different angles, audio in different languages and qualities (Dolby Surround, Dolby AC3, regular stereo, etc), or subtitles in different languages or types (Closed Caption versus regular subtitles).

The purpose of the files we are about to make will be mainly playback on your computer or other device capable of playback of these kind of files. For example: XBMC box, Tablet PC, iPod/iPad, smartphone, media player in your car, or other media playback capable device.

Here MP4 is the most commonly used format (together with AVI).
MKV on the other hand, although seemingly superior, is not (yet) as popular, but HandBrake supports MKV as well.

MP4 vs M4V 

For certain Apple devices, when a AC3 Dolby Surround track and/or Chapters are added, the file extension of an MP4 will become M4V.  An M4V file is almost the same as a MP4 file, but it seems that an AC3 audio track and chapters are not considered “valid” in an MP4 file, but perfectly valid in an M4V.

XBMC, VLC and the likes care less if it’s called MP4 or M4V.

Transcoding Other Video sources … 

HandBrake also accepts other video sources than just a DVD – including other video files!
It can convert most common video files to MP4 or MKV with ease.

Note : Copying a DVD is commonly referred to as “ripping” a DVD.

For the impatient: the short version …

For those that are impatient and more experienced, you can follow the following steps quickly.
For beginners I recommend to continue reading the following paragraphs which explain a little bit more about what’s happening.

  1. Install HandBrake.
  2. Install libdvdcss.
  3. Start HandBrake.
  4. Insert DVD.
  5. Open the “Source” in HandBrake (the DVD).
  6. Select “Title“.
  7. Click preferred “Preset” – possibly fine tune settings
  8. Click “Start“.
  9. Drink a cup of coffee and eat a cookie – a.k.a. wait and pretend to be patient.
  10. Done.

Tools we need to Rip a DVD

When using HandBrake, we have all we need in one application, with one tiny exception.

The creators of HandBrake were smart enough to not try to reinvent the wheel when it comes to decrypting (removing CSS) of the DVD and they use a library called libdvdcss. It’s a tiny download and installs in seconds.

Downloads

As usual, we offer the needed files for download but we highly recommend that you visit the listed sites below to make sure you get the latest version:

  • HandBrake – install by opening the .DMG file and dragging “HandBrake” into the “Applications” folder.
  • libdvdcss – install by double clicking the .PKG file and follow the instructions.

 

Note : libdvdcss versions can be found here, but it can be that newer versions do not have a compiled version for MacOS X available yet. Check the folders with the highest version numbers and work your way down until you find a version that has a “macosx” subfolder with the “libdvdcss.pkg” file in it – this would be the file needed to install libdvdcss. At the time of writing this article, this is the most recent version.

Download - HandBrake (macOS 64bit) 

Filename:  HandBrake-1.3.3.dmg
Platform:  Apple macOS
Version:  1.3.3
File size:  21.2 MB
Date:  2020-07-05
 Download Now  Send me a cup of Coffee    

Download - LibDVDCSS 

Filename:  libdvdcss.pkg
Platform:  Apple macOS
Version:  1.2.12
File size:  36.2 kB
Date:  2013-07-25
 Download Now  Send me a cup of Coffee    

A newer version of libdvdcss can be found here:

Download - Libdvdcss 

Filename:  libdvdcss-1.4.0.zip
Platform:  Apple macOS
Version:  1.4.0
File size:  20.8 kB
Date:  2016-02-01
 Download Now  Send me a cup of Coffee    

Ripping a DVD to MP4 (or MKV)

Alright! Now that we have that done, we can get started with the actual ripping of a DVD.

Region Code 

Before proceeding, make sure the DVD can be played on your computer with your regular DVD playback program or the “DVDPlayer” application in the “Applications” folder – just to make sure that the Region Code is set correctly.

Step 1: Start HandBrake

Step 2: Select your video source (the DVD)

Normally HandBrake starts right away with a file dialog asking what to rip or convert.
If that didn’t happen: Click the “Source” button (1) to have the file dialog appear.

In the file dialog, select your DVD on the left hand side (2) and click “Open” (3).

HandBrake - Select your DVD

HandBrake – Select your DVD

After clicking “Open” (3), HandBrake will start scanning the DVD.

HandBrake is scanning your DVD

HandBrake is scanning your DVD

Missing libdvdcss Error Message 

It can happen that HandBrake didn’t find libdvdcss, the library needed to decrypt DVD’s.
Click “Get libdvdcss.pkg” and install it.
(for the technical people amongst us: the file “libdvdcss.2.dylib” needs to be found in “/usr/lib”)

HandBrake didn't find libdvdcss

HandBrake didn’t find libdvdcss

Step 3: Select the Movie

Once the scan completed, HandBrake will pick what it thinks is the main movie. You can of course override this and select the specific part of the DVD you’re like to rip. Typically, the title with the longest playback time is your main movie, but that is not a guarantee!

Too many titles to choose from? 

If you find yourself in the situation where it becomes difficult to decide what title to pick, for example when certain copy protection mechanisms tamper with the table of content, and it appears that you DVD has a truck load of movies on it (the so called “99 title problem”): read this article on how to detect which movie to rip or copy.

HandBrake - Select the movie to rip

HandBrake – Select the movie to rip

Step 4: DVD Conversion settings – Video

First we can set the destination of the result file. Typically HandBrake will take a default location, like your desktop, and name the file based on what it found on the DVD (which can be a random guess). You can change the location and filename as you see fit. Keep in mind that the resulting file size for a normal movie is in the 1 -2 Gb size – make sure the destination drive has enough space available!

When ripping a DVD we basically convert (transcode) the DVD movie to a different file format and for this we will need to do a few settings. For your first DVD, you’d want to try the default settings as they are already pretty good, but you can fine tune the settings if you’d like. In this article you’ll find more details on how to fine-tune/tweak the settings.

First, since we want to create an MP4 or MKV: Select the desired “Format“. For most purposes choose “MP4 file“.

One of the nice things of HandBrake is the ability to work with presets, you will see them on the right.
If you do not see the presets, click the “Toggle Presets” button.

HandBrake - Presets for particular target devices

HandBrake – Presets for particular target devices

If you have a particular target device in mind, try to pick the one that closest matches one of the presets.
If you’re unsure or you have multiple devices in mind, then pick “Universal” – a preset I usually start out with.

Note : All settings after this point are optional! So you could jump right away to step 7 and click the “Start” button, but it might not be a bad idea to keep reading anyway …

Basic setting I use (that I’d start out with – which are slightly different than “Universal” – more optional fine tuning in this article):

Starters HandBrake Settings
 Field Setting
 Video Codec H.264 (x264) 
 Framerate Same as source / Variable Framerate 
   Constant Quality RF: 20
 x264 Preset Placebo (slow but very good) or veryfast (fast and reasonable quality)
 x264 Tune film (for regular movies) or animation (for classic animations or Manga)
 H.264 profile 3.0 or auto

If you have multiple target devices in mind, check the option “iPod 5G Support” as well.

Note :
For Android devices
, I’ve found that setting the “Video Codec” to “MPEG-4 (ffmpeg)” results in the most compatible format.

With these settings most DVD movies end up in the 1.2 – 1.5 Gb file size range. You can tweak this down if you’d like but then you’d have to play with an average bitrate instead of constant quality.

Note :
After tweaking and modifying all kinds of settings, in the now following paragraphs, you can save them as a new preset using the “+” button at the bottom.

Step 5: DVD Conversion settings – Audio

Next click the “Audio” tab, where we can play with the audio settings.

Under normal circumstances I would choose the highest audio quality “Track” the DVD has to offer, which is typically (if available) AC3 Dolby Surround, in the language of your preference.

You now have 2 options to choose from:

1) Add only one Audio Track

In that case you will have to decide if you want the original sound track, unmodified (codec: auto passthru), or if you’d like, use a format like AAC (I prefer AAC coreAudio for Macs) or MP3 – as the cheaper playback devices are not always capable of AC3 playback!

2) Add multiple Audio Tracks

You can also choose, and this is what I do, to add the sound track in 2 (or more) formats. For example the fancy AC3, for the good video playback devices, and AAC (CoreAduio for MacOS X) or MP3 for the less capable playback devices. At the same token, you can also choose to add multiple languages as well (if available on the DVD).

Repeat these steps as often as you need to:

High Quality Audio Track

I always choose the first audio track using the codecAuto Pasthru” (unmodified), which means that you will get the best audio quality when watching the movie … this is often the “AC3 Dolby Surround” audio track, if provided by the DVD.

Lower Quality Audio Track

I also always add a secondary audio track where I set the audio codec to a simpler format like MP3 or AAC. I would always choose one of the AAC variants (for MacOS X pick AAC CoreAudio), with a “Dolby Surround” or “Stereo” “mixdown” at a “Bitrate” of “160“.

HandBrake example Audio settings

HandBrake example Audio settings

Step 6: DVD Conversion settings – Subtitles (optional)

Now that we have covered Audio and Video: Subtitles.

Of course subtitles is fully optional and you can leave them out if you’d like.
I usually add at least one subtitle: English Closed Caption. You can however enable as many as you’d like.

You will have to pay attention here though!
Some subtitles HandBrake wants to have “Burned In” – which is a bad idea all together.
It means that subtitles will always be visible and cannot be turned off!
So we really want to make sure that “Burned In” is NOT CHECKED!

More details about subtitles variations can be found on the HandBrake Wiki page.

HandBrake Subtitles example

HandBrake Subtitles example

Step 7: Start Ripping!

This would be the time to click the “Start” button to start the ripping/copying/converting process.

Ripping will take a little bit and it mostly depends on the speed of your computer and the encoder settings you used.

Additional Tips

Advanced Tweaking of the Encoder

I wrote an additional article for those interested in additional optimzing and tweaking of the HandBrake encoder settings for h264.
I can highly recommend, even for beginners, to read thought this article. It’s not just about “better” settings but also about some of the basic principles of encoding video.

Using a Queue for sequential ripping of multiple DVD’s or video conversions

You do have the option – if you have multiple DVD Rom players connected to your computer, or want to convert multiple video files – to add everything you just did to the Queue (click “Add to queue”) and start the entire process you just went through again to then add that one to the queue as well. You can however NOT remove the DVD form the drive it’s in right now!

Once you filled the Queue, click “Start” and HandBrake will process the entire Queue in sequence.

Put the computer to sleep when done

One of the features I really appreciate is that you can have HandBrake put the computer to bed when done converting. Specially with conversion job that take a while, this proves very handy. If you’d like to enable this option, because you’re going to walk away from the computer and let HandBrake do it’s thing:

Click the menu (top of your screen) “HandBrake”  Preferences”  General”  When Done” and choose “Put Computer To Sleep“. You can even do this while HandBrake is in the middle of converting your DVD!

You can of course also choose for one of the other options …

Handbrake - Go to sleep when done!

Handbrake – Go to sleep when done!

HandBrake not Ripping the entire movie

It can happen, for example due to particular copy protection, or a damaged disc, that HandBrake will not rip the movie correctly. I’ve found that MakeMKV, although often used for BluRay discs, does a great job recovering from those situations for DVD as well.

It is slower than HandBrake though.

Read: MakeMKV – Copy a Blu-Ray movie to MP4 or MKV.

Support Us ...


Your support is very much appreciated, and can be as easy as sharing a link to my website with others, or on social media.

Support can also be done by sponsoring me, and even that can be free (e.g. shop at Amazon).
Any funds received from your support will be used for web-hosting expenses, project hardware and software, coffee, etc.

Thank you very much for those that have shown support already!
It's truly amazing to see that folks like my articles and small applications.

Please note that clicking affiliate links, like the ones from Amazon, may result in a small commission for us - which we highly appreciate as well.

Comments


There are 2 comments. You can read them below.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.

  • Feb 12, 2017 - 1:12 AM - RediscoverGreen Comment Link

    If you’re looking to upgrade libdvdcss 1.4.0, you can follow the instructions at: https://stackengineer.com/multimedia/build-libdvdcss.html

    Reply

    RediscoverGreen

    • Feb 12, 2017 - 2:49 PM - hans - Author: Comment Link

      Thanks RediscoverGreen – excellent find! 

      For those interested, this article shows how to compile a Windows version of libvdcss on a Linux box.


      For future reference (in case the article disappears, the short version (source) – please visit the original source: 

      Install the necessary tools to build the dvd access library for Windows 64 bit.

      sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-tools

      Download the lbvdcss source code from the VLC website. At the moment the latest version is 1.4.0, check here to see if there is a newer version (1.4.0 seems to be 2 years old, and I’m not sure if we can expect any newer version any time soon).

      wget download.videolan.org/libdvdcss/1.4.0/libdvdcss-1.4.0.tar.bz2
      tar -xf libdvdcss-1.4.0.tar.bz2
      cd libdvdcss-1.4.0/

       Compile Source for Windows. The compiled result should be available in the .libs directory which then can be copied to a Windows machine:

      ./configure --host=x86_64-w64-mingw32
      make
      cd .libs
      Reply

      hans



Your Comment …

Do not post large files here (like source codes, log files or config files). Please use the Forum for that purpose.

Please share:
*
*
Notify me about new comments (email).
       You can also use your RSS reader to track comments.


Tweaking4All uses the free Gravatar service for Avatar display.