[Libav-user] Extract AVFrameSideData

Devin Heitmueller dheitmueller at kernellabs.com
Fri Jun 7 18:38:29 EEST 2019

> That fake encoder will have a definition like:
> >     .type           = AVMEDIA_TYPE_VIDEO,
> >     .id             = AV_CODEC_ID_EIA_608,

This should be what you need.  The output AVStream doesn't have a
discrete type like raw content does (e.g. where you have
audio/video/data).  The content of the packets is driven entirely by
the codec ID.

> But if it's defined like this, it will output a video with eia_608
> type.... which doesn't t allow ccaption_dec to be applied.

The output is defined by the codec.  If your encoder takes in video
AVFrames, throws away the actual video content, and uses the side data
to output packets with the codec AV_CODEC_ID_EIA_608, that should be
perfectly fine.

> If it's defined like:
> >     .type           = AVMEDIA_TYPE_SUBTITLE,
> >     .id             = AV_CODEC_ID_EIA_608,
> No video packets will be sent to it.

Right, that definitely won't work, because the ffmpeg core won't
deliver video AVFrames to it.

Did you actually try what you specified in the first scheme?  That
should work fine, so if you tried it and it didn't I would be
interested in seeing the errors you got.


Devin J. Heitmueller - Kernel Labs

More information about the Libav-user mailing list