6 echo "usage: $(basename $0) <input> <inpoint in HH:MM:SS> <duration in HH:MM:SS> <output>"
9 [ -f "$1" ] || { usage 1>&2; exit 1; }
12 read INPOINT_HH INPOINT_MM INPOINT_SS <<< ${2//:/ }
13 read DURATION_HH DURATION_MM DURATION_SS <<< ${3//:/ }
15 INPOINT=$(($INPOINT_HH * 60 * 60 + $INPOINT_MM * 60 + $INPOINT_SS))
16 DURATION=$(($DURATION_HH * 60 * 60 + $DURATION_MM * 60 + $DURATION_SS))
18 [ -e "$4" ] && { echo "Output file already exists, bliling out!" 1>&2; exit 1; }
21 ges-launch-1.0 -s "$INPUT_FILE" $INPOINT $DURATION -o "$OUTPUT_FILE"