[Libav-user] Custom data in AVPacket or AVFrame

laddoe xyfix at hotmail.com
Tue Feb 15 23:25:12 EET 2022


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?

Thank you in advance

________________________________
Van: Libav-user <libav-user-bounces at ffmpeg.org> namens Nicolas George <george at nsup.org>
Verzonden: dinsdag 15 februari 2022 19:11
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

Dan Egnor (12022-02-15):
> My understanding of the OP was not that they wanted to embed anything in
> the bitstream but just that they wanted to set a cookie in AVFrame that
> would show up in the corresponding AVPacket (if encoding) or vice versa (if
> decoding), hence the suggestion of reordered_opaque. Quite possibly I
> misunderstood! Maybe the OP can clarify.

The original message has not disappeared, you can re-read it.

"add a custom number [] before I encode it  and I want to retrieve it
back when I decode it."

Once FFmpeg has encoded and muxed, it is done with the data, there is no
connection to a later decoder. Therefore any transmitted data needs to
be in the output file.

--
  Nicolas George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220215/b8f77169/attachment.htm>


More information about the Libav-user mailing list