[mythtv-users] Commercial Detection

Lawrence Rust lvr at softsystem.co.uk
Thu Mar 8 10:47:25 UTC 2012


On Wed, 2012-03-07 at 23:13 +0000, Thomas Boehm wrote:
> Martin Moores wrote:
> > On 7 March 2012 21:58, Doug Lytle <support at drdos.info
> > <mailto:support at drdos.info>> wrote:
> > 
> > 
> >     And I believe there was an external script based on volume changes on a
> >     channel that people have reported good results with.
> > 
> > 
> > Indeed, I never got around to trying that, but many said they had a lot
> > of success with it:
> 
> It works very well for me. I changed the script so that it runs on all
> channels, not only the white listed ones. If there is really a show
> which doesn't get marked properly, I still press the forward button a
> few times as I did before, but most of the times it works.
> 
> The mythcommflag which comes with MythTV takes much longer and basically
> doesn't work at all in the UK.

I use a script based on the wiki article
www.mythtv.org/wiki/Mythcommflag-wrapper with good success on most UK
Freesat channels.

I found that changing the silence threshold to -76 dB from -70
significantly improved accuracy.  Also, decreasing the coalescence time
from 400 to 360 seconds reduced the prevalence of false positives.  The
last useful tweak is to the awk program to add 'cut to beginning' or
'cut to end' without leaving 'dangling' frames.

This generally leaves a few frames of ads/titles before and after each
cut.  The only annoyance is that the post ad cut doesn't position to a
keyframe so the cut isn't entirely invisible.  I'm working on that and
back tracking from the start of cut to detect a scene change.

The script can be found here:
http://www.softsystem.co.uk/download/mythtv/mythcommflag-silence.sh

To run it as a user job, start mythtv-setup and find General/JobQueue
(Global) and set the Ad-detection command:
mythcommflag-silence.sh -j %JOBID% -C

The -C option copies the list to the cutlist.

-- 
Lawrence


More information about the mythtv-users mailing list