[FFmpeg-devel] [PATCH v2 00/11] fix broken CC detection and ffprobe fields (cover letter)
Marth64
marth64 at proxyid.net
Thu Dec 5 01:16:17 EET 2024
Hi Marton,
> 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.
That's a good point.
This is seeming more like a feature that is not compatible with the
current models.
Should the fields just be removed? Let users probe frames and make their
own determinations?
Alternatively, this can be localized to be an ffprobe concern in such
a way that it can be given
an option to enable CC detection and setting the fields values to a
certain duration.
ffprobe can then scan the frames for already exposed side data and set
the field to 0/1.
I think a similar approach can be taken with film grain. For example,
ffprobe -show_streams -analyze_side_data 1 -analyzeduration 16M ....
Where -analyze_side_data enables checking these frames up to the value
of -analyzeduration.
When enabled, it would set closed_captions and film_grain field based
on its finding.
(hypothetical new option)
This makes all the work of exposing the fields, and setting
dispositions unnecessary.
Then only the patch #9 (avformat/demux: copy AVCodecContext properties
in codec_close())
is beneficial here if we want to fix the dump function.
What do you think?
More information about the ffmpeg-devel
mailing list