[mythtv-users] mythcommflag logo detection does not work

Stefan Pappalardo sjuk at gmx.de
Thu Dec 26 09:01:20 UTC 2013


Am 25.12.2013 02:54, schrieb Roger Siddons:
> On Tue, 24 Dec 2013 23:08:39 -0000, Stefan Pappalardo <sjuk at gmx.de> wrote:
>
>> Am 24.12.2013 04:50, schrieb Adam Bennetts:
>>> Hi,
>>>
>>> Have a look at this and consider setting it up:
>>> http://www.mythtv.org/wiki/Commercial_detection_with_silence_for_UK_freeviewHD
>>>
>>>
>>> It works quite well for UK, Australian, and New Zealand DVB
>>> broadcasts. There is a good chance it will work for your DVB-S
>>> broadcasts as well. Takes a little effort to set up but less effort
>>> than you'll spend trying to work out why mythcommflag doesn't work.
>>>
>>> Mythcommflag doesn't work for me in Australia or New Zealand either.
>>>
>>> Cheers,
>>> Adam.
>>>
>> Hi Adam,
>>
>> thank you for the new detection method :)
>>
>> I am testing it, but I am not sure if I get the meaning of the
>> preset-settings right.
>> Could you please give a more in depth but easy to understand
>> description of each setting?
>> It would be enough when the following questions will be answered for
>> each setting
>> (threshold, minquiet, mindetect, minbreak, maxsep, padding).
>>
>> Of which unit is the value?
>>  From what min to what max value could it be?
>> What impact is expected when you increase or decrease it?
>> Does the setting stand in any relationship with another setting?
>> When yes, which combination would be good or bad?
>>
>
> Hi Stefan,
>
> I wrote that version of the script, which extends the work of others.
>
> UK (and Australasian) TV standards require commercials to be
> distinguished from programmes - this usually involves a short silence
> whilst a logo is displayed. The script depends upon this silence. I am
> aware of it being used in Northern Europe but I haven't heard anything
> about its use/effectiveness on German TV. So it may well just not work
> at all for you.
>
> Those presets merely provide flexibility for fine-tuning in special
> cases: some channels have noisier silences than others, some programmes
> contain long silences that are not advert breaks (classical music
> concerts, for example) and some (typically news) have unusually short
> advert breaks.
> In my experience varying the presets won't alter the detection
> performance by much. If it doesn't detect anything using the defaults
> then I doubt that you'll get much out of it by fiddling with them. So I
> would suggest you first try several channels using the defaults.
>
>  From the wiki:
> In practice, silences are detected as a consecutive series of frames
> having an average audio power below <threshold> for at least <minquiet>.
> If the interval between a silence and the previous one is less than
> <maxsep> then they belong to the same cluster; otherwise they lie in
> different clusters. Clusters that are shorter than <minbreak> or
> composed of less than <mindetect> silences are ignored. Adverts are
> shortened by <padding> on both sides.
>
> <threshold> determines the limit between silence and non-silence. It is
> in dB, -70 to -80 seems the appropriate range for UK TV.
> <minquiet> is in seconds. The audio must drop below the <threshold> for
> at least this long for a silence event to be registered.
> <maxsep> is in seconds. Silences must occur within <maxsep> seconds of
> each other to be considered part of an advert break; essentially it's
> the maximum length of the adverts. In UK they are typically between 20
> secs - 1 min but (rarely) film trailers can be 2 min long. If a silence
> is separated from others by longer than this then it is considered part
> of a programme, not an advert break.
> <mindetect> is a count and is the minimum number of adverts anticipated
> in a break (+ 1). If the number of silences in a cluster is fewer than
> this, then it is considered to be a series of silences in a programme,
> not an advert break. UK breaks typically contain 6-8 adverts.
> <minbreak> is in seconds and is the minimum length of an advert break.
> For example: a cluster of 10 silences each separated by 5 secs will not
> be considered an advert break if <minbreak> is greater than 46 secs. UK
> breaks are typically 4 mins long but can be as short as 1 min.
> <padding> is in seconds and is simply an offset applied to each side of
> a advert break to soften the transition when skipping. It does not
> affect detection.
>
> When run the script log does describe all this more specifically.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
Hello Adam,

thank you for the details. I've tested the detection method on several 
recordings and different channels. I'm very impressed how good it works 
(nearly 99% commercial is detected right).

First I tested with one channel which needs a custom preset (ProSieben: 
up to 8 minutes long breaks with 16 adverts between 7 and 48 seconds 
long). The other channels does a good job with the defaults.

I've added my silence.preset file in the mythtv wiki. Perhaps you should 
consider to change the Heading for the article, to make it easier to 
find for people from Australia and Germany (or the rest of the world).

And I think it would be a good idea to merge the new method with 
mythcommflag to offer another method for commercial detection. Perhaps 
there is a developer who reads this, or should I link this post in the 
developer mailing list?

Best wishes
Stefan


More information about the mythtv-users mailing list