[mythtv] alternative method for commercial skipping

Chris Pinkham cpinkham at bc2va.org
Fri May 16 02:19:19 EDT 2003

> Yes, but what I meant what to store one frame (picture) out of that 
> video clip. If you found that frame, you also found the clip, because 
> the logo won't appear in a movie.

I've been trying to think of how to compare these frames, it and am
wondering if it could be quickly done using histograms.  Subdivide
the screen into say a 4x3 or 3x3 matrix and record histograms of each.
When a new frame comes in, get the histogram for the first subdivision
and compare it.  If that matches, do the 2nd subdivision, etc..

> I said "*store* that frame", because every station of course has 
> different clips, and each station has a set of several clips (5-10?) 
> they use at any given time, and the sets also change over time 
> (months/years).

I guess if it will work for one then it will work for many.

> >unless someone wants to put up some sample .nuv files for me to download.
> >
> Will do so, URL per private mail.

Great, thanks.

> >If someone could think up a way to detect things like this on-the-fly
> >it would be great.
> >
> Not sure what you mean with "on the fly". What I meant with "hit a key": 
> If I see such an intro/outro for commercials, I would hit a certain key, 

I mean without having to hit a key.  For unattended recordings that get
processed for commercials immediately after recording.  If I have 30+
channels and each uses 5-10 different lead-in/lead-out frames/videos
then it will take a while to build up the frame database to know what
to look for.

> I don't have a problem with a hit rate of only 70-90%, as long as I can 
> be 100% sure that I see everything of the movie. The more fancy it gets, 
> the less predicatable it gets and the less likely it is that bugs are 

That's why I was talking about some form of rating.  So no 1 or 2
things could cause part of a show to be marked as a commercial.

> Yes, but what if it skips too far?
> >I just back up 5 seconds and double-check.
> >
> nod, but that destroys some of the convience intended. Thus the 
> suggestion to always display the last n seconds of the commercial block.

I don't jump back unless I think it missed something which is rare.
I think it's more annoying to skip all but the last second of the
commercial. :)  I'd rather go right back to the show.

> >Just committed it now.  Let me know if (or how well) it works.
> >
> It only processes new recordings, right?

Yes. I should generate a patch and put up a link for the program I
use to test and re-flag stuff when I work on the detection code.
I have a standalone program that will re-flag one recording, all
recordings, or new ones without commercial break info.

If you're going to try the scene detection, you should re-sync with
cvs.  I found a bug which could cause infinite loops in some
circumstances so you should get that fix before turning on the
scene change detection code.  Let me know if it does any good.
It worked great on one program I tested it on here but on another
it wasn't as good.  I think the code that trys to determine what
a high rate of scene changes is needs to be tweaked.


More information about the mythtv-dev mailing list