Flexion.Org
Bad grammar and typos for total strangers
Wiki › DVDRipping
Wiki Index All Recent Edit Bottom

DVD Ripping

1.   Introduction
2.   Useful tools
3.   Normal DVD
3.1   DVD 95
4.   ARccOS & Other intentional sector corruption
4.1   VLC
4.2   Handbrake
4.3   Installing Handbrake GTK
4.4   Installing Handbrake
4.5   Using Handbrake
4.6   Extra Options
5.   Other Links

Introduction

Why do I rip DVDs? I'll give you two reasons...

  • Every so often I find myself in Blockbuster looking through the "bargain bin". Quite often I find something I consider a bargain. However, the movie experience of watching an ex-rental DVD is typically ruined by the various trailers and marketing guff at the start which you can't skip. My wife hates that stuff, and I love my wife, so I routinely rip the main feature of newly acquired ex-rental DVD movies so we can avoid that crap.
  • I am building a Linux based media server and I want to pre-load it with all my DVDs. Ripping them helps reduce the amount of storage I will require.

Useful tools

If find these tools useful for ripping DVDs and checking and playing the result.

 sudo aptitude install lsdvd mpeg4ip-utils vlc vobcopy 

Normal DVD

If a DVD does not have any funky intentional sector corruption (see ARccOS below) then you can use DVD95 to make a DVD rip.

DVD 95

DVD95 is a GNOME application to convert DVD9 to DVD5 (4.7 GB). The user interface is aimed at being simple and elegant to use. DVD95 is free and open-source software licensed under the terms of the GNU GPL v2.

Installing DVD 95

 aptitude install dvd95

Ripping with DVD95

  • In the global DVD95 Properties I keep the Menus, use Dynamic Quality, keep the credits and create an 4.7GiO ISO.
  • For each rip I keep the main feature, main soundtrack and main English subtitle track.

References

ARccOS & Other intentional sector corruption

Sony has released a "copy-protection" system wherein sectors on the DVD disc have bad CRC checksums. There are a couple of solutions for Linux that enables backup of these protected discs.

ARccOS protection causes most programs to hang in the first few hundred megabytes on some corrupted sectors. VLC and Handbrake are able to rip such discs, well they have both been able to rip the ARccOS DVDs I have tested but I don't have many.

VLC

First identify the title number you want to rip. I use 'lsdvd'.

 lsdvd /dev/dvd

The output look something like this, and I can see I want Title 01.

 Disc Title: A_FILM
 Title: 01, Length: 01:37:50.200 Chapters: 20, Cells: 21, Audio streams: 08, Subpictures: 32

 Title: 02, Length: 00:07:46.000 Chapters: 05, Cells: 05, Audio streams: 01, Subpictures: 00

 Title: 03, Length: 00:02:29.210 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 01

 Title: 04, Length: 00:03:00.210 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 01

 Title: 05, Length: 00:02:53.160 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 01

 Title: 06, Length: 00:02:20.210 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 01

 Title: 07, Length: 00:00:55.120 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 01

 Title: 08, Length: 00:03:16.010 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 01

 Title: 09, Length: 00:01:04.020 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 01

 Title: 10, Length: 00:01:27.280 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 00

 Title: 11, Length: 00:01:58.370 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 00
 
 Title: 12, Length: 00:00:31.090 Chapters: 01, Cells: 01, Audio streams: 00, Subpictures: 00
 
 Title: 13, Length: 00:00:11.330 Chapters: 01, Cells: 01, Audio streams: 01, Subpictures: 00
 
 Longest track: 01

VLC is able to rip with this command:

 vlc dvd:/dev/dvd@01 --sout "#standard{access=file,mux=ps,dst=movie.mpeg}"

The @01 specifies the title number your discovered earlier. You can even specify the chapter, angle, specific audio and subtitle tracks. From the VLC man page.

 dvd://[<device>][@<raw device>][@[<title>][:[<chapter>][:<angle>]]]

If you need to specify a particular audio track or subtitles than can be done too.

 dvd:/dev/dvd@TITLE --audio-track X --sub-track Y --sout "#standard{access=file,mux=ps,dst=movie.mpeg}"

Handbrake

Handbrake is an open-source, GPL-licensed, multi platform, multi threaded DVD to MPEG-4 converter, available for MacOS X, Linux and Windows. Handbrake GTK is a graphical front end to Handbrake.

Installing Handbrake GTK

The 1.0.1 .deb package will not install on Ubuntu Hardy 8.04 because it requires the 'mono' package which goes by a different name in Hardy. So, we will extract the .deb and install the files manually.

Handbrake 0.9.1 CLI is shipped with Hanbrake GTK, so we install Handbrake GTK first and replace Handbrake CLI with 0.9.2 afterwards.

 wget http://dfn.dl.sourceforge.net/sourceforge/rippedwire/handbrakegtk_1.0.1_i386.deb
 dpkg -x handbrakegtk_1.0.1_i386.deb .

Now we will remove so crap from the extracted Handbrake GTK files and fix some incorrectly named files.

 rm -rf usr/bin/handbrakegtk~
 rm -rf usr/share/applications/brasero.desktop~ 
 rm -rf usr/share/doc/HandBrakeGTK/README.txt~
 mv usr/share/applications/brasero.desktop usr/share/applications/handbrake.desktop

Copy the corrected files.

 sudo cp -Rv usr/* /usr/

That's it.

Installing Handbrake

Now we will replace Handbrake CLI 0.9.1 with 0.9.2.

 wget http://handbrake.fr/rotation.php?file=HandBrake-0.9.2_i386.tar.gz
 tar zxvf HandBrake-0.9.2_i386.tar.gz
 sudo mv HandBrakeCLI /usr/bin/HandBrakeCLI

Using Handbrake

Apparently, Handbrake GTK is buggy so I use Handbrake from the shell. HandBrake offers hard coded, factory-fresh presets. To see a list of all the preset names and settings, type:

 HandBrakeCLI --preset-list

To use a preset, type, for example:

 HandBrakeCLI -i /dev/dvd -o movie.mp4 --preset="PS3" 

So it's...

 --preset="Preset Name"

...spelling and spacing and capitalization count.

Extra Options

I used the "PS3" preset along with the following options which select to longest title, adds chapter markers, scans subtitles and only includes them if found for foreign language segments.

 --longest --markers --subtitle-scan --subtitle-forced --native-language eng  

If I need to specify a particular title and/or audio track, add the following..

 --title 1 --audio 2

If I want to preserve Dolby Digital, add the following...

 --aencoder aac+ac3

NOTE! If you want to have Dolby Digital in a MPEG-4 container you must use the .m4v file extension. Currently VLC isn't able to detect the AC3 audio track in a MPEG-4.

When the rip has completed, you can check the results by using mp4info.

 mp4info movie.m4v 

The results will look something like this.

 mp4info version 1.6
 BEHIND_ENEMY_LINES.m4v:
 Track	Type	Info
 1	video	H264 Main@4.1, 6086.920 secs, 2492 kbps, 720x436 @ 25.000000 fps
 2	audio	MPEG-4 AAC LC, 6086.826 secs, 160 kbps, 48000 Hz
 3	audio	ac-3, 6086.880 secs, 384 kbps, 48000 Hz
 4	text
  Tool: HandBrake 0.9.2 2008021900

References

Other Links

Here are some other links with interesting information about DVD ripping on Linux.

References

$Id: DVDRipping,v 1.43 2008/05/29 09:55:20 martin Exp $

Wiki Index All Recent Edit Top
 
Valid XHTML Valid CSS Hacker