[mythtv-users] Mythtranscode & database updates

John Pilkington J.Pilk at tesco.net
Tue Nov 10 15:45:39 UTC 2009

mythtv at notleyc.fastmail.fm wrote:
> I've had a scan through the archives and haven't found a definitive
> answer to this - apologies in advance if I've missed an answer...
> I'm running the release candidate of MythTV 0.22 on Ubuntu Karmic Koala
> and want to script a job that runs each night and automatically strips
> out commercials.  I've built a Perl script that looks in the mythconverg
> database and builds a list of all recorded files that have a cutlist and
> have not yet been transcoded.  This part works exactly as intended and
> for those files that match, I'm constructing the following command:
> /usr/bin/mythtranscode --mpeg --honorcutlist --chanid
> At present I'm manually running the commands and they appear to be
> completing successfully; however I'd assumed/hoped that the
> mythtranscode command would update the 'recorded' table to reference the
> new file.  It seems that it's just creating a new file with '.tmp'
> appended to the filename and then leaving the existing file in place.
> I guess I can achieve this myself by getting my script to remove the
> original file and rename the newly created .tmp file; however I wanted
> to make sure I wasn't missing something before I proceed...
> Cheers in advance for any help,
> Chris

When Mythtranscode completes it usually renames its input file to .old, 
or deletes it if that option has been set in mythtvsetup, and renames 
the .tmp output so that it replaces the input.  But for some 0.22 series 
builds this sequence doesn't complete - see


John P

More information about the mythtv-users mailing list