[Libav-user] Custom data in AVPacket or AVFrame

laddoe xyfix at hotmail.com
Wed Feb 16 00:03:32 EET 2022


I made a typo when writing "h264" , the exact codec as stated in my code is

/**
 * @brief encoderName
 */
const std::string encoderName( "libx264rgb");

const AVCodecID decoderID( AV_CODEC_ID_H264 );

does this make any difference to the answer that was given by Brad ?

thank you in advance


________________________________
Van: Libav-user <libav-user-bounces at ffmpeg.org> namens Brad Hards <bradh at frogmouth.net>
Verzonden: dinsdag 15 februari 2022 22:39
Aan: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-user at ffmpeg.org>
Onderwerp: Re: [Libav-user] Custom data in AVPacket or AVFrame

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
https://ffmpeg.org/doxygen/trunk/
group__lavu__frame.html#gadec0efb470b1eead6a979333d9deca0c
and associated methods / data structures.

HTH

Brad




_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220215/7cb4c67d/attachment.htm>


More information about the Libav-user mailing list