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