[Libav-user] Extract AVFrameSideData

Devin Heitmueller dheitmueller at kernellabs.com
Thu Jun 6 23:51:57 EEST 2019


On Thu, Jun 6, 2019 at 3:19 PM <lyncher at sapo.pt> wrote:

> I would like to be able to retrieve the CC bytes from a previously
> decoded AVFrame and using ccaption_dec to format it in SRT (or any other
> supported format).
> I was thinking to create a Filter that receives an AVFrame and returns
> an AVPacket.... but this combination seems no to be possible.
> How can I extract AVSideData from a AVFrame and output it in a filter as
> AV_CODEC_ID_EIA_608?

So filters can only have AVFrames as inputs and outputs.  You cannot
have a filter which takes in AVFrames and outputs AVPackets.
Something that takes in frames and outputs packets is technically an
encoder.  So in principle you could split the video with a filter and
feed the real video to whatever encoder you are using (e.g. x264), and
the second video feed goes into your fake encoder which outputs the
608 AVPackets.

One of these days I'll kill an afternoon and hack together such an
encoder, but just haven't had the need yet.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com


More information about the Libav-user mailing list