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

Pat pat at netburp.com
Sun Feb 23 23:10:01 EST 2003

Would it make more sense to do two threads decoding?     A commercial 
skip "ringbuf"....the second thread would just decode ahead of the 
playback, looking for "commercial skip criteria" and record them as 
frame & criteria info...   This could allow for multiple types of 
detection, ie:

frame 1000 ->  black/blank counter 1
frame 1001 ->  no logo counter 1, black counter 2
frame 1002 ->  no logo counter 2, black counter 3
yada yada yada

Then it's a matter of
   Enter skip detection
             determine current frame
              examine skip buffer ( from the 2nd thread )
               protection logic
               skip logic

If the first thread caught up to the second thread (not likely ) it 
would pause until the second thread had more output or the skip failed...

If using a true ring buffer it would be needed a method of making sure 
the second thread didn't overwrite something the first thread could 
still use...

Further thought:  should this be local to the front end, or a network 
operation?   How to elminiate duplicate compressed video on the network?

Just thoughts, not demands, or even suggestions :-)


Matt Zimmerman wrote:

>On Sun, Feb 23, 2003 at 10:09:04PM -0500, Andy Davidoff wrote:
>>Thanks so much for your contribution.
>>I guess what I'd like to see is an adjustable buffer size so that I
>>can devote a few hundred megs to commercial-killing.
>To what end?  If you intend to store uncompressed video for analysis
>purposes, a few hundred megs (500 or so) will net you approximately one
>30-second commercial.

More information about the mythtv-dev mailing list