Periodically, mostly with movies, I will "archive" a recording to my videos directory, running mythtranscode -l -m to do a lossless mpeg2 and remove the commercials per the cutlist. Beforehand, I always go in via the frontend edit mode and check and maybe adjust the cutlist.<br>
<br>I wanted to try and automate the process with a user job script. However, when I go in through the recordings menu and select the user job, myth always wants to re-run mythcommflag before getting to my user job - in the process, undoing any of the manual edits I had done. Is there a way to prevent this in order to run a custom transcode script?<br>
<br>this is the script I am using (modified from one found on the wiki):<br><br>#!/bin/sh<br>VIDEODIR=$1<br>FILENAME=$2<br>CHANID=$3<br>STARTTIME=`echo $4 | sed -e 's/\([0-9]\{4\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)\([0-9]\{2\}\)/\1-\2-\3-\4-\5/'`<br>
TITLE=$5<br><br># Sanity checking, to make sure everything is in order.<br>if [ -z "$VIDEODIR" -o -z "$FILENAME" ]; then<br> echo "Usage: $0 <VideoDirectory> <FileName>"<br>
exit 5<br>fi<br>if [ ! -f "$VIDEODIR/$FILENAME" ]; then<br> echo "File does not exist: $VIDEODIR/$FILENAME"<br> exit 6<br>fi<br><br>mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o /var/lib/mythtv/videos/Kids/$TITLE<br>
ERROR=$?<br>if [ $ERROR -ne 0 ]; then<br> echo "Transcoding failed for ${FILENAME} with error $ERROR"<br> exit $ERROR<br>fi<br> exit 0<br><br clear="all"><br>-- <br><br>