[FFmpeg-devel] [PATCH] H.264 I-frames with SEI are also key frames

madshi dear
Fri Mar 6 11:01:39 CET 2009

Jason Garrett-Glaser schrieb:
>> Recommendation: Default, or 10x whatever your framerate is.
>> So based on this my new suggestion would be:
>> (1) If we're at runtime 11 seconds or later and
>> (2) there was no recovery point SEI found yet and
>> (3) there was one IDR frame at the start of the stream and
>> (4) there was no further IDR frame found yet, ...
>> ... in this situation treat all future I-frames as key frames, until
>> a recovery point SEI or a new IDR frame is found.
> This is potentially reasonable logic for the general case, but your
> justification for that logic--of adapting the decoder based on
> x264--is a phenomenally stupid idea, IMO.
> Dark Shikari

Well, it's easy to criticize suggestions. When there is no perfect
solution available, no suggestion can produce perfect results.
Do you have a better idea on how to solve the problem?  :-)

Of course the ideal solution would be to preparse the whole
stream. Then we would know for sure whether there are any
recovery point SEIs and/or more IDR frames in the stream.
But as far as I know, preparsing the full stream is not an option,
or am I wrong? So we have to find a reasonable way to "guess"
whether there are any IDR frames or recovery point SEIs in the

Do you disagree with that?

Besides, the logic I suggested adapts itself. I mean, once a
2nd IDR frame (or the first recovery point SEI) is found, no
further I-frames are treated as key frames. So any potential
problems would only occur in the runtime area from 11 seconds
to the first IDR frame / recovery point SEI.

Regards, madshi.

More information about the ffmpeg-devel mailing list