Evanescent Thoughts

Evanescent Thoughts

Using mencoder to convert Videos in Linux

with 4 comments


Have you ever wondered bothering to check on  why windows has so many video converters ( of course the pirated ones :P ) . If you have gone to that extent , you would have realised that the backend for almost all of them is a command line utility called “mencoder”(Its not “men”coder :P . Its “m”-encoder  :P ) .  There is actually lots to tell about this mencoder . There is also command line player called mplayer which is the counter part of the encoding utility mencoder . mplayer can play all your music in command line and it has support for managing playlist and everything .

To remind you, mencoder was realeased under the GNU  GPL and hence as you would expect , there should me more utilities based on mencoder on Linux than Windows. But sadly i exhausted all my resources to finding a suitable GUI for video conversion in Linux . All that i found were small ones that could not handle the full capacity of mencoder. And so was i fed up with this searching process and started to realise why i hadnt tried using mencoder from CLI. I had earlier used mplayer in some occasions . I had this movie which was in VOB format and i wanted to convert it to avi format to reduce the space . I couldnt find any useful repo for video conversion . (If any good ones please let me know ) .

Usually anything you use on Linux is well documented and i would go for the man pages. But i actually cursed myself for typing “man mencoder”.  This mecnoder is “WELL” documented that there are 6287 lines of documentation . And thats when i realised the actual power of mencoder . You can almost do anything with a video or audio using mencoder . I could find options for mirroring , rotating the screen and almost conversion from any format to anyother format. But the catch was you will have to do this all in CLI . :P

So i sat down , scanned through the man pages and foung my exact options for converting from VOB to avi . I would suggest you do this before trying out mencoder .

man -t mencoder > mencoder.ps && ps2pdf mencoder.ps .

This should get you the man pages of mencoder and mplayer in pdf file so that you can read it comfortably .

I cant going into details of mencoder  usage because its so big to explain and I havent tried out even 1% of its full options. I am posting below two screen shots of the conversion process .

I executed the following command to convert from VOB to avi .

mencoder ./Mahanadhi/VTS_1.VOB  -o ./Mahanadhi/1.avi  -of  avi -oac  copy lavc -lavcopts vcodec=mpeg4

Below you can see a screenshot of the conversion process :) .

mencoder01

Written by Sathya Narayanan

January 25, 2009 at 12:26 am

4 Responses

Subscribe to comments with RSS.

  1. […] jimmyobishop wrote an interesting post today onHere’s a quick excerpt Have you ever wondered bothering to check on  why windows has so many video converters ( of course the pirated ones ) . If you have gone to that extent , you would have realised that the backend for almost all of them is a command line utility called “mencoder”(Its not “men”coder . Its “m”-encoder  ) .  There is actually lots to tell about this mencoder . There is also command line player called mplayer which is the counter part of the encoding utility mencoder . mplayer can play all your music in command line and it has support for managing playlist and everything . To remind you, mencoder was realeased under the GNU  GPL and hence as you would expect , there should me more utilities based on mencoder on Linux than Windows. But sadly i exhausted all my resources to […] […]

  2. There is one GUI to mencoder that I found pretty useful: avidemux. This has most of the inter-conversion options and easy to use as well. I actually wanted to use the command line but did not really know how to tweak so many options provided by mencoder! :P
    There happens to be a GUI for mencoder in Windows as well for all those windows freaks. Its called Any Video Converter and its free.
    Talking about piracy in windows softwares, you seem to be ripping Mahanadi: Is it a legal copy that you bought? ;)

    Karthik Swaminathan

    January 25, 2009 at 7:43 pm

    • I too tried avidemux. I didnt find any options to convert . All i found was options for splitting and stuff( may be i didnt have the patience to go through properly ) … And i think most of the video converters in all platform use mencoder . How can you ignore something that has options to do everything :P . ..
      And btw tht mahandhi is pirated one :P .. I was only talking about software piracy u see :D

      Sathya Narayanan

      January 25, 2009 at 7:52 pm

  3. there are many free software video converters on the internet that we can download but the best ones are always paid version *

    Headboard Light ·

    November 4, 2010 at 4:52 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 30 other followers

%d bloggers like this: