[FFmpeg-devel] AVCodecParserContext.keyframe does not match AVFrame.key_frame for an AVCHD sample

Robert Krüger krueger at lesspain.de
Tue Mar 12 18:55:41 CET 2013

On Tue, Mar 12, 2013 at 6:47 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Fri, Mar 08, 2013 at 01:22:54PM +0100, Robert Krüger wrote:
>> Hi,
>> I have a sample camera file for which only the first frame is reported
>> as a keyframe when decoding it (AVFrame.key_frame and ffprobe output
>> confirms that) but for some frames
>> AVCodecParserContext.keyframe is set to 1 and that would absolutely
>> make sense taking into account what I know about the camera's GOP size
>> from other sources. However, the field
>> AVCodecParserContext.convergence_duration is never set to any other
>> value but 0 and judging by its documentation it looks like it is the
>> one I should really use to identify recovery points when parsing the
>> stream. It would be nice if someone with knowledge of ffmpeg's h264
>> internals could tell me if I can use this to identify recovery points
>> in an h.264 stream or if the inconsistency between
>> AVCodecParserContext.keyframe and AVFrame.key_frame should be fixed or
>> if I'm getting it all wrong.
>> What shall I do? File a ticket in trac? The sample is the same as for
>> tickets 2336, 2337, 2338.
> the file in this ticket contains 2 IDR frames and several recovery
> points
> I guess the decoder should set key_frame for these recovery points
Thanks for the clarification!

More information about the ffmpeg-devel mailing list