[Home]DVD Ripping And Burning

The following instructions should never be used to copy a commercial DVD or any DVD containing any material that you do not have the legal right to copy!! You can get in serious trouble by copying a commercial DVD!!

Similar page: Ripping DVD To Avi


Movie DVD's use the UDF filesystem, which is supported perfectly by the linux kernel. Build your kernel with UDF filesystem support, and you can mount a DVD:

 mkdir /mnt/dvd
 mount -t udfs /dev/cdroms/cdrom0 /mnt/dvd
 ls /mnt/dvd

However, commercial DVD's have an encrypted file system which, even though it can be mounted, cannot be read properly. likewise the raw device will not be able to be copied using dd.

Fortunately there are tools that can be used on both encrypted and unencrypted DVD's.


How to make an exact copy of a single layer 4.7Gb DVD:

The first required tool is dvdbackup. dvdbackup depends on libdvdread, and libdvdread depends on libdvdcss:

Invoking dvdbackup:

 dvdbackup -i /dev/cdroms/cdrom0 -v 2 -M -o /target/directory

This will cause the contents of the DVD to be written into a directory under /target/directory.

At the directory level where the VIDEO_TS directory is created by dvdbackup, you will need to create an empty AUDIO_TS directory:

 mkdir AUDIO_TS
 chmod 0700 AUDIO_TS

The file VIDEO_TS.IFO in the VIDEO_TS directory has the region code in it at hex offset 0x23. Dvdbackup does NOT set it to region 0.

To change the region encoding byte from your region to region 0 (the all region code), compile this c program, cd to VIDEO_TS, and execute it:

 /* compile me:                        */
 /*   gcc -o region-zero region-zero.c */
 /* set my perms:                      */
 /*   chmod 0755 region-zero           */
 /* move me to someplace useful:       */
 /*   mv region-zero /usr/local/bin    */
 /* run me in directory VIDEO_TS       */                                

 #include <stdio.h>

 main() {
    FILE * fd;
    fd = fopen("VIDEO_TS.IFO","r+");
    fseek(fd,0x23,SEEK_SET); /* hex position 0x23 is the region code byte */
    putc(0x0,fd);            /* write zeros to all the region code bits */
 }   

Then it is necessary to create an iso image using mkisofs from the most recentcdrtools distribution (remember that this will require 10Gb of disk space, if you don't have sufficient disk space you will see an error message stating that fwrite() failed.):

 cd /target/directory
 mkisofs -dvd-video -o dvd-title.dvd.img DVD_DIRECTORY

Where DVD_DIRECTORY is the directory under /target/directory that contains the two directories AUDIO_TS and VIDEO_TS.

In order to burn your just created dvd image to a dvd, you will need the latest version of Growisofs, which is part of the DVD+RW package found here:

 growisofs -dvd-compat -Z /dev/dvd=dvd-title.dvd.img

Growisofs can also burn the dvd directly without the mkisofs step:

 growisofs -dvd-compat -Z /dev/sr1 -dvd-video .

Another very useful tool is dvdauthor from:

http://dvdauthor.sourceforge.net

dvdauthor includes dvdunauthor which operates on dvd's or on the output of dvdbackup and decomposes the dvd structure, simultaneously creating an XML script that can be used to feed the decomposed data back into dvdauthor.


lxdvdrip Will combine all the tools and facilitate the usage a lot: http://openfacts.berlios.de/index-en.phtml?title=lxdvdrip
Using mencoder to rip dvd's to .avi files - DvdToAvi

Silverlake Linux Users Group Wiki | Recent Changes | Preferences
Password required to edit | View other revisions
Last edited December 10, 2008 6:36 pm by Phil (diff)
Search: