[mythtv] Skipping Commercials When Not Done Flagging

Chris Pinkham cpinkham at bc2va.org
Tue Apr 5 07:53:13 UTC 2005


> First time poster...I really love this software, and it may be time that 
> I chip in coding.  So allow me to ask this: is there a good reason that 
> commercials cannot be skipped even though the entire show hasn't been 
> flagged?  For example, my wife and I often start watching a 7:00 show at 
> 7:30.  With the recent CVS update of commercial flagging starting at the 
> beginning of a show, I know that the flagger has surely finished 
> flagging roughly half the show.  But since the show isn't officially 
> marked "flagged", I can't automatically skip the commercials.  Where in 
> the code would I look to enable commercial skipping even though the 
> flagging hasn't been finished?  Is this too big of a change for a first 
> MythTV patch?  I would love to have this feature.  Thanks in advance!

This feature is on my TODO list, fairly near the top.  This is one of
the reasons I modified things to allow the current "semi-realtime"
flagging.  It won't be in before 0.18, but you can probably expect it
before the next release after that.

The way the "ALL" detection works is that it goes through frame by frame
collecting information, then when it's done looking at all the frames,
it divides the video into blocks that start and end with a blank frame.
Then it goes through a few loops analyzing the data trying to determine
what blocks look like a commercial and what don't.  Then it groups the
blocks of "commercials" together and the blocks of "show" and comes
up with the commercial break list.

In order to do what you're describing, a few things have to be
reworked to allow running of the analysis phase at anytime.  Then
I have to make a way for the frontend to signal mythcommflag to
run through the analysis phase (or I can just do what I've been
thinking of doing and have the analysis phase done every X frames
if we're in "realtime" mode).  Whenever mythcommflag runs through
the analysis phase, it would save the commercial break list to the
DB.  The frontend player has to be modified to know when to
reretrieve the commercial skip list whenever the user tries to
skip.

So, there are a few things I need to do to get this done and I don't
want to make such invasive changes before the next release since Isaac
is trying to get the next release out quicker and I don't want to
take a chance at breaking flagging by implementing these changes. :)
I have some time this weekend, so I might work on this then.  Usually
with big commercial flagging changes, I try to run them on my
production Myth setup for a week or so at least before committing to
CVS.

-- 

Chris



More information about the mythtv-dev mailing list