Identifying h264 frame types?
Tim-Philipp Müller
t.i.m at zen.co.uk
Thu Jan 25 13:54:02 UTC 2024
Hi,
> Short version:
> Is there a way to identify if a sample/frame provided to an
> appsink
> has been produced from an h264 I-frame (or P-frame/B-frame)?
Encoded H.264 frames coming out of qtdemux should have the DELTA_UNIT
flag set on buffers if it's a P/B frame, and should have the DELTA_UNIT
flag cleared (not set) if it's a key/IDR frame. This will be based on
information in the container.
After a decoder you can't know if a decoded raw video frame was
generated from a keyframe or not. (If that flag happens to be set right
in some cases that would likely be an accident, not by design, and you
probably can't rely on that).
Cheers
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20240125/0fe9d54a/attachment.htm>
More information about the gstreamer-devel
mailing list