Eric Radman : a Journal

Transcode DVD Tracks

Dual-pass Encoding

If you want to encode a track from a DVD try this:

$ mencoder dvd://1 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 \
  -oac mp3lame -lameopts vbr=3 -o /dev/null
$ mencoder dvd://1 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vpass=2 \
  -oac mp3lame -lameopts vbr=3 -o chapter1.avi

The playback quality of ov dual-pass MPEG is awesome, but the encoding takes a long time.

Windows

To encode a video so that Windows Media player can understand it do something like this:

$ mencoder dvd://1 -ovc lavc -lavcopts vcodec=wmv2:vbitrate=2048 \
  -oac mp3lame -lameopts vbr=3 -o chapter1.avi

Or to make an MPEG-1 video that will play in a presentation:

mencoder dvd://2 -ovc raw -oac pcm -ss 00:49:53 -endpos 46 -o clip1.avi
ffmpeg -i clip1.avi -target ntsc-vcd clip1.mpg

Another favorite option of mine is to specify a new size for the video:

-vf scale=640:480

Copying Specific Clips

A commercial regular DVD is arranged into chapters and using -ss and -endpos will start at a specific time and end in so many seconds. Here I'm using ffmpeg to create a MPEG that can be embedded into a presentation:

$ mencoder dvd://2 -ovc raw -oac pcm -ss 00:49:53 -endpos 46 -o clip1.avi
$ ffmpeg -i clip1.avi -target ntsc-vcd clip1.mpg

If a DVD has been created by recording from a video tape then the proper indexing may not exist on the disc, so an index file needs to be created:

$ mencoder dvd://1 -ovc copy -oac copy -o movie.raw
$ mplayer movie.raw -forceidx -saveidx movie.idx

$ mencoder movie.dvd -loadidx movie.idx -ovc raw -oac pcm -ss 00:25:22 -endpos 61 -o clip2.avi
$ ffmpeg -i clip2.avi -target ntsc-vcd clip2.mpg

References

HOWTO Convert audio files

HOWTO Convert video files

$ Thu Jan 29 08:29:01 -0500 2009 $