How To Backup A DVD with Ubuntu Linux

Ripping is a term used to describe the act of taking a video DVD and copying it to your hard drive, while additionally encoding the video into a smaller format like Divx/xvid/mpeg-4 and saving it as an AVI file. Not so long ago I wrote a blog that shows you how to take such an AVI file and convert it into a viewable, playable DVD. So I thought it would be best to show you how to move the video in the opposite direction. I consider this to be a legitimate format for people to back their DVD’s into for two reasons:

  1. Many DVD players are now capable of playing Divx/Xvid formated videos all on their own.
  2. It’s more compact (700 ~ 1400 MB per film, a blank DVD is capable of storing about 4300 MB). You could have multiple films stored on one disposable disc.

NOTE: Scroll down past this DVD to AVI ripping guide if you want to see how you can backup your entire DVD (menus and all) to a blank DVD.

Remember that you are supposed to be using this little guide for the purposes of backing up DVD’s that you actually paid for and own. So when your dog eats it or your hyperactive 4 year old exerts his primitive He-Man and snaps the disc in half with his own bare hands, you don’t have to worry about buying a replacement copy. What you don’t want to do with this information is… oh, I don’t know… rent movies by the truck load so you can copy them all off to your PC before you return them. You wouldn’t want to do that. Not only because doing such a thing is illegal, but also because you might make Jesus sad.


Jesus has feelings too! Not just lawyers.

Now that your conscience is stricken with guilt and fear, we can all be sure you’re not going to try anything illegal with this “forbidden knowledge.” So lets move along to the fun stuff!

First, we need to install libdvdcss2 for decoding DVDs!

Before we can even rip a commercial DVD we need a specific decoder (known as libdvdcss2) to be installed. The easiest way to get it is to add the Medibuntu repository to your software sources. To do this in Ubuntu:

  1. Click Applications>Accessories>Terminal
  2. Paste in the following text in the Terminal window:
  3. sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get -q update && sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring && sudo apt-get -q update
  4. Then paste in this text:
  5. sudo apt-get install libdvdcss2

The line of text in the first box adds the Medibuntu repositories to your system and updates your package listings.  The second box installs the libdvdcss2 decoder.  Both commands will work with any version of Ubuntu.

Now that we have our decoder installed, lets rip!

Ripping/Backing Up a DVD with k9copy in Ubuntu Linux

There are several applications available that you can install and use with Ubuntu to rip DVDs. One of the most popular is called k9copy. This program can be used not only for backing DVDs up as AVI files on your hard drive, but it can also shrink DVD-9 discs down to DVD-5 so you can burn complete backups onto a blank DVD-R. I decided to try this app out to see if it would live up to all the hype. Here’s how you install it:

  1. Click on the Applications Menu
  2. Click “Add/Remove…” (or Ubuntu Software Center if you’re running 10.04)
  3. Search for “k9copy”
  4. Check k9copy
  5. Click the apply button.

Now that we have k9copy installed we can fire it up by clicking Applications>Sound & Video>k9copy.

In my experience, this is what k9copy will look like when you first run it, even if there is a DVD in your DVD drive. So if you have a disc in the drive, eject it, then push it back in and k9copy will open it up.

Now being shown is the DVD content structure, made up of titles that contain content objects, such as video streams, audio streams, subtitle streams and menus. (By the way, Death At A Funeral is a f-ing hilarious film and I highly recommend you go buy it). For the purposes of backing up just the movie we’ll want to select one video stream and at least one audio stream (6-channel surround sound, 2 channel stereo, english, french, director commentary, etc). You’ll notice that each title here shows a total size in megabytes each takes up. The largest one in the picture above is Titleset 1, weighing in at a hefty size of 3733.10 MB. So we know THAT’s the movie because the size of it is so large, and everything else is just menus, perhaps a trailer for some other movie, etc., and they can all be ignored and excluded from our rip. Just remember that it’s not always “Titleset 1″ that contains the movie, so check the size of the title set before ripping to find the one with the largest size first. In this example it’s clearly Titleset 1. So we expand it open (with the little [+] boxes next to the name) to reveal its contents:

After expanding the Titleset 1 treebranch, I placed a check next to the “audio 1 English ac3 6ch 48kHz drc” option, which basicly means “Six Channel (surround sound) English audio.” Doing this automatically checks off the video stream associated with it. I could check off other audio streams if I wanted to, but that would take up extra space and possibly reduce the video quality of our output, depending upon how large we want the outputed AVI file to be.

If you look down a little, you’ll see the video and audio ripping settings (shown above). By default k9copy wants to resize the width of the video you’re ripping to 640, which is actually a little smaller than the default video stream size of 720. If I were you, I’d change the above to say 720. You’ll also see a target file size of 700 MB selected. Depending on the length of the movie and the amount of action in it, you might want to increase this size. 700 is good for films that are about an hour and a half long. Any longer than this and you might want to change the size to something larger. Best test this to feel out your own preferences before backing up several discs, but 700 has usually been good for me.

TIP: For the best video quality in your output AVI, check off the box that says 2-pass. What this does is a practice encode (to feel out the parts of the video that contain the most action) and then a true encode which will use the information gathered from the practice encoding to more dynamically adjust the bitrate.

By default, the codec selected says “Copy”. We want to change this to some other video codec. I have the best luck using Xvid.

Once you’ve set your video codec to Xvid, click on the Audio tab. This will show the above settings. Just like the video codec, you will probably want to change the audio codec as well, although this is not required. For instance, if you want to preserve the 6-channel surround sound audio from a movie you’re about to backup, it’s best to leave the above setting on Copy. However, if you’re ripping the 2-channel stereo audio, it’s better to change this to the MP3 LAME codec. And if you do put it to MP3, you should probably change your bitrate from 128 to 192 or better (no greater than 320). This will increase the sound quality. For this example, I’m going to leave it on copy.

Once you have your video and audio streams checked, your video and audio preferences configured, you can go up to the top of k9copy and click on the Create MPEG-4.

This will ask you where you would like to save the AVI file it’s about to create and that’s entirely up to you. I like to place these AVI files on the desktop and then decide whether or not I want to burn them to a blank Data DVD once I have a few other movies backed up and ready to be burnt. Once you click Save, k9copy will begin to combine your selected video and audio streams together into a single AVI file.

What if I want to backup the whole DVD? Menus and all?

This can also be done with k9copy and it’s very easy. In fact I wish I had just written a guide for how to do this because it wouldn’t have taken as long for me to make. The first thing you’ll want to do is check everything off:

If you click the top-most checkbox, all the other sub-boxes will check themselves off. Now all you have to do is click the Copy button at the top (shown above). This will ask you where you want to save an ISO file. After the ISO has been created, you just have to right-click on it (while a blank DVD is in the drive) and click “Open with CD/DVD Creator” or “Open with Brasero” or “Open with Gnomebaker”, depending on the burning software you have installed. This will burn the ISO image to the DVD, and once you insert it into a DVD player, it’ll play just like a regular DVD with menus and all. Just keep in mind that when you do it this way, you might see a little worse video quality because the menus, all the extra audio streams that you may not need or want, deleted scenes, etc., have been included. And because the average single layer blank DVD can only hold about half that of a regular DVD, everything has been re-encoded and shrunk.

More information can be found at:

13 Responses to “How To Backup A DVD with Ubuntu Linux”

  1. Mark Sanborn Says:

    Nice guide, you ever have any problems copying discs with ARccOSprotection?

  2. david_steinlage Says:

    I’m not sure if I’ve ever encountered that type of encryption or not. libdvdcss2 seems to be able to decrypt everything I’ve throw at it in the past, but that doesn’t count for much (I’m not THAT much of a movie buff).

  3. Paul Says:

    Thanks, this is really useful for me. I love that I can get almost any kind of software for Ubuntu, but some of it needs a bit o explanation. Yours is simple and did the trick. (my copy of the Matrix was scratched, that’s just not acceptable to a geek!)

  4. shirt Says:

    What do you do about newer encrypted DVDs that appear to be 65 GB file size? I usually use k9copy, but each “title” (19 of them as an example) are all 4.4gb big.

  5. david_steinlage Says:

    @shirt:

    There is no such thing as a DVD that can hold 65GB. Most DVDs are single-sided dual layered and only hold 8.54GB of data. The max capacity of a Dual-sided + Dual-layered DVD is 17.08GB. Even a Dual-layered Blueray disc can only hold no more than 50GB. The deceased HD-DVD format would only hold 30GB max. My only guess is that you obtained this disc from someone who is in possession of a flux capacitor, a DeLorean and 1.21 jigawatts of electricity and took the wrong disc back to the rental place by mistake. Call the place you got this disc from and notify them of the perilous situation we’re all facing, as the very fabric of space time is at risk of being irreversibly damaged!!!!

  6. Jaylor Says:

    David steinlage:
    Despite the arrogance of your comment you are correct about the size issue. but what shirt said is true the newer discs like race to witch mountain claim to be Larger then possible. witch mountain claims it is 49.5GB on a dual layer dvd either this time traveling dvd salesmen is running rampant or the disc is designed to Display a false file size.

    does anyone know a fix for this?

  7. Calbadude Says:

    The only fix that I have found for the issues that you are having is to download a Windoze program called DVDFab Decrypter. I hate to be the one to suggest it but that program will allow you to access and copy those DVDs. Best of luck!!!

  8. fairportfan Says:

    Windows DVDFab Platinum (Not free. Theoretically.) is the bee’s knees for copying DVD.

    Cleans up all types of protection, eliminates ODP, allows you to shrink or to split DVDs.

    However, it is a Windows program.

    Your call.

  9. rocklobster Says:

    Try DVD Ranger for windows, it it the best. Better than DVDNextCopy or any of the rest. They license the underlying tech to the rest, DVDNextCopy and others. DVD Ranger is the best I have ever used for windows.

  10. Richard Burn Says:

    Thanks for the guide. QUite a few of my precious dvd are getting scratched, so time to make some backups!

  11. Suniga Says:

    Like the post! Thank you

  12. Tater Says:

    I had the same over reported Gig trying to copy a couple of new dvds. K9Copy usually does great but not on these, Finally i tried K3B and just used Copy Media, with a Dual Layer Disk to copy to. Perfect Copy for Both Disk!!

  13. woohoo Says:

    try acidrip on linux, a utility with GUI which converts your dvd to avi for easy storage on HDD, baby!

Leave a Reply

*