Difference between revisions of "Talk:Commercial detection with silences"

From MythTV Official Wiki
Jump to: navigation, search
(A suggestion to improve the visibility of the running job in the Mythweb status page.: new section)
Line 16: Line 16:
  
 
With this line added the status of the job shown in Mythweb status page shows running in green whilst the job is running, this is only a small cosmetic change but it helps to identify a running job in a long list of finished and queued jobs.
 
With this line added the status of the job shown in Mythweb status page shows running in green whilst the job is running, this is only a small cosmetic change but it helps to identify a running job in a long list of finished and queued jobs.
 +
 +
== For some recordings the 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
 +
 +
Please help. Thank you
 +
--[[User:Sjuk|Sjuk]] ([[User talk:Sjuk|talk]]) 15:44, 16 October 2014 (UTC)

Revision as of 15:44, 16 October 2014

Anyone know the correct way to edit a skiplist in Python?

Done. wagnerrp

It's stopped working recently

I can't figure out why but silence.cpp seems to be ignoring SIGALRM and so it never stops. If I kill the tail manually (like silence.ccp is supposed to in the alarm handler) it finishes properly. If I send a SIGALRM to silence.cpp nothing happens. I'm on Debian Wheezy and it was working until a few weeks ago so it is probably a kernel or security update. Has anyone else seen this behaviour?

Fixed in silence.cpp v4.2 - I don't know what has changed but the process has SIGALRM blocked when it starts so this change simply unblocks it and all is good in the world again.

A suggestion to improve the visibility of the running job in the Mythweb status page.

I would like to propose a small change to your code to include the following lines at line 178 of the silence.py script.

   #Add this line to show the status in green in the Mythweb status page
   job.update({'status': 4, 'comment': 'Running.'})

With this line added the status of the job shown in Mythweb status page shows running in green whilst the job is running, this is only a small cosmetic change but it helps to identify a running job in a long list of finished and queued jobs.

For some recordings the 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

Please help. Thank you --Sjuk (talk) 15:44, 16 October 2014 (UTC)