On Tue, 3 Dec 2024, Marth64 wrote:

Hi Marton,

I see two possibilites:

1) Make ffprobe read the first packet or decode a first frame from every
    stream and print information based on that.

2) Extend avstream_find_stream_info() so
  - the API user can force it to read a packet or decode a frame from every
    stream (this is not always the case right now)
  - it has a way to return the first frame or first packet from every
    stream when probing

My only concern with this is that the presence of Closed Captions
is not necessarily known with the first frame. It could be any N'th frame.

But how many frames do you intend to decode to make sure that you detect closed captions reliably? Because as far as I understand we basically rely on avformat_find_stream_info() to encounter a frame with closed captions. So detection is based on the completeness of AVCodecParameters and the order of packets from other streams, more precisely, sheer luck.

Regards,
Marton
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to