#!/bin/sh
#
def_ratio=1
def_size=1

help(){
    cat <<END
Usage: $0 [options] <filename.[avi|dv|mov|mpg|qt]>
Options:
    -r n      n=1 4:3, n=2 16:9 to panscan          ($def_ratio)
    -s n      n=1 320x240, n=2 160x120, n=3 96x72   ($def_size)
    -h        Print this help message
END
    exit 0
}

ratio=$def_ratio
size=$def_size

while getopts r:h name "$@"
do
    case $name in
r)
    ratio=$OPTARG ;;
s)
    size=$OPTARG ;;
*)
    help ;;
    esac
done
let shiftind=$OPTIND-1
shift $shiftind

if test "$#" -lt "1"
then
    help
fi

for i in "$@"
do 
	echo cd $PWD \; nice $HOME/video/bin/encode-pix \
		-r "$ratio" $i
done | clustex kobnita pranika mobo kobnita pranika mobo
