Mencoder Tips
Converting difficult files using Mencoder
Convert any video type to AVI and encode audio to mp3:

    mencoder %1 -o %1.avi -alang en -ovc copy -oac mp3lame -lameopts cbr:br=160

Convert any video type to DivX and MP3:

    mencoder %1 -o %1.avi -ovc lavc -ffourcc DX50 -oac mp3lame -lameopts cbr:br=160


In this example, we want to convert an MKV file called test.mkv to a DivX5 avi file.

We first extract the audio in PCM format to the file audiodump.wav (which is the default audio file name)

Then we create the avi file using audiodump.wav and copying the video stream

Then the avi file has its video stream converted to DivX5

mplayer -vo null -ao pcm test.mkv
mencoder -o test.avi -ovc copy -audiofile audiodump.wav -oac pcm test.mkv
mencoder test.avi -o test.divx.avi -ovc lavc -ffourcc DX50 -oac pcm

Media Lab Overview
LIACS Homepage
MM Conf
ACM Multimedia
Science Direct
IEEE Library
LIACS Publications
ACM Digital Library