#!/bin/sh # Script to convert quake3 (tremulous) video to avi if [ -z "$1" ]; then echo "usage:" echo "$0 videoxxxx.avi" exit 1 fi if [ ! -f "$1" ]; then echo "$1: file not found" exit 2 fi input="$1" output="converted.avi" # targetsize in kilobytes: default 10M targetsize="10240" encopts="-xvidencopts bitrate=-${targetsize}:me_quality=6:qpel:nogmc:trellis:nocartoon:quant_type=mpeg:chroma_me:chroma_opt" rm frameno.avi mencoder $input -oac mp3lame -lameopts vbr=3:br=128:aq=9 -ovc frameno -o frameno.avi mencoder $input -oac copy -ovc xvid ${encopts}:pass=1:turbo -vf pp=al -o converted.avi mencoder $input -oac copy -ovc xvid ${encopts}:pass=2:turbo -vf pp=al -o converted.avi