CLI Magic: Video conversion with mencoder

Mencoder is part of the MPlayer media player package. While MPlayer can play audio and video files, mencoder converts and manages multimedia files. The application has a ton of graphical user interfaces, but you can use it from the command line to produce video files in almost any format you want. Here's how.

Among the file types mencoder can handle are MPEG/VOB, AVI, ASF/WMA/WMV, RM, QT/MOV/MP4, Ogg/OGM, MKV, VIVO, FLI, and FLV. The command syntax is straightforward despite a wealth of options. There's little mencoder can't do when it comes to multimedia conversion.

Here's a simple command that converts an MPG file to AVI format: