Wednesday, July 19, 2006

Resampling video for (S)Video CDs using mencoder

I found this difficult to find on the 'net so am sharing it below. This code will use mencoder (part of the mplayer project) to resample the file specified by the 1st command-line argument into a properly encoded (S)VCD file which will be given the name of the 2nd command-line argument.



#!/bin/sh



mencoder \

-oac lavc \

-ovc lavc \

-ofps 25 \

-of mpeg \

-lavcopts \

keyint=125:mbd=2:vcodec=mpeg1video:\

acodec=mp2:vbitrate=1150:abitrate=224:\

vrc_buf_size=327:vrc_maxrate=1150:\

aspect=4/3: \

-vf scale=352:288,dsize=4/3 \

-srate 44100 \

$1 -o $2


No comments: