[mythtv] Can VBI data be used for commercial detection?

Brad Templeton brad+mydev at templetons.com
Thu Mar 24 20:01:54 UTC 2005

On Thu, Mar 24, 2005 at 11:47:09AM -0500, Dan Wilga wrote:
> At 5:19 PM -0400 3/23/05, Geoffrey Kruse wrote:
> >Often commercials here in the us will have no closed captions at 
> >all.  This would be an easy way to find the commercials.
> I'm not so sure how well that aspect would work. It would probably 
> have to be used in addition to other methods. I recall recently 
> seeing a case where some of the commercials had CC, even though the 
> program itself didn't.

Right.  Any commercial detection algorithm is going to be a weighting
of various scoring factors over whether you have found commercial breaks
or not.   This heuristic is similar to aspect ratio detection.  Most
commercials are 4:3, many programs are 16:9 or other widescreen, but
some commercials are widescreen (and of course many programs are 4:3).
However, a transition of aspect ratios is a sign you are at a junction
between two things.   Ditto logo on-off transistions (never thought those
logos would be good for anything.)

However, here's a cute trick one could try with closed captioning.  If
a commercial _is_ closed captioned once you have identified it as
a commercial you could store a database with the hashes of text of
commercials, and then you would know it if you ever saw it again.

(This could also be done in general with audio or video fingerprints)

Someday, probably in the far future, we might even get a menu of
the commercials that came with a program and get a chance to watch them
if we want.   For example, we enjoy watching movie trailers.

A suitable fingerprinting algorithm could even indentify commercials
that are new for you, vs. ones you have seen before, and only present
to you new commercials but never repeat commercials.  I have always
suspect the timegaps between scene transitions (which are usually
obvious in mpeg, either i-frames or giant transitional frames because
the whole frame just changed completely) would form a good fingerprint
for a piece of video.


More information about the mythtv-dev mailing list