2008年9月24日 星期三

Convert video by mencoder

mencoder is cross-platform command line video decoding, encoding and filtering tool. it can convert all the formats that MPlayer understands.

a converting example like below

mencoder in.video -oac mp3lame -lameopts preset=64 -ovc lavc -lavcopts vcodec=mpeg4 -ofps 25 -vf scale=320:240 -ni -o out.video

-oac #encode with the given audio codec (no default set).
-oac help #get a list of available audio codecs.
-<codec>opts #codec specific encoding parameters

preset=<value> #ABR encoding at average given kbps bitrate

-ovc #encode with the given video codec (no default set).
-oac help #get a list of available video codecs.

vcodec=<value> #employ the specified codec (default: mpeg4).
#windows media player comptiable format: msmpeg4, msmpeg4v2, wmv7

-ofps #specify a frames per second (fps) value for the output file
-vf scale=x:y #resize video

-ni #force usage of non-interleaved AVI parser (fixes playback of some bad AVI files).

-o #output filename

沒有留言: