[Libav-user] Custom data in AVPacket or AVFrame

Brad Hards bradh at frogmouth.net
Tue Feb 15 23:39:38 EET 2022

On Wednesday, 16 February 2022 8:25:12 AM AEDT laddoe wrote:
> My apologies for not being clear in my original post. The codec I'm using is
> h264 and the container is mp4. How can I determine if this codec supports
> per-frame data? If not,  can you give me pointers on how to do it in the
> bitstream code or on container level?

The codec format supports it (e.g. as SEI - you might like to look at creating 
a UUID and using the user-data-unregistered kind of SEI message), and the 
container format can support it via custom boxes (and maybe some kind of other 
box, like EMSG).

That is a bit different to the codec or container muxer/demuxer implementation 
supporting it. For example, x264 based implementation in earlier versions of 
ffmpeg (before 5.0, or maybe 4.4) didn't support encoding, but it did support 
decoding. openh264 doesn't appear to support either.

The getter API is av_frame_get_side_data. See
and associated methods / data structures.



More information about the Libav-user mailing list