Closed rossGardiner closed 3 years ago
The GPU gives you flags alongside each encoded buffer.
With the Encoder class you get _callback
which gives you a MMALBuffer
object.
The flags
member will have MMAL_BUFFER_HEADER_FLAG_KEYFRAME
set for an I-frame.
Thank you, this was exactly what I needed.
Is it possible to extract keyframes (iframes) at the encoding stage of the video stream? I have an application which requires iframes from specific points in a H264 stream, selecting iframes from the stream in post (using ffmpeg) takes too long. Could picamera output iframes as they are encoded?
Any advice appreciated!