[mythtv-users] commercial skipping recorded shows

Chris Pinkham cpinkham at bc2va.org
Sat May 10 13:16:11 EDT 2003


> Didn't it originally write recordedmarkup entries as blanks
> were found? I remember that this was a clue that two backends
> were recording the same show because the database was throwing
> errors whenever it got a duplicate for the same frame in the
> same show.

The recording process has never written the blank frame map to the
database, it has always happened in tv_rec.cpp after the recording
finished.  I've modified the recorder and player in my cvs copy so
that the player writes the blank frame list every X blank frames to
the database (still tuning what X should be).  I've also modified the
player so that if you're watching LiveTV it will try to get the latest
blank frame list from the DB and build a quick commercial skip list from
that before trying to skip.  This should eliminate having to search for
blank frames manually for people doing software encoding.

> But you have been finding the blank frames so it shouldn't need
> to rescan....

It doesn't really for people using software encoding, but since blank frame
detection isn't 100% perfect and since I plan on implementing other
detection methods to try to get closer to that 100%, then this post-recording
scan framework was put in place.  I could make it short-circuit and skip
the post-recording scan if you're using software encoding, but then you
wouldn't benefit from the other detection methods as they are added.  I'm
looking at incorporating some form of scene change detection right now.

> Chris, I'd been meaning to ask you about something. When
> "Automatically Flag Commercials" first appeared, I set this
> thinking it was a good thing. However, a backend thread would
> be busy for maybe a half hour after a recording finished.
> When I looked into it, it appeared that blanks were correctly
> being marked during software encoding. However, with Flag
> Commercials set, at the end of recording it would delete all
> recordedmarkup entries for that show then start re-reading
> the file from the beginning to mark (the same ;-) blank
> frames over again.

Little-known secret.  With the current code, since the only detection method
being used is blank-frame detection, you should be able to turn off the
auto-flagging setup option and still be able to skip commercials quickly,
so you are correct.  If you are happy with the accuracy of that, then feel
free to turn the auto-flagging off, but when we start adding better detection
methods that can't be done real-time while recording, then you wouldn't benefit
unless you turned auto-flagging back on at that time.

Auto-flagging is REQUIRED for the commercial detection code to work for
people with hardware encoders though, that is another reason not to recommend
turning this setting off.

Chris



More information about the mythtv-users mailing list