Thanks Devin for your feedback.

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

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.

If it's defined like:
    .type           = AVMEDIA_TYPE_SUBTITLE,
    .id             = AV_CODEC_ID_EIA_608,

No video packets will be sent to it.


What should be the correct definition to have this fake encoder configured like:
    Video > Fake Encoder > eia_608 caption stream

Thanks
lyncher


On 06-06-2019 21:51, Devin Heitmueller wrote:
On Thu, Jun 6, 2019 at 3:19 PM <[email protected]> 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


_______________________________________________
Libav-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to