[Libav-user] Extract AVFrameSideData

lyncher at sapo.pt lyncher at sapo.pt
Fri Jun 7 18:48:08 EEST 2019


I'm not getting how can I define the codec ID to an AVPacket.....
Should I set something at AVCodecContext?

lyncher


On 07-06-2019 16:38, Devin Heitmueller wrote:
>> 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
>



More information about the Libav-user mailing list