[mythtv-users] Patches that improve mythcommflag accuracy

faginbagin mythtv at hbuus.com
Tue Nov 25 05:50:04 UTC 2014


On 11/24/2014 6:14 AM, Brian J. Murrell wrote:
> Helen,
> 
> I have been watching this thread with great interest as I too find
> commflagging too inaccurate.  In my case however I find that the actual
> detection of commercials to be fairly accurate, however it's the
> accurate recording of their locations that I find inaccurate.
> 
> This inaccuracy is due to variable rate recordings.  Mythcommflag
> assumes that a recording has only one framerate and due to that
> inaccurately records where commercials are when the framerate changes.
> 
> Apparently all of the data needed to rectify this is in the seek table
> but is just not taken advantage of (yet).
> 
> Do your patches do anything about this problem?
> 
> Cheers,
> b.

FWIW, many of my SD recordings change frame rates many times and I haven't seen that cause a problem. It's true that mythcommflag assumes a constant fps to convert frames to seconds and vice versa, but it does so only to do things like:
- decide which frames to examine during logo detection.
- decide whether a block of frames are a commercial break or the actual show.
But the commercial marks stored in the database have actual frame numbers, not some time stamp based on an inaccurate frame rate.

I often use the cut list editor to check the results of commflagging, and when I use it to examine a particular frame, the frame matches the statistics I see coming out of mythcommflag, as long as you add 1. That's because the cut list editor numbers frames from 1, while mythcommflag numbers them from 0. For example, if mythcommflag says frame 123 is blank and the next frame, 124, isn't, I can see that frame 124 is blank in the cut list editor and frame 125 isn't.

How did you determine that commercial flagging was accurate yet the recording of their locations was inaccurate?

What kind of tuner are you using? Maybe that's a factor?

And which version of mythtv?

Regards,
Helen


More information about the mythtv-users mailing list