[mythtv-users] Mytharchive on Mythbuntu fails with possible UTC problem (0.27)

Zig jzigpublic at gmail.com
Thu Sep 26 13:47:26 UTC 2013


On 9/26/2013 3:44 AM, John Pilkington wrote:
> On 25/09/13 19:21, Zig wrote:
>> Mytharchive calls mythtranscode (from mythburn.py) with incorrect
>> starttime, resulting in mythtranscode not finding the recording and
>> erroring out.
>>
>> The actual recording start time of this example is 13:36:00 local time,
>> Chicago Time Zone (-5 hours from UTC)
>> The mythconverge database entry is 18:36:00 (that's the UTC time)
>>
>>
>> mythtranscode reports, via mythburn.log"
>> ******************************************
>> *"Couldn't find recording for chanid 1211 @ 2013-09-24T13:36:00Z"
>> *"Failed while running mythtranscode to cut commercials and/or clean up
>> an mpeg2 file."
>> *"Result: 146, Command was mythtranscode --mpeg2 --chanid 1211
>> --starttime 2013-09-24T13:36:00-05:00 --outfile
>> "/var/lib/mytharchive/temp/work/1/newfile.mpg""
>> *"Failed to run mythtranscode to fix any errors"
>> ******************************************
>> If I run mythtranscode from the command line this works:
>> mythtranscode --mpeg2 --chanid 1211 --starttime
>> 2013-09-24T18:36:00-05:00 --outfile
>> "/var/lib/mytharchive/temp/work/1/newfile.mpg"
>>
>> and, oddly enough, this command line works too:
>> mythtranscode --mpeg2 --chanid 1211 --starttime 2013-09-24T18:36:00
>> --outfile "/var/lib/mytharchive/temp/work/1/newfile.mpg
>>
>> So there are two problems.
>> 1)  The -05:00 at the end of --starttime seems to be ignored
>> 2)   The command line that is passed to mythtranscode has the local
>> --starttime in it, not the UTC starttime, which is what is in the
>> database and what mythtranscode seems to like.
>>
>> This worked fine under 0.25, but fails consistently after upgrading
>> 0.27.  I also tried a clean install of the latest Mythbuntu, upgraded it
>> to 0.27, then installed mytharchive via the Mythbunutu control center
>> and still get the same failure.  It is consistent and repeatable.
>>
>> Mythtv Revision: v.027-9-gb6a6574  branch: fixes/0.27
>> Mythbuntu  12.04.3 LTS
>>
>> I have attached the complete mythburn.log
>>
>> Any advice on what I might be doing wrong or a fix would be appreciated.
>> Thanks,
>> Ziggy
>>
>
> There was a flurry of patches to MythArchive before 0.27 release but 
> it looks as if this one didn't make it.  Raymond asked for test 
> results :-)
>
> http://code.mythtv.org/trac/attachment/ticket/11758/mythburn.patch
>
> John P
>
Thanks John,  I tried the patch and got the exact same error and logs as 
before the patch.  After reviewing the patch, it looks like it might fix 
the case where projectX is being used but not mythtranscode.  I don't 
know anything about projectX so I can't verify that.

I do not really understand perl very well, but looking at the patch gave 
me some ideas, and after hacking around a bit I came up with this patch 
(attached) that works in my situation of using mythtranscode on a TV 
recording.  It only changes one line.  It works when applied after 
Raymond's patch and it also works (in my case) when it is the only patch 
applied to the stock mythburn.py.

Thanks,
Ziggy






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130926/c4b26606/attachment.html>
-------------- next part --------------
--- mythburn.py	2013-09-23 18:09:40.000000000 -0500
+++ mythburn.py.zig	2013-09-26 07:50:53.479406824 -0500
@@ -1426,7 +1426,7 @@
         data.description    = rec.description
         data.rating         = str(rec.stars)
         data.chanid         = rec.chanid
-        data.starttime      = rec.starttime.isoformat()
+        data.starttime      = rec.starttime.utcisoformat()
 
         cutlist = rec.markup.getcutlist()
         if len(cutlist):


More information about the mythtv-users mailing list