A both complete and comprehensive article regarding mencoder is presently under development. Please check back to this page within the next several days for an update. This article will include an advanced Perl script that will assist in automating the encoding process. For information concerning this article and it's status, please send me ( ispyhumanfly ) a message via the wiki.
MEncoder and MPlayer share a man page. It can be found by
The basic syntax for a conversion is
mencoder originalvideo.mpg -o savevideoto.avi -ovc outputvideocodec -oac outputaudiocodec
So to convert movie.mpg to movie.avi with DivX video and MP2 audio, the command is
mencoder movie.mpg -o movie.avi -ovc lavc -oac lavc
The default codecs without any options are MPEG4 for Video and MP2 for audio.
And that's basically how to convert a video. However, it is much more useful to find some more options, to make it more useful. For input codecs, mencoder can use any codec that mplayer can play, so to tell if it will work with you video, just try playing it. There are more input codecs than output supported currently. You can input Matroska and Ogg, but cannot output to them (yet). To find options for output video codecs, use the command
mencoder -ovc help
Similarly, to find output audio codecs, run
mencoder -oac help
This information can also be found here where it better explained, although non-specific. There are many more options than this. You can define bitrates and expected sizes. The gentoo wiki has a lot more information on the usage of mencoder.