[FFmpeg-devel] [PATCH v2 00/11] fix broken CC detection and ffprobe fields (cover letter)

Marton Balint cus at passwd.hu
Tue Dec 3 23:13:56 EET 2024



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


More information about the ffmpeg-devel mailing list