[mythtv-users] silence detection blocks jobqueue [ mythcommflag; silence.py ]
Roger Siddons
dizygotheca at ntlworld.com
Sat Oct 18 15:59:33 UTC 2014
On Sat, 18 Oct 2014 13:23:55 +0100, Mark Perkins <perkins1724 at hotmail.com>
wrote:
>
>
>> On 18 Oct 2014, at 10:10 pm, "Stefan Pappalardo"
>> <stefan.pappalardo at gmx.de> wrote:
>>
>> For some recordings the silence detection does not really start and
>> never ends => jobqueue is blocked!
>>
>> Here is a snipped from the mythcommflag.log:
>>
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: Starting job
>> 14065
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: Seeking
>> chanid 1043, starttime 2014-10-15 14:50:00+02:00
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: Processing:
>> Cinema24, 2014-10-15 14:50:00+02:00, "Keinohrhase und Zweiohrküken -
>> Komödie"
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: Using preset
>> file "/home/mythtv/.mythtv/silence.preset"
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: No preset
>> found for "Keinohrhase und Zweiohrküken" or "Cinema24"
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag:
>> Threshold=-75.0, MinQuiet=0.16, MinDetect=6.0, MinLength=120.0,
>> MaxSep=120.0, Pad=0.48
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: Frame rate is
>> 25.00, Detecting silences below 381883 that last for at least 4 frames
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: Clusters are
>> composed of a minimum of 6 silences closer than 3000 frames and must be
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: longer than
>> 3000 frames in total. Cuts will be padded by 12 frames
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag: < preroll, >
>> postroll, - advert, ? too few silences, # too short, = comm flagged
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag:
>> Start - End Start - End Duration Interval Level/Count
>> Oct 16 17:25:26 obelix silence.py[10378]: mythcommflag:
>> frame - frame (mmm:ss-mmm:ss) frame (mm:ss.s) frame (mmm:ss)
>>
>> Afer a few minutes of blocking the jobque I killed the lowest
>> childprocess and the log gets a finished line:
>>
>> Oct 16 17:27:05 obelix silence.py[10378]: mythcommflag: Detected 0
>> adverts.
>>
>> Here is the commandline for the job:
>>
>> /usr/local/bin/silence.py %JOBID% --chanid %CHANID% --starttime
>> %STARTTIME% --loglevel debug --nodblog --syslog local7 --presetfile
>> ~/.mythtv/silence.preset
>>
>>
>> I'm using mythbuntu 14.04 with mythtv 0.27 and the latest silence.py
>> (from http://www.mythtv.org/wiki/Commercial_detection_with_silences)
>>
>> Has anyone an idea how to solve the problem?
>> thx
>> --
>> Stefan Pappalardo
>> _______________________________________________
>>
>
> IIRC the backend log will have the command line used to trigger the
> silence detection. Copy it into a terminal window and run it there,
> maybe with a --verbose on the end and see what happens then (working
> from memory here). Otherwise just drop the jobid and lookup the chanid /
> starttime of the recording and use the command line you used above.
>
> Don't think you should be using jobid and chanid and starttime, should
> be jobid or (chanid and starttime) but I assume the script will just use
> one and ignore the rest.
> _______________________________________________
The commflag job is starting but not doing very much. If your backend
jobqueue is blocked then you probably have a job limit of 1 set.
Regarding the comflagging, the log shows that it hasn't detected any
silences. That's unusual but it could just be the specific recording -
does it contain adverts ? - or the channel. Does it work for other
recordings from that channel ?
Even though it's not detecting anything, it may take a while (3-4 minutes)
to process the recording if it's long - are you allowing it long enough to
finish before killing it ?
As Mark said, you don't need the --chanid & --starttime args: they will be
ignored when the job id is supplied.
You can check it's actually doing something by watching the mythffmpeg
process run using "top".
1. In a terminal/xterm run "/usr/local/bin/silence.py 14065 --loglevel
debug"
2. In a 2nd terminal/xterm run "top" and confirm that mythffmpeg is
running/appears.
3. Wait until mythffmpeg stops/disappears - the job should then complete.
If it doesn't log the silences that you're expecting then try adjusting
the presets. Cinema24 isn't listed on the wiki but some other channels
are: use them as a starting point.
More information about the mythtv-users
mailing list