顯示具有 mencoder 標籤的文章。 顯示所有文章
顯示具有 mencoder 標籤的文章。 顯示所有文章

2009年8月16日 星期日

Convert Video on Linux for Nokia N97

you can save different configurations as profiles for mencoder use.

1. create configuration file ~/.mplayer/mencoder.conf if there is not.
if in windows, the file should be put in the same folder with config and input.conf

2. edit mencoder.conf

[n97]
profile-desc="MPEG4/AAC"
vf=scale=640:-3,harddup
ovc=lavc=yes
oac=lavc=yes
lavcopts=aglobal=1:vglobal=1:acodec=libfaac:vcodec=mpeg4:abitrate=96:vbitrate=896
af=lavcresample=44100
ofps=25
of=lavf=yes
lavfopts=format=mp4

[profile2]
..
..

the quality of video from the above setting is good enough. but you still can adjust them in the suitable range
abitrate: 96 ~ 192
vbitrate: 896 ~ 4000

3. specify which profile to use

mencoder -profile n97 -o output.mp4 input_file

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