[mythtv] Commercial Detector questions

f-myth-users at media.mit.edu f-myth-users at media.mit.edu
Fri Dec 9 17:16:48 EST 2005

    Date: Fri, 9 Dec 2005 14:45:09 -0500 (EST)
    From: "Chris Pinkham" <cpinkham at bc2va.org>

    Just to give you an idea of what other things I may be looking into
    shortly, here are a few things from my TODO:

    * Keep track of min/max brightness found during logo detection so we can
      use that information later to determine what is really a blank screen and
      what is not.  (ie, if the min is only 50, we might want to try to
      compensate in some of our other thresholds)

    * Fade detection, checking the last X number of frames to see if the
      brightness is constantly increasing or decreasing.

    * Better logo detection.  I looked into this for a while but haven't messed
      with that code at all recently.  Detecting the logo is easy using something
      like sobeil, checking for the logo in each frame after you've found what
      the logo looks like that is the part that is a bit harder since we're
      dealing with video.

Another idea that might deserve some thought:  Looking for the sudden
disappearance of closed-captioning information.

At least on the channels I see in the US, most ads don't have CC info
(rarely, some do).  And sure, it depends on users enabling CC, but at
least for -x50's and ivitv 0.4.0, this seems to work well (although
0.18.1's UI doesn't).  And it depends on mythtranscode not running,
or being changed not to lose this info (which I'd be all in favor of).

But assuming that all this -is- in place, a sudden precipitous drop
in the density of CC data might be another thing to toss into the pot
when trying to decide if something's an ad.  It won't be 100% reliable
(since some ads have CC, and some programs have stretches of no dialog),
but it might be worth having the commflagger notice whether there's
-any- CC data in the stream, and, if so, flipping on something that
keeps track of its general envelope.  One nice thing about this
computationally is that processing CC data should take extremely
few CPU cycles... :)

More information about the mythtv-dev mailing list