[mythtv-users] 0.24 Python Bindings - Transcode Wrapper Script

Christopher Kerr mythtv at theseekerr.com
Sat Feb 19 06:26:20 UTC 2011


On Sat, Feb 19, 2011 at 12:32 PM, Raymond Wagner <raymond at wagnerrp.com> wrote:
> On 2/18/2011 20:24, Christopher Kerr wrote:
>> On Thu, Feb 17, 2011 at 3:13 AM, Raymond Wagner<raymond at wagnerrp.com>  wrote:
>>> On 2/16/2011 10:54, Christopher Kerr wrote:
>>>> On Thu, Feb 17, 2011 at 2:51 AM, Christopher Kerr<mythtv at theseekerr.com>    wrote:
>>>>> On Thu, Feb 17, 2011 at 2:48 AM, Raymond Wagner<raymond at wagnerrp.com>    wrote:
>>>>>> On 2/16/2011 10:42, Christopher Kerr wrote:
>>>>>>> On Thu, Feb 17, 2011 at 2:35 AM, Raymond Wagner<raymond at wagnerrp.com>      wrote:
>>>>>>>> On 2/16/2011 10:26, Christopher Kerr wrote:
>>>>>>>>> NameError: global name 'findfile' is not defined
>>>>>>>> Fixed in the version on the wiki over a month ago.
>>>>>>> Raymond - I just grabbed a fresh copy from the wiki, and modified only
>>>>>>> the command and argument lines:
>>>>>>>
>>>>>>> Traceback (most recent call last):
>>>>>>>      File "./x264_inplace.py", line 96, in<module>
>>>>>>>        main()
>>>>>>>      File "./x264_inplace.py", line 88, in main
>>>>>>>        runjob(jobid=args[0])
>>>>>>>      File "./x264_inplace.py", line 17, in runjob
>>>>>>>        db = MythDB()
>>>>>>> NameError: global name 'MythDB' is not defined
>>>>>> The third line imports that class...
>>>>>>
>>>>>>>    from MythTV import Job, Recorded, System, MythDB, findfile, MythError
>>>>> OK, there's something really weird going on here....if I just visit
>>>>> http://www.mythtv.org/wiki?title=Transcode_wrapper_stub I get the old
>>>>> version.
>>>>>
>>>>> If I view the revisions and select the most recent, I get the version
>>>>> you're talking about.
>>>>>
>>>>> I'm still puzzled, but thanks!
>>>>>
>>>>> - Chris
>>>> OK, new issue!
>>>>
>>>> Traceback (most recent call last):
>>>>     File "./x264_inplace.py", line 96, in<module>
>>>>       main()
>>>>     File "./x264_inplace.py", line 88, in main
>>>>       runjob(jobid=args[0])
>>>>     File "./x264_inplace.py", line 36, in runjob
>>>>       task = System(path=transcoder, db=db)
>>>>     File "/usr/lib/pymodules/python2.6/MythTV/system.py", line 40, in __init__
>>>>       raise MythFileError('Defined grabber path does not exist.')
>>>> MythTV.exceptions.MythFileError: Defined grabber path does not exist.
>>> The script was originally written for 0.23, and 0.24 added a sanity
>>> check to ensure the selected file actually existed, but assumed the path
>>> was an absolute one.  I've backported a change from 0.25 that will also
>>> search the PATH for the file if the path does not begin with '/'.
>> I have applied your patch - the script now successfully calls the
>> transcoder, but fails at the next step:
>>
>>    File "/usr/lib/pymodules/python2.6/MythTV/database.py", line 169, in _pull
>>      raise MythError('DBData() could not read from database')
>> MythTV.exceptions.MythError: DBData() could not read from database
>
> The only thing that should cause that would be calling it against a
> jobid that does not exist in the database.  Could you run it with '-v
> database' to see the query it's trying to make when pulling the
> information from the jobqueue table?

Turns out it was my fault, that jobid was for a recording I'd botched
up while testing another script.

All working fine now.

I understand that there's a rewrite of the jobqueue in progress, can
anyone point me to some information about its goals and timeline?

I'm hoping for some more fine-grained control over when my transcoding
jobs run....almost all recording and viewing occurs between 5PM and
midnight, leaving 17 hours in the day when the backend is largely
idle. I'd like to run my transcoding jobs in that window, but allow
real-time commflagging and low-impact mythlink.pl jobs to run at any
time.

- Chris


More information about the mythtv-users mailing list