[kwlug disc.] how to extract a DVD segment as an MPEG file?

Chris Frey cdfrey at foursquare.net
Sun Jan 14 02:32:35 EST 2007


On Sun, Jan 14, 2007 at 02:06:00AM -0500, Robert P. J. Day wrote:
> 
>   what's the easiest way to grab a segment of a DVD and extract it as
> an MPEG file?  i have a DVD with its multiple .VOB files, so how would
> i, as an example, extract the segment from minute 5:00 to minute 6:00
> in MPEG format?

Use mencoder (part of mplayer).

It has -ss and -endpos switches which allow you to pick the time frame
you want.  You could also do it by chapter.

You can encode from almost anything to almost anything.  For example,
to rip a DVD in high quality XviD format:

mencoder -dvd 1 -alang en \
	-oac mp3lame -lameopts cbr:vol=3:br=96 \
	-ofps 23.976 \
	-ovc xvid -xvidencopts bitrate=684:4mv \
	-vop scale=640:272,crop=708:358:6:60 \
	-o 'SomeClip.avi' \
	-ss 1:29:00.00 \
	-endpos 0:5:0

This encodes a portion of video from Title 1 of the dvd, using the english
language, encoding the audio as MP3 (constant bit rate, boosting the volume
by 3, at 96kbps), setting the output frame rate to 23.976, using the
xvid encoder, with 684Kbps for the video stream.  It scales and crops the
image so that only the video is encoded, and not junk black bars that
might be in the video; writes the output to an AVI file; jumping
one hour and 29 minutes into the movie and taking a 5 minute clip.

You don't have to re-encode your video or audio.  You can copy it directly
as well if you want.

I'm still using version 0.90rc5, so some of the switches may have changed
slightly in the meantime, but I wouldn't think by much.

Mencoder is probably the most feature rich and capable video tool I've
used, and while there is a learning curve, I think it is well worth it.

- Chris



More information about the KWLUG-Disc mailing list