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

Chris Pinkham cpinkham at bc2va.org
Fri Feb 21 16:18:34 EST 2003


> I applied this patch and tried it out over my lunch hour.  I had the
> daily show and futurama for testing.

I tested against ER, That 70's Show, This Old House, and one other that
I can't recall right now.  This Old House worked OK when recorded off of
one of the major networks, but not too good when recorded off of PBS
because they do some sort of fade or something I recall going to/from the
show.

> When watching futurama from cartoon network, they use these funny clips
> before and after a commercial break, they are clips of different shows
> and sometimes the current show, then they wipe it off the screen to the
> top or the bottom.  The commercial skip patch makes it past the first

So 'Wipe' could be another detection method.  Maybe each show set to
record or each channel could have a detection method specified, otherwise
the default would be used.

> The daily show was a different story.  For some reason it would only
> skip the first 2 commercials, then I would have to hit "Z" to skip each
> commercial after that.  The only pattern I could come up with was most
> the commercials it had problems with were ones inserted by the local
> cable provider.

I need to upload a patch with my debug statements inserted so they can
be turned on for testing this kind of thing.  I found one break one time
where a commercial break was 31 seconds long.  Maybe something weird is
going on with time compression/expansion.

I had the code setup to print debug messages whenever it encountered a
blank frame, plus indicate where it was jumping to, etc..

> I had about 2 minutes left to run some tests on Seinfeld from last night
> on FOX.  It seemed to skip all the commercials OK.

I'm going to setup a bunch of records to record shows I don't normally
watch, that will help give me more samples to test.

> Thats about all I have so far.
>
> Matt

Thanks for the feedback, this is what I was looking for.  I can code it so
it works for my limited use but if it doesn't work for anyone else it's not
worth much.

Once I get a bunch of clips from various stations/channels, I can work on
logo detection code using some of the info from URL's posted here on the
list.  The logo detection could possibly be used to detect the little
white box that people have been mentioning shows up on some
channels.

Chris

*****************************************************************************
** 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