skip navigation

www.Hilands.com


Content:: Linux Backing up DVD's

Backing up your DVD movies in Linux
Last Modified: 2013-03-13
Copying DVD's isn't as simple as using the dd tool to make an ISO and copying the ISO to a DVD rom. We will use some tools from the dvd+rw-tools package to copy the DVD, create an ISO image, show you how to mount the ISO image to play with popular tools like VLC, and create a backup copy of your DVD movie.

Table of Contents
dd doesn't work
Normally we'd use dd (data description) to do low level copies or exact copies of data. For CD's, DVD's, Hard Drives, and other types of media. However if we try this with a DVD movie this will fail. # dd if=/dev/dvd of=/opt/dvd/The_Bourne_Identity-fs.iso
dd: reading `/dev/dvd': Input/output error
3456+0 records in
3456+0 records out
1769472 bytes (1.8 MB) copied, 0.453091 s, 3.9 MB/s
Getting the tools we'll need
To get the tools we'll need while on a debian system we can simply install the dvd+rw-tools package. # apt-get install dvd+rw-tools If this does not install the dvdbackup tool as a dependency we will also need to run # apt-get install dvdbackup
Creating a simple folder structure
Next set up some folders to store the "raw" and iso images in. # mkdir /opt
# mkdir /opt/dvd
# mkdir /opt/dvd/rawmovie
# cd /opt/dvd/
Creating an ISO from the DVD movie
We will be using the "dvdbackup" tool to copy the raw data into a sub folder. # dvdbackup -i /dev/dvd -M -o /opt/dvd/rawmovie A new subfolder will appear in /opt/dvd/movie/ which is generated from the DVD itself. In our sample case we're going to copy our "The Bourne Identity" which will create the folder "THE_BOURNE_IDENTITY." The output while this process runs will be similar to the following.
libdvdread: Using libdvdcss version 1.2.10 for DVD access

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000220
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x0001edea
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x00029355
..........
libdvdread: Get key for /VIDEO_TS/VTS_16_1.VOB at 0x003f4ca9
libdvdread: Elapsed time 0
libdvdread: Found 16 VTS's
libdvdread: Elapsed time 2
Next we'll convert the DVD into an ISO file, this will allow you to either mount and ISO to watch the video or use the ISO to create a backup copy of your DVD. The tool we'll use is called "genisoimage." # genisoimage -dvd-video -o /opt/dvd/The_Bourne_Identity-FS.iso /opt/dvd/rawmovie/THE_BOURNE_IDENTITY/ The output should look similar to the following:
I: -input-charset not specified, using utf-8 (detected in locale settings)
  0.12% done, estimate finish Sat May 26 23:19:13 2012
  0.24% done, estimate finish Sat May 26 23:19:13 2012
  0.36% done, estimate finish Sat May 26 23:19:13 2012
  0.48% done, estimate finish Sat May 26 23:22:40 2012
..........
 99.77% done, estimate finish Sat May 26 23:23:19 2012
 99.89% done, estimate finish Sat May 26 23:23:19 2012
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 4096
Path table size(bytes): 26
Max brk space used 21000
4159545 extents written (8124 MB)
You should now have an ISO in your /opt/dvd/ folder!

Playing the movie from the ISO file
This is the point where I would normally stop as the primary purpose I have for copying my DVD's is to play them on my netbook which is plugged into my television.

To play the DVD from an iso you can mount the iso with the loop command to your prefered mount location. My preference is to use the /mnt/dvd folder, if the folder does not exist create it. # mkdir /mnt/dvd/

We will use the mount command to loop the ISO so our system believes its a real DVD rom. # mount -o loop /opt/dvd/The_Bourne_Identity-FS.iso /mnt/dvd/

After mounting the folder you can verify that it mounted properly by getting a listing of the files in /mnt/dvd/ # ls /mnt/dvd
VIDEO_TS

Play DVD iso with VLC
You can now point your prefered player to "/mnt/dvd/".
In VLC select the Media menu bar and the Open Disc menu item.
In the Disc device text field type in /mnt/dvd and click the Play button.
Creating a DVD Disc from the ISO file
To finalize the backup we will want to copy the ISO to a DVD disc. We will be using the program wodim, some linux distributions may use cdrecord instead.
To install wodim we can use # apt-get install wodim Wodim requires a pretty simple input, the device and location of the iso. # wodim -v -data dev=/dev/sr0 /opt/dvd/The_Bourne_Identity-FS.iso