#! /bin/sh if [ -z "$1" ]; then echo "Usage: $0 title [mencoder options]" >&2 exit 1 fi title="$1" shift echo "$title" | iconv -f koi8-r -t utf-8 >avi_name.txt echo "Codec FFmpeg (DivX5)" >avi_comment.txt m_encode -info "name=$(cat avi_name.txt):comment=$(cat avi_comment.txt)" "$@" && mv output.avi "$title".avi && exec rm avi_name.txt avi_comment.txt divx2pass.log