Friday, June 12, 2009

Mencoder / ffmpeg resizing random bits

mencoder -o tmp.avi -oac copy -vf scale -zoom -xy 176 -ovc -


ffmpeg -a .avi -sameq -vcodec xvid -acodec mp3 -s 320x240 .avi

mencoder -v 1.vob \
-alang en \#language english
-vf yadif \#yadif deinterlacer
-ovc x264 \ #codec x264
-x264encopts subq=4:bframes=4:b_pyramid:weight_b:pass=1:psnr:bitrate=1800:turbo=1 \ #1800 bitrate gives a good size to qualit ratio
-oac copy \ #for now only copy the audio
-ofps 24000/1001 \#approx 23.9 fps
-slang en \
-o /dev/null

Second pass:

mencoder -v 1.vob \
-alang en \
-vf yadif \
-ovc x264 \
-x264encopts subq=5:partitions=4x4:8x8dct:frameref=3:me=hex:bframes=4:b_pyramid:pass=2:psnr:bitrate=1800 \
-oac mp3lame \ #mp3lame audio codec
-lameopts abr:br=256:vol=7 \ #256kbits bitrate
-ofps 24000/1001 \
-o 1.avi #write everything as avi for now



10.6. Rescaling movies

Often the need to resize movie images emerges. The reasons can be many: decreasing file size, network bandwidth, etc. Most people even do rescaling when converting DVDs or SVCDs to DivX AVI. If you wish to rescale, read the Preserving aspect ratio section.

The scaling process is handled by the scale video filter: -vf scale=width:height. Its quality can be set with the -sws option. If it is not specified, MEncoder will use 2: bicubic.

Usage:

mencoder input.mpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -vf scale=640:480 -o output.avi