Sunday, June 04, 2006

Mencoder 3-Pass Encoding Quick HOWTO

Mencoder is available for both Linux and Windows and can be used to rip DVDs. The following is a very basic example, a series of examples and guides on encoding parameters can be found on encoding-tips, which were collected from mplayer-users. Each step presented below is a single command.

Step 1:

If frameno.avi exists, remove it.
rm frameno.avi

Step 2:

The first pass extracts the audio stream for the video.
mencoder dvd://1 -ovc frameno -o frameno.avi 
-oac mp3lame -lameopts vbr=3
Step 3:

The second pass is the first pass of video encoding
mencoder dvd://1 -ovc lavc -lavcopts 
vcodec=mpeg4:vpass=1 -oac copy -o video.avi
Step 4:

The third pass is the second pass of video encoding and the audio from frameno.avi will be inserted.
mencoder dvd://1 -ovc lavc -lavcopts 
vcodec=mpeg4:vpass=2 -oac copy -o video.avi

No comments: