[mythtv-users] mythcommflag logo detection does not work

Roger Siddons dizygotheca at ntlworld.com
Wed Dec 25 01:54:43 UTC 2013


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.


More information about the mythtv-users mailing list