6 BITRATE="vbitrate=$MINBITRATE:vrc_maxrate=$MAXBITRATE:vrc_buf_size=1835:vrc_minrate=$MINBITRATE"
7 PASS1_OPTS="-mc 0 -oac mp3lame -lameopts cbr:cbr=196 -ffourcc XVID -fps 29.97 -ovc lavc "
8 PASS1_OPTS="$PASS1_OPTS -lavcopts vcodec=mpeg4:vhq:keyint=15:vpass=1:$BITRATE -vf pp=ci"
9 PASS2_OPTS="-mc 0 -oac mp3lame -lameopts cbr:cbr=196 -ffourcc XVID -fps 29.97 -ovc lavc "
10 PASS2_OPTS="$PASS2_OPTS -lavcopts vcodec=mpeg4:vhq:keyint=15:vpass=2:$BITRATE -vf pp=ci"
13 OUTFILE=`echo $* | sed 's/\.avi/\.divx.avi/g'`
16 echo "-> 1st pass: /usr/bin/mencoder $PASS1_OPTS -o \"$OUTFILE\" -idx \"$INFILE\""
17 /usr/bin/mencoder $PASS1_OPTS -o "$OUTFILE" -idx "$INFILE"
19 echo "-> 2nd pasS: /usr/bin/mencoder $PASS2_OPTS -o \"$OUTFILE\" -idx \"$INFILE\""
20 /usr/bin/mencoder $PASS2_OPTS -o "$OUTFILE" -idx "$INFILE"