#!/bin/sh
echo "This does not work yet"
exit

if [ $# -lt 2 ] ; then
    echo "Usage: $0 <videofile> <start> [<end>]"
    exit 1
fi
if [ ! -e "$1" ] ; then
    echo "$0: No such file $1"
    exit 1
fi
if [ "$3" = "" ] ; then
    OPTIONS="-ss $2"
else
    OPTIONS="-ss $2 -endpos $3"
fi

output=`echo $1 | sed 's/^\(.\+\)\.\([^.]\+\)/\1_cut.\2/'`
rm -f "$output"
mencoder "$1" -novideo -oac copy $OPTIONS -o "$output"
touch -r "$1" "$output"

exit
