[Libav-user] Custom data in AVPacket or AVFrame

laddoe xyfix at hotmail.com
Wed Feb 16 13:24:41 EET 2022

Sorry that was my fault but I use avcodec-58.dll, avformat-58.dll, avutil-56.dll and libx264-161.dll. I will try your example code and come back to you.
Van: Libav-user <libav-user-bounces at ffmpeg.org> namens Brad Hards <bradh at frogmouth.net>
Verzonden: woensdag 16 februari 2022 10:28
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:16:17 PM AEDT laddoe wrote:
> 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.
We know it didn't work - you wouldn't be posting if it did.
However we have no idea what actually happened instead. We still don't know
what version of the libraries you are using.

Here is an extract from a sample I used:

    AVFrame *frame;
    AVFrameSideData *side_data;
    // This is from MISB ST 2101
    char sei_message[] = {0xa5, 0x50, 0x52, 0xaf, 0x52, 0x16, 0x5f, 0x45,
                          0xa3, 0x18, 0x1c, 0xfc, 0x7a, 0xbb, 0xc2, 0x67,
                          0x01, 0x70, 0xF5, 0x92, 0xF0, 0x23, 0x73, 0x36,
                          0x4A, 0xF8, 0xAA, 0x91, 0x62, 0xC0, 0x0F, 0x2E,
                          0xB2, 0xDA, 0x16, 0xB7, 0x43, 0x41, 0x00, 0x08,
                          0x41, 0xA0, 0xBE, 0x36, 0x5B, 0x5A, 0xB9, 0x6A,
                          0x36, 0x45};

    side_data = av_frame_new_side_data(frame, AV_FRAME_DATA_SEI_UNREGISTERED,
    if (!side_data)
        fprintf(stderr, "Could not allocate the video frame side data\n");
    memcpy(side_data->data, sei_message, side_data->size);

If that doesn't work for you, please make a SSCCE (http://sscce.org/) of what
you are doing, what you expected that code to do, and what happened instead.


Libav-user mailing list
Libav-user at ffmpeg.org

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/3ae68c2e/attachment.htm>

More information about the Libav-user mailing list