Encode video for nokia (using mencoder)
Sunday, February 14, 2010 5:19:49 PM
Mencoder (a tool comes with mplayer) is a great encoding tool for linux. I've used this to encode raw videos, video cut/paste, extracting audio/video, encode for dvds, encode for many other players. The thing i like most about it is the fine control it gives to user.
So today i encoded a video for my mobile device (Nokia E66). Now i can watch those while traveling
. E66 supports mp4 videos and has a resolution of 320x240. Here is the one liner for this:
man mplayer explains all the options in detail. The important thing here is scale=320:-2. 320 is the width my phone supports. -2 tells mencoder to adjust height according to prescaled aspect ratio.
Happy encoding
.
So today i encoded a video for my mobile device (Nokia E66). Now i can watch those while traveling
. E66 supports mp4 videos and has a resolution of 320x240. Here is the one liner for this:$ mencoder -oac lavc -ovc lavc -lavcopts vglobal=1:aglobal=1:acodec=libfaac:vcodec=mpeg4:level=31 -of lavf -lavfopts format=mp4 -vf scale=320:-2 <in_video> -o <out.mp4>
man mplayer explains all the options in detail. The important thing here is scale=320:-2. 320 is the width my phone supports. -2 tells mencoder to adjust height according to prescaled aspect ratio.
Happy encoding
.



