As it was discussed today on #ffmpeg and #ffmpeg-devel, only IDR frames
are considered safe seek points by design of H.264. H.264 has two
kinds of pictures which are mapped to AV_PICTURE_TYPE_I: NAL_IDR_SLICE
and some other NAL_SLICE. H.264 referencing is arbitrary and GOP concept
is not strict, as jkqxz and Mavrik have explained.
I my usecase, I need to be sure about slicing the file and not breaking
any references. So some introspection of references would be nice, but
for now just a programmatic test, or at last a warning from inside
libavcodec's H.264 parser, about cross-GOP refs is fine, because in
practice, per-GOP handling seems to be fine so far.
This is not available at ffmpeg API level. The form of this work is a
patch for upstream FFmpeg (upstreamable or not), or separate tool (but
additional dependencies or high time/CPU overhead to run it are strongly
undesired).

Also, I am interested in any knowledge about applications which
generate such files (with cross-GOP refs) in practice, because this
request is about working around such case. Sharing sample media files
is also appreciated.

I am happy to fund this work. Feel free to reply on-list or off-list
as you prefer.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to