Mencoder

2 Pass Transcode For MythTV
mencoder $INFILE -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:pass=1 -nosound -o /dev/null &>/dev/null && mencoder $INFILE -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=1152:pass=2 -oac mp3lame -lameopts br=96:cbr:vol=1 -info name="$TITLE" -info subject="$SUBTITLE" -o /var/lib/mythtv/exports/$FILENAME &>/dev/null

mythtvto.sh Script
# |tr [:blank:] _ INFILE="/var/lib/mythtv/recordings/$1" TITLE=$( nuvinfo $INFILE |grep -w 'title:' |sed 's/.*title\: //' ) SUBTITLE=$( nuvinfo $INFILE |grep -w 'subtitle:' |sed 's/.*subtitle\: //' ) NEWTITLE=$( echo "$TITLE" |tr [:blank:] _ |tr --delete "'" ) NEWSUBTITLE=$( echo "$SUBTITLE" |tr [:blank:] _ |tr --delete "'" ) FILENAME="$NEWTITLE-$NEWSUBTITLE.avi" mencoder $INFILE -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:pass=1 -nosound -o /dev/null &>/dev/null && mencoder $INFILE -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=1152:pass=2 -oac mp3lame -lameopts br=96:cbr:vol=1 -info name="$TITLE" -info subject="$SUBTITLE" -o /var/lib/mythtv/exports/$FILENAME &>/dev/null
 * 1) 	Transcode a MythTV recording into an xvid .avi with the title and subtitle as filename.
 * 1) paully@mythbuntu-server2:~/Bin$ nuvinfo /var/lib/mythtv/recordings/10211_20101023210000.mpg |grep -w 'title:' |sed 's/.*title\:  //'
 * 1) In MythTV the variable %FILE%for user jobs does not contain the path
 * 1) echo "TITLE=$TITLE"
 * 2) echo "SUBTITLE=$SUBTITLE"
 * 1) echo "NEWTITLE=$NEWTITLE"
 * 2) echo "NEWSUBTITLE=$NEWSUBTITLE"
 * 1) echo "FILENAME=$FILENAME"
 * 1) echo "mencoder $INFILE -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:pass=1 -nosound -o /dev/null && "
 * 2) echo "mencoder $INFILE -ovc xvid -xvidencopts bvhq=1:chroma_opt:quant_type=mpeg:bitrate=1152:pass=2 -oac mp3lame -lameopts br=96:cbr:vol=1 -o /var/lib/mythtv/exports/$FILENAME"