[Libav-user] Custom data in AVPacket or AVFrame

laddoe xyfix at hotmail.com
Wed Feb 16 11:16:17 EET 2022


Correction, I meant av_frame_new_side_data but it looks like the "side data" is not meant for that. I couldn't find the right documentation that would explain what the purpose is for the "side data" ( the same for AVPacketSideData). I also tried the metadata struct (AVDictionary) in the AVFrame struct but it did not work either.
I'm really stuck on this and have been reading/trying a lot but I guess I need some help of a pro. My goal is to add a uint32_t value to each frame or packet before encoding but if that is not possible I would like to add an array of uint32_t in the container which I would be able to retrieve back after I decode it.
________________________________
Van: Libav-user <libav-user-bounces at ffmpeg.org> namens laddoe <xyfix at hotmail.com>
Verzonden: woensdag 16 februari 2022 00:28
Aan: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-user at ffmpeg.org>; 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

At first I thought it would be possible to do it per frame, so I tried AVFrameSideData and the av_frame_set_data. Then I thought to try it on a packet with AVPacketSideData. But none of this worked.

________________________________
Van: Libav-user <libav-user-bounces at ffmpeg.org> namens Brad Hards <bradh at frogmouth.net>
Verzonden: dinsdag 15 februari 2022 23:15
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 9:03:32 AM AEDT laddoe wrote:
> 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 ?
It might make a difference to what decoder gets chosen.

What have you tried? If nothing, you probably should test next. You should be
able to see your results in the bitstream file on encoding (e.g. by searching
for your UUID in a hex editor), which allows you to check your development.

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/20220216/5befac5e/attachment.htm>


More information about the Libav-user mailing list