[mythtv] PATCH: Commercial detection/skip using blank frames

Chris Pinkham cpinkham at bc2va.org
Sat Feb 22 10:33:55 EST 2003

> Another metric you could use is the temporal proximity of commercials
> given the size of the program.  If you've just returned from a 4min
> commercial break in the middle of a 30min program, the likelihood of

This could be both a way to speed things up and/or a way to eliminate
false positives.  If I can get the blank screen detection working
faster it takes less time to check each frame and gives more time to
code in some checking for things like this and audio as well.  If I can
double the speed of the detection code I could check twice as many pixels
which would do better to eliminate false positives for frames that contain
things like credits and the Simpsons eyes.

> I can't remember seeing a 1hr program with zero commercials in the first
> 40 minutes and one or more in the remaining time.  You could probably
> be even more aggressive than that, but that's already cutting the scope
> in half.

This is where the short patch I posted earlier for debugging will help.
If someone has a problem with the current detection, they can apply that
patch and it will spit out a list of where blanks occur to help see how
they are spaced and if anything abnormal shows up like that 20-second
commercial I saw sandwiched between two 30-second commercials..

> I think these kinds of heuristics, coupled with weights for different
> networks, programs (or genres), and broadcast times (prime time versus
> night owl) could go a long way towards reducing the reliance on a few
> technical hacks and assumptions.

In due time... :)

> I don't ever want to miss an eyeball scene on the Simpsons. ;-)

The current code should not trigger on that unless it occurs around
15, 30, 45, or 60 seconds from the beginning or end of a real commercial
break.  That's why the code missed the 20-second commercial because it
wasn't looking for segments that size.


** Chris Pinkham                  Linux v2.2.18, Sane v1.0.4, Cajun v3.0-8 **
** cpinkham at bc2va.org                          http://www.bc2va.org/chris/ **

More information about the mythtv-dev mailing list