Mencoder – da king

Many of you may know of mplayer and maybe using it too. But along with it there comes another goodie called “mencoder”. I have seen very few people using it, maybe because fame creates more fame and anonymity causes more neglect. Also because it does not have any graphic interface and runs only on the command line.

These are the things it can do:
1. Convert most formats of video into other formats. (mpeg to avi, avi to mpeg, mov to mpeg …etc…etc..)
2. You can give starting and end points as time, so that it would encode only that part of the video. This can be used to cut clips (songs, etc..)
3. I need not tell you that it also compresses files. (with whichever encoding you wish mpeg2 , mpeg4 etc..etc..)
4. You can rip DVDs with it.

In short mencoder alone does what 100 other softwares (painfully bloated sharewares and other such junk) do.

So here is step by step method to do points 1-4

If you are on linux, and have mplayer installed, mencoder must run from command line from anywhere (run it in directory you have your input file). If you are on windows then either put the video player in the directory with the mencoder.exe or mencoder.exe into the directory with the video file.

1. mencoder -ss 130 -endpos 3600 -oac copy -ovc lavc -lavcopts vcodec=msmpeg4v2 -ofps 25 input.wmv -o output.avi

This converts most formats into .avi (here input.wmv to output.avi). The input file can be mpeg, mov etc…The clip is starting from 130th second and lasts till 3600s (i hour from the 130th second) . The 25 is frames/sec. Also output.avi is the name you want the final clips name to be. msmpeg4v2 is the codec for encoding, which is mpeg 4 version2 in this.

2. mencoder -o output_file.avi -ovc lavc -lavcopts vcodec=msmpeg4:vbitrate=5000:vhq -oac lavc -lavcopts acodec=mp3 -srate 48000 -ofps 25 your_movie.mov

This converts .avi to all other formats, though appropriate codec has to be used. you can vary the bitrate. -ofps 25 is the frame rate.

I have used both these commands a thousand times and never had any problems.
This can also be used to save a real streaming video or audio.
The procedure to rip dvds can be found here.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top