HOWTO DVD-Ripping

From Gentoo Linux Wiki

Jump to: navigation, search
This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc
Wikipedia has an article on:
Wikipedia has an article on:

Contents

[edit] Intro

Knowing how to rip DVDs is useful for backing up your movies and storing them for easy access on your hard drive. Why search through all those stacks of DVD cases when you can simply cd to a directory? The average 8.5GB DVD can be compressed down to 1.4GB (2 CDs) and retain near-perfect quality. This article describes how to rip DVDs using transcode and dvd::rip.

[edit] Setup

First you need to enable some USE flags, namely the ones used for DVD authoring. Fire up your favorite text editor and add the following USE flags to your /etc/make.conf: a52, avi, dvdread, divx4linux, dv, encode, fame, mjpeg, mpeg, ogg, quicktime, subtitles, vorbis, xvid.

Install dvd::rip and transcode. Make sure the above USE flags are set. If you have not already installed xvid, libvorbis and libquicktime, they will be installed now:

# emerge -av dvdrip transcode

Update your packages:

# emerge -Nav world

To get subtitles you have to install subtitleripper:

# emerge -av subtitleripper

If you get following error when starting dvd::rip

# [filterlist] (re)scanning transcode's module path /usr/lib/transcode...

Then emerge transcode without the imagemagick flag

# USE="-imagemagick" emerge -av transcode

[edit] dvd::rip configuration

As dvd::rip is fairly easy to navigate, this part of the wiki goes over the settings that give the best quality video for most projects.

[edit] Storage Tab

Enter a name for your project. For the VOB, AVI and Temporary Directory specify somewhere with a lot of free space, at least 9GB (assuming you are ripping a full 4.7GB movie). The rule for storage is double the free space as the size of the raw file. If you don't have enough free space, you will need to rip and encode on the fly, which limits your available options and usually results in a lower-quality encode.

Then choose either Rip data to harddisk before encoding or Encode DVD on the fly as is appropriate for your situation.

[edit] RIP Title Tab

Click Read DVD Table of Contents and wait while dvd::rip scans the DVD. Select the title you'd like to rip. If it is a movie, then it is usually the first track, and the longest.

Click RIP Selected Title(s)/Chapter(s).

Wait a long time. This process could take a two or three hours for a movie.

[edit] Clip & Zoom tab

Under Adjust Clip and Zoom Parameters, for the Presets option choose Autoadjust, Small Frame Size, HQ Resize. There are many options to choose from, if you have time try a couple different ones and see how they affect the quality of your encode. Click on Apply Preset Values.

[edit] Subtitles Tab

My preferred way of storing subtitles is in vobsub files, that way they can be enabled or disabled according to choice. Pick each of the available subtitles you want to make into vobsub files, and then select Create Later After Transcoding.

[edit] Transcode Tab

[edit] Container options

The choices are OGG, AVI, and MPEG. All of them have their uses.

  • Ogg is a free, open source container, and supports nice things such as multiple embedded audio and subtitle streams. It is an excellent format.
  • AVI is the Microsoft Audio Visual Interleaved multimedia file type. It's fairly standard for most things, and has built in support in many media players. I would advise using this whenever there is no need for multiple audio streams. AVI does not support subtitle streams, so they have to either be "hardcoded" in (which means they cannot be disabled and are a permanent feature in the video) or saved as an external file and manually selected with your video player of choice.
  • MPEG is yet another video format, from the people who brought you mp3s. It's a fairly ancient format. I don't know much about it, besides that the avi and ogg are generally better. Use them instead. MPEG-4 however, is something to watch out for... If there is ever support for it in dvd::rip, it will likely surpass avi and ogg.

One thing I find lacking is support for the MKV container format. It handles multiple audio and subtitle streams like ogg.

[edit] Video options

There are a lot of choices here. Some of the more popular codecs, for general DVD backup, are DivX and XviD (the open source version of DivX). If you want to research this further indepth, there is plenty of debate and forum out there. A place to check is the doom9 forum, as most of this info is pulled from there. There are no "best" settings for all projects, as it depends heavily on the target size of the encode and the source. The defaults are pretty good, but the changes here are generally good ones.

[edit] XviD

XviD is a highly configurable codec, and a nightmare for the unprepared. Fortunately, this wiki page is here to help. Select xvid4 and click Configure. It should launch a program called "xvid4conf".

Features:

  • Quant Type: mpeg: MPEG provides a nice, crisp picture for high bitrate encodes (greater than 1000 kbps). Assuming you are ripping from a DVD source, this is what you want. This is optionally changed later with a custom quantization matrix, which is better than the mpeg default.
  • Motion: 6 - Ultra High, VHQ: 4 - Wide Search: both of these modify the quality. The encode will take longer, but just leave it on overnight :)

Select Chroma ME, HigQ AC, Trellis Quantizer and Turbo Mode. Select Cartoon Mode if you're encoding cartoon-ish things. Leave the B-Frame numbers alone, the defaults are fine. Enable Quarterpel and Closed Gop, and turn Packed off.

[NOTE] Beware if you want to be able to play your ripped files on a standalone DVD player with DivX support, chances are that the player doesn't support QuarterPEL.

  • Quantizers: leave the settings for I-Frame, P-Frame and B-Frame.
  • Intra and Inter Matrix Files: this is an optional step, as the "Quant Type" setting provides reasonable defaults. Don't mess with this unless you know what you're doing. There are some matrixes available for pasting into the Matrix Editor at doom9 if you search around a bit. The famous ones are 6of9 (SixOfNine).

Leave the Single Pass and Two Pass tabs alone. Go to Save/Load, and save this config somewhere and quit.

Select Two Pass encoding and no deinterlacing. Filters can provide a visually better picture, but we aren't going to go over them here. It's okay to leave them off.

[edit] Video bitrate calculation

A standard for a DVD movie is a 2 CD (2 x 700MB) rip. It's usually pretty good. If you're encoding episodes, or things smaller than a movie, you don't need 2 CDs.

[edit] Audio Options / Target Track

Select an audio track. Unless you want the dual audio, just choose the one in your native language and disable the rest. Using MP3 or Vorbis is personal preference, but Vorbis requires you to use the OGG container. Generally, I would recommend using MP3. 128 kbps bitrate is plenty. Use the highest quality setting, Quality - 0 for mp3, and leave it at 3 or 4 if using Vorbis.

[edit] Final Steps

Click on the Transcode button at the bottom, and go do something else. It takes a while.

[edit] Alternative: Using MEncoder

It is also possible to use MEncoder to rip a DVD. While you'll have to use the command line, it definitely has its uses. For instance, MEncoder can encode some buggy video files which transcode refuses to read. See MEncoder/Rip DVD for more information.

[edit] References

[edit] See also

[edit] External links

Personal tools