How To: Rip a DVD to .avi

As you might have come aware, mplayer has become one of the most popular video players on the internet because of it's wide variety of media format support. In order to support such wide variety of media formats a decoder/encoder was needed and hence mencoder was born. A close sibling mencoder was built from the same code as mplayer and released under the GNU General Public License. It can read from every source which mplayer can read, decode all media which mplayer can decode and it supports all filters which mplayer can use.

Without going into too much detail as there are numerous articles on this package, the typical three-step, command-line way to rip your favourite DVD into an .avi file is;

NOTE: The final output should be almost indistinguishable from the original source disc.

Firstly, dump the contents of the DVD to a big fat .vob file, usually around 5 or 6 gigabytes:

@her###:~$ mplayer dvd://1 -v -dumpstream -dumpfile dump.vob

Then you need to confirm the contents settings:

@her###:~$ mplayer -aid 128 -vf cropdetect dump.vob
[CROP] Crop area: X: 0..719 Y: 0..575 (-vf crop=720:576:0:0).% 0 0
...


Run the mencoder:

@her###:~$ mencoder -ovc xvid -oac mp3lame \
> -xvidencopts fixed_quant=4 -lameopts cbr:br=192 -aid 128 \
> -vf crop=720:576:0:0,yadif -lameopts vol=3 \
> -o movie.avi dump.vob


The input is a .vob file, the output an .avi file with MPEG-4 video and MP3 audio. Please note that
--xvidencopts fixed_quant=4 provides high quiality video with a single rendering pass. Furthermore, the audio stream is MP3-encoded so you need to enable LAME support by passing --oac mp3lame using 192 bitrate for a good sweet spot audio quality.

Finally ditch the optical disc and enjoy your movie on your media centre.

No comments:

Post a Comment