[mythtv-users] User job always wants to re-run mythcommflag first

scram69 scram69 at gmail.com
Sun Feb 10 05:52:06 UTC 2008


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.

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?

this is the script I am using (modified from one found on the wiki):

#!/bin/sh
VIDEODIR=$1
FILENAME=$2
CHANID=$3
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/'`
TITLE=$5

# Sanity checking, to make sure everything is in order.
if [ -z "$VIDEODIR" -o -z "$FILENAME" ]; then
        echo "Usage: $0 <VideoDirectory> <FileName>"
        exit 5
fi
if [ ! -f "$VIDEODIR/$FILENAME" ]; then
        echo "File does not exist: $VIDEODIR/$FILENAME"
        exit 6
fi

mythtranscode --mpgeg2 --honorcutlist -c $CHANID -s $STARTTIME -o
/var/lib/mythtv/videos/Kids/$TITLE
ERROR=$?
if [ $ERROR -ne 0 ]; then
        echo "Transcoding failed for ${FILENAME} with error $ERROR"
        exit $ERROR
fi
        exit 0


--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20080209/4da1f3c9/attachment.htm 


More information about the mythtv-users mailing list