#!/bin/sh fls=`ls *.avi | sort -n` i=1 n=`echo "${fls}" | wc -l` while [ $i -le $n ]; do #echo "TEST $i" file=`echo "${fls}" | sed -n "$i p"` # mencoder "$file" -oac mp3lame -lameopts vbr=2:aq=0:q=2 -ovc xvid -xvidencopts pass=1:bitrate=500:threads=2:turbo -vf scale=640:480 -o /dev/null # mencoder "$file" -oac mp3lame -lameopts vbr=2:aq=0:q=2 -ovc xvid -xvidencopts pass=2:bitrate=500:threads=2:turbo -vf scale=640:480 -o tmp.avi mencoder "$file" -oac mp3lame -lameopts vbr=2:aq=0:q=2 -ovc x264 -x264encopts pass=1:bitrate=500:threads=2:slow_firstpass:bframes=3:ref=6:qcomp=0.8:partitions=all:direct=auto:weightb:mixed-refs:8x8dct:trellis=1 -vf scale=640:480 -o /dev/null mencoder "$file" -oac mp3lame -lameopts vbr=2:aq=0:q=2 -ovc x264 -x264encopts pass=2:bitrate=500:threads=2:bframes=3:ref=6:qcomp=0.8:partitions=all:direct=auto:weightb:mixed-refs:8x8dct:trellis=1 -vf scale=640:480 -o tmp.avi mv -f tmp.avi "$file" ((i=i+1)) done