[mythtv-users] commercials

Brian Wood beww at beww.org
Sun Jul 8 11:00:29 UTC 2007


norman wrote:
> Could someone please explain to me, in simple language, how commercials
> are recognised by Mythtv. I am interested because I recently had a
> problem with sound on a DVD, which I had burned from a broadcast and
> which I had edited to remove the commercials. When the same broadcast
> was burned to a DVD without removing the commercials the sound was
> perfect.

I'm sure others, like the author, whose name eludes me at the moment,
could do a much better job of explaining this, but:

The algorithm(s) are actually somewhat complex. The program is broken up
into blocks, separated by either drastic APL (average picture level)
changes or dips to black. Each block is assigned a score, based on
several things, including:

Whether the block, or a combination of blocks, is a more or less even
multiple of 15 or 30 seconds (spots in the US are generally sold in such
blocks)

Whether the block following a suspected commercial contains a "bug", the
logo inserted by a lot of stations on returning to a program. Stations
love to insert bugs, but are generally unable to do so with commercials
for several reasons.

I'm sure there's more to it, but that's my general understanding. It
seems to work well on a lot of channels in the USA, and to be somewhat
less useful in, for example, the UK, where commercial material is
generally aired in blocks at the beginning or end of a complete program,
and may well not be multiples of 15 or 30 seconds.

But, to answer your primary question, I suspect your sound problem had
nothing to do with the commercial recognition, but with your editing
process somehow.

I'd have to know more about how you edited your program to even begin to
guess what went wrong. Editing often involves separating the video and
audio paths, with a lot of potential for trouble.

Hope this is of some help.

BEWW


More information about the mythtv-users mailing list