Using mencoder to convert Videos in Linux
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 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 . 😛
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 🙂 .