#! /bin/sh if [ -z "$2" ]; then echo "Usage: $0 input title [transcode options]" >&2 exit 1 fi input="$1" title="$2" shift 2 echo "INAM $title" | iconv -f koi8-r -t utf-8 >avi_comments.txt echo "ICMT Codec: FFmpeg (DivX5)" >>avi_comments.txt tc_encode "$input" --avi_comments=avi_comments.txt "$@" && mv output.avi "$title".avi && exec rm avi_comments.txt divx4.log