Hack 59. Rip a DVD
Use dvdbackup to create a backup copy of your DVD to your hard drive for later encoding or burning to blank media. Like with CD ripping and encoding, DVD ripping and encoding involves a number of steps. Like CD ripping, DVD ripping requires that you extract all of the tracks from a DVD onto your filesystem. Unlike CDs, DVDs have a much different file structure. Under Linux you can mount a DVD like a data CD and view the file structure. Unlike CDs, many DVDs have encrypted video tracks, so backing up a DVD to a hard drive, especially if you intend to perform any encoding later on, requires special tools to manage the CSS encryption. This hack describes how to use the dvdbackup tool to back up all or part of a DVD to disk so that you can later encode it to different video formats or burn it back to a new DVD. dvdbackup is one tool in the DVD-Create suite of DVD tools. It may or may not already be packaged by your distribution. If not, download the dvdbackup source from http://dvd-create.sourceforge.net and build and install it. 3.14.1. Back Up an Entire DVDdvdbackup can back up either an entire DVD, or just specific tracks you specify. To backup the entire DVD, use the M option. Use the i and o arguments to specify the input file (path to the DVD device) and output directory to store the DVD files respectively. So, to back up a DVD at /dev/ dvd to your ~/dvdrip directory, type: $ dvdbackup M i /dev/dvd o ~/dvdrip/ This operation takes some time, as dvdbackup is copying over four gigabytes of data from the DVD. Once DVD is finished, a new directory under ~/dvdrip is created and named after the title dvdbackup detected for your DVD. Inside that directory is the complete file structure for your DVD:
3.14.2. Back Up Specific TitlesIn some cases, such as when you plan on encoding the DVD files later, you may not want to copy every file from the DVD: you may want only the main feature. In this case substitute M for -F: $ dvdbackup F i /dev/dvd o ~/dvdrip/ You can also back up specific titles on the DVD. If, for instance, you want to back up only the second title from the DVD, type $ dvdbackup T 2 i /dev/dvd o ~/dvdrip/ This will only copy the VTS_02_* files from the VIDEO_TS directory. You can even back up specific chapters within a title if you don't want the complete movie. The s option specifies which chapter to start with, and the e argument specifies which chapter to end with. So to rip chapters 10 through 13 on title one, type: $ dvdbackup t 1 s 10 e 13 i /dev/dvd o ~/dvdrip/ |