[mythtv] Re:Another commercial flagging method

Hugh Stewart hds2 at magma.ca
Wed Jan 28 09:51:50 EST 2004


I too suspect that commercial detection could be made much more accurate if the length and
(agreeing with Dooferlad) the timing of each commercial were considered.  

Some food for thought:

1. Flag all potential commercials using existing and proposed methods (blank frame, scene
change, audio characteristics, etc.).

2. Use heuristics to rate each potential commercial's likelihood of being a false positive
(i.e. not really a commercial), based on:
   (a) The length of the commercial in relationship to some configurable minimum and
maximum.  For example, if it is less than 30 seconds or greater than 4 minutes, it is more
likely to be a false positive.
   (b) The length of the commercial in relationship to the other potential commercials. 
For example, if all the potential commercials in the show are 2 minutes, except for one
that is 4 minutes, then the 4 minute commercial is more likely to be a false positive.
   (c) The time between the potential commercial and the previous/subsequent potential
commercials in relationship to some configurable minimum.  For example, if the time
between one potential commercial and some other potential commercial is less than 6
minutes, then at least one of them is more likely to be a false positive.
   (d) The start time of the potential commercial in relation to the start time of the
other potential commercials.  If they are regularly spaced, except for one, then that one
is more likely to be a false positive.

3. Rank the potential commercials in order of their "probably a false positive" rating.

4. If the highest (most likely false positive) rating is above some configurable
threshhold, delete the potential commercial from the list of potential commercials.

5. Repeat steps 2 through 4 until no potential commercial receives a "probably a false
positive" rating higher than the threshold mentioned in step 4.

I'm sure others on the mythtv-dev list can supply more or better ideas for these sorts of
time-based heuristics.  Is there anyone with development experience in this area who could
advise on how easy or difficult this may be to implement, and on how effective it might be?

Hugh.



More information about the mythtv-dev mailing list