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

Chris Pinkham cpinkham at bc2va.org
Tue Feb 25 21:20:10 EST 2003


> It seems to me at least for software encoding it would make more sense to
> do the black frame detection during the encoding of the video when the
> uncompressed data is already in memory.  Then the black frame information
> could be saved to an index file that the commercial skip code could use to
> skip the commercials without having to decode and run the black frame
> detection every time.

Well, I already have the blank detection code, just need to put the code
somewhere so it's accessible by both the player, recorder, and any
off-line programs that need it.

Last night I took a look at NuppelVideoRecorder.cpp and found out where I
need to check for blank frames during the record process.

I also have a file that I saved earlier which lists the blank frames in
one of my recorded videos.  I wrote about 50 lines of C code that looks
at this list of blank frames and spits out what it thinks are the
commercial sequences.  Looks like it does a pretty good job so far.

So, hopefully I will get the code working within the week to scan for
blank frames during the record and save the list into the database.
Then during playback the list can be used to skip commercials with
pretty much instantaneous skip.

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