[mythtv-users] After Upgrade from 0.24 to 0.26 Commflag Error 140?

John Pilkington J.Pilk at tesco.net
Sat May 11 22:48:30 UTC 2013


On 11/05/13 22:25, Drew Tomlinson wrote:
> On 5/9/2013 11:48 AM, Michael T. Dean wrote:
>> On 05/09/2013 01:00 PM, Drew Tomlinson wrote:
>>> Update: I did some more searching and learned how to run mythcommflag
>>> manually.  I can run it successfully as the mythtv user.  Thus
>>> something must be off in how the backend calls mythcommflag?
>>>
>>> I ran mythtv-setup.  This is my "Commercial Detection Command" in the
>>> general settings:
>>>
>>> /usr/bin/ionice -c 2 -n 7 /usr/bin/mythcommflag
>>>
>>> Does this need to be modified?
>>
>> Pretty sure if you use anything other than "mythcommflag" (or blank),
>> you are responsible for providing /all/ of the information required
>> for processing--including the job ID.
>>
>> Rather than change this setting, you're better served creating a
>> "wrapper" script called mythcommflag that adds the additional stuff
>> you want and passes through all the arguments received by the wrapper.
>
> Thank you for your reply.  You must be correct because I removed
> everything from that line and queued a job.  And indeed, it's running.
>
> Sorry to be so dense but now I am at a loss as to how to create a
> wrapper script.  I kind of get it in that I will write a script that
> calls mythcommflag wtih my 'ionice' command in front.  But what I'm not
> getting is how I do that and let all the other information mythcommflag
> needs to pass through the wrapper.
>
> I found this but it seems to be much more that I need and don't fully
> understand it.  However it seems that by taking this script and
> modifying, I somehow I could not commflag newscasts as an example in
> addition to getting my ionice command passed?  This is something I
> wished I could do for a long time is not waste the CPU cycles
> commflagging newscasts or sporting events.  Anyway, this is what I found:
>
> http://www.mythtv.org/wiki/Mythcommflag-wrapper
>
> I'd appreciate a nudge to get me on track.
>
> Thanks,
>
> Drew
>

This might provide the nudge.  I'm not using it now, but it used to work.

  cat /usr/bin/mythpreviewgen.wrap
#!/bin/bash

# Script to reduce CPU impact of preview generation at the end of a 
recording.
# mv /usr/bin/mythpreviewgen to /usr/bin/mythpreviewgen.real
# copy this script to /usr/bin/mythpreviewgen and make it executable,
# chmod 755 /usr/bin/mythpreviewgen
# http://www.gossamer-threads.com/lists/mythtv/users/492811#492811

ionice -c3 nice mythpreviewgen.real  "$@"






More information about the mythtv-users mailing list