[mythtv-users] mythtranscode creates a .tmp file instead of replacing the recording

Kris B. krisbee at krisbee.com
Sun Nov 6 01:33:20 UTC 2011


On Saturday, November 05, 2011 9:45 PM, "Thomas Boehm"
<mythtv-users at lists.boehmi.net> wrote:
> Hi list,
> 
> I'm just playing with a user script and want to run mythtranscode from
> within the script before encoding. I'm using
> 
> /usr/bin/mythtranscode --chanid $3 --starttime $4 --mpeg2 --honorcutlist
> 
> The recording gets transcoded, but gets saved as .tmp file along with
> the original. If I play the recording in the frontend now it seems that
> it plays the transcoded file, but if I delete the original manually the
> frontend will complain about the missing recording when I try to play it
> again.


Thomas,

Here is part of a script I modified that deletes that .tmp file... this
is part of my rokuencode script that I use to transcode things without
commercials for my roku internet box (which has a private mythtv channel
that queries mythweb).  Rshendershot wrote most of it, but I did modify
it for my purposes...  I put it here so you can see how I worked around
it.

#!/bin/bash

#convert mpeg file to mp4 using handbrakecli
MYTHDIR=$1
MPGFILE=$2
CHANLID=$3
STRTTIM=$4

# Should try and get these from settings.php, but for now...
DATABASEUSER=mythtv
DATABASEPASSWORD=mythtv

LOGFILE="/var/log/mythtv/rokuencode.log"

#Added by Krisbee - this is where the commercials are removed and the
mpg repacked
#1. Run mythcommflag to convert the commercial flagging to an actual
cutlist to remove them
#2. Run mythtranscode to generate a lossless transcode and remove the
commercials

mythcommflag --chanid $CHANLID --starttime $STRTTIM --gencutlist
mythtranscode --chanid $CHANLID --starttime $STRTTIM --mpeg2
--honorcutlist --outfile $MYTHDIR/$MPGFILE.tmp
mv -f $MYTHDIR/$MPGFILE.tmp /$MYTHDIR/$MPGFILE
rm -f $MYTHDIR/$MPGFILE.tmp.map


More information about the mythtv-users mailing list