[mythtv] rolling up my sleeves: a few questions about commflagging

John Pilkington J.Pilk at tesco.net
Sun Jan 26 22:06:27 UTC 2014

On 26/01/14 21:09, Brian J. Murrell wrote:
> On Sun, 2014-01-26 at 08:41 -0500, Brian J. Murrell wrote:
>> So really, ClassicCommDetector::BuildBlankFrameCommList() needs to stop
>> assuming a constant fps and roll with the change as it happens in the
>> stream.
> Unfortunately the frame_rate does not seem to be available too easily
> during commercial detection.  I had hoped I could get it from
> frame->frame_rate in ClassicCommDetector::ProcessFrame() but every frame
> has a rate of "-1" there.
> I'm afraid I'm out of my depth for a casual Sunday of hacking to try to
> get an accurate measure of each commercial with it's own fps.
> FWIW, I saw one commercial where the fps must have been changing during
> the commercial because it had a wall-clock running time of 30 seconds
> yet it's frame count was such that when divided by 29.97 it was about 27
> seconds but when divided by 23.976 it was about 32 seconds.
> Thoughts?
> b.

I recently tried looking at changes in frame rate to identify possible 
cutpoints, but it didn't look as if it was going to be productive. 
Recently I realised that rebuilt seektables were incomplete (for h264), 
and that didn't help. Ticket 12010.

Anyway, mythutil --getmarkup will generate an xml file that includes 
timestamps, byte offsets and frame numbers for all keyframes.  It could 
be what you want.

John P

More information about the mythtv-dev mailing list