Command Line Backup for DVDs

This is a quick tutorial to show you how to rip DVDs on a headless server. That is; one which only has command line access.

The documentation for MakeMKV is available. It's a bit sparse. It also doesn't have many of the features of the GUI.

For example, the GUI allows you to select which video, audio, and subtitles, you want to copy. So if you only want the original German director's commentary, with the Swedish subtitles from the main feature, you can do that.
makemkv gui
The command line is an "all or nothing affair".

Install The Software

We're going to be using MakeMKV. The latest version of the Linux software can be found on their forum.

First, download both pieces of software.


Then, extract the files.

tar -zxvf makemkv-bin-1.7.6.tar.gz
tar -zxvf makemkv-oss-1.7.6.tar.gz

Get the tools you need to build the software

sudo apt-get install build-essential libc6-dev libssl-dev libexpat1-dev libgl1-mesa-dev libqt4-dev

NOTE: You need GCC version 4.6 or higher. If you're unsure which version you have, type:

gcc --version

If you need a more recent version, follow these GCC upgrade instructions on StackOverflow.

To build the software, first compile the Open Source part

cd makemkv-oss-1.7.6
make -f makefile.linux
sudo make -f makefile.linux install

Then install the binary part (you will have to agree to a licence).

cd ../makemkv-bin-1.7.6
make -f makefile.linux
sudo make -f makefile.linux install

All should be installed without error!

Running for the First Time

Stick a DVD in your drive and run the following command

makemkvcon -r info

You should get a bunch of information about the drive and the program.

To see information about the disc, run

makemkvcon -r info disc:0

Assuming that your DVD drive is 0.

How To Rip

This command rips all the movies on the disc which are longer than 3600 seconds (60 minutes). This means that it should skip any special features etc.

You will need to create the folder you want to rip to first. The filename will be "title00.mkv" so make sure you're ripping to a unique folder each time.

makemkvcon --minlength=3600 -r --decrypt --directio=true mkv disc:0 all /DVDs/MovieName/ ; eject -r

The " ; eject -r" tells the system to eject the disc once ripped.

What Can't You Do?

MakeMKVcon is missing the following functionality (hopefully being fixed by its creator)

  • Can't select a specific title.
  • Can't extract specific audio files.
  • Can't specify subtitles.
  • Can't create folder.
  • Can't set filename.

Share this post on…

2 thoughts on “Command Line Backup for DVDs”

  1. Brock says:

    I wanted to make sure that only the longest title was ripped instead of just a general --minlength=#. The following ensures this. I am using Linux. Thanks for posting this tutorial.

    # Get the minimum length. This ensures that only the longest title goes to MKV.
    long_title=$(makemkvcon -r info disc:0 | grep cell | awk '{ print $7 }' | tr -d ')","Title' | sort -nr | head -n1 | awk -F: '{print ($1 * 3600) + ($2 * 60) + $3}')

    # Rip DVD
    makemkvcon --minlength="$long_title" -r --decrypt --directio=true mkv disc:0 all $HOME/Videos/


Trackbacks and Pingbacks

What links here from around this blog?

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">