[mythtv] Commercial Skip Algorithm

Chris Pinkham cpinkham at bc2va.org
Sun Dec 4 06:35:04 UTC 2005

> Any ideas people have tried?

Lots of stuff.  Seems someone pops up every few months with ideas and
goes off coding, but hardly anyone has submitted code to enhance the
current detection.  I think I wrote probably 90% or more of the current
detection code and haven't worked on it in a while since it works pretty
good for the shows my wife and I record.  I'm open to any enhancements
people may have as long as they don't break existing functionality or
make detection worse for people.  Try searching for "commercial detection"
on the mailing lists and you'll find lots of people's ideas and comments.

> Also, can you point me to some detailed info on how the current commercial
> skip algorithm works?

I'd suggest looking at mythtv/programs/mythcommflag/ClassicCommDetector.cpp
and .h.  This is the current commercial detection code and it uses
blank frames, scene changes, logos, aspect ratio changes, and
letterbox/pillarbox detection.  The blank frame, scene change, and logo
detection can be used individually or there is an 'ALL' method that uses
all of the above combined.


More information about the mythtv-dev mailing list