[FFmpeg-devel] Passing Data from AVFrame to AVPacket

wm4 nfxjfg at googlemail.com
Mon Jan 30 09:38:56 EET 2017


On Sun, 29 Jan 2017 22:24:12 +0000 (UTC)
<berkaydereli-at-yahoo.com at ffmpeg.org> wrote:

> Hello devs, 
> 
> I have a quick question about passing data from AVFrame to AVPacket. Assume that we are encoding video and we have a custom metadata that needs to be handled in a frame accurate manner. The AVFrame can refer to this using the opaque pointer. However, due to the nature of video coding, the video packet that we get back when we encode video is not the frame that we have just pushed to a codec. In this case the packet and the AVFrame gets decoupled. 
> 
> What is the best practice to have a reliable flow of metadata from AVFrame to AVPacket?
> Cheers,

Generally, side-data. Which needs to be part of the API. (There is no
way to add user-defined side-data, unfortunately.)


More information about the ffmpeg-devel mailing list