> -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > Kieran Kunhya via ffmpeg-devel > Sent: Monday, January 27, 2025 10:40 AM > To: FFmpeg development discussions and patches <ffmpeg- > de...@ffmpeg.org> > Cc: Kieran Kunhya <kieran...@googlemail.com>; Marth64 > <mart...@proxyid.net> > Subject: Re: [FFmpeg-devel] [PATCH v2 00/11] fix broken CC detection > and ffprobe fields (cover letter) > > > > > While this is a very valid concern for some kinds of frame side > data, it > > does not apply to CC data. It's either in every frame or none. If a > > provider generally broadcasts CC, then it's always present in every > frame, > > even during programs for which no CC is available - it's always > there. Like > > I mentioned at the top, we're using the properties field from the > codec > > (via codec_par) and there hasn’t been a single case reported where > the CC > > detection this way would have been incorrect. > > > > This isn't true, CC data is sparse. > I have no opinions about the rest of the text. > > Kieran
Hi Kieran, Thanks for your reply. In expectation of doubt, I had yesterday slightly modified ffprobe to count frames with and without CC side data like this: if (par->codec_type == AVMEDIA_TYPE_VIDEO) { if (!is_sub && do_analyze_frames) { int has_cc = 0; for (int i = 0; i < frame->nb_side_data; i++) { if (frame->side_data[i]->type == AV_FRAME_DATA_A53_CC) { streams_with_closed_captions[pkt->stream_index]++; has_cc = 1; } else if (frame->side_data[i]->type == AV_FRAME_DATA_FILM_GRAIN_PARAMS) streams_with_film_grain[pkt->stream_index] = 1; } if (!has_cc) { streams_without_closed_captions[pkt->stream_index]++; } } } Then I ran it on all kinds of mpegts recordings I had at hand, and that's the result: All video streams only, some were from the same file, others recorded in the same way, hence the duplications. +--------+----------------+-------------------+ | | Frames with CC | Frames without CC | +--------+----------------+-------------------+ | stream | 786 | 0 | +--------+----------------+-------------------+ | stream | 786 | 0 | +--------+----------------+-------------------+ | stream | 786 | 0 | +--------+----------------+-------------------+ | stream | 0 | 232 | +--------+----------------+-------------------+ | stream | 0 | 238 | +--------+----------------+-------------------+ | stream | 0 | 239 | +--------+----------------+-------------------+ | stream | 0 | 237 | +--------+----------------+-------------------+ | stream | 0 | 235 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 112 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 118 | 0 | +--------+----------------+-------------------+ | stream | 58 | 0 | +--------+----------------+-------------------+ | stream | 51 | 0 | +--------+----------------+-------------------+ | stream | 42 | 0 | +--------+----------------+-------------------+ | stream | 45 | 0 | +--------+----------------+-------------------+ | stream | 42 | 0 | +--------+----------------+-------------------+ | stream | 102 | 0 | +--------+----------------+-------------------+ | stream | 45 | 0 | +--------+----------------+-------------------+ | stream | 104 | 0 | +--------+----------------+-------------------+ | stream | 42 | 0 | +--------+----------------+-------------------+ | stream | 102 | 0 | +--------+----------------+-------------------+ | stream | 44 | 0 | +--------+----------------+-------------------+ | stream | 104 | 0 | +--------+----------------+-------------------+ | stream | 42 | 0 | +--------+----------------+-------------------+ | stream | 106 | 0 | +--------+----------------+-------------------+ | stream | 44 | 0 | +--------+----------------+-------------------+ | stream | 99 | 0 | +--------+----------------+-------------------+ | stream | 41 | 0 | +--------+----------------+-------------------+ | stream | 101 | 0 | +--------+----------------+-------------------+ | stream | 45 | 0 | +--------+----------------+-------------------+ | stream | 99 | 0 | +--------+----------------+-------------------+ | stream | 32 | 0 | +--------+----------------+-------------------+ | stream | 92 | 0 | +--------+----------------+-------------------+ | stream | 40 | 0 | +--------+----------------+-------------------+ | stream | 95 | 0 | +--------+----------------+-------------------+ | stream | 37 | 0 | +--------+----------------+-------------------+ | stream | 97 | 0 | +--------+----------------+-------------------+ | stream | 34 | 0 | +--------+----------------+-------------------+ | stream | 94 | 0 | +--------+----------------+-------------------+ | stream | 37 | 0 | +--------+----------------+-------------------+ | stream | 96 | 0 | +--------+----------------+-------------------+ | stream | 34 | 0 | +--------+----------------+-------------------+ | stream | 94 | 0 | +--------+----------------+-------------------+ | stream | 35 | 0 | +--------+----------------+-------------------+ | stream | 91 | 0 | +--------+----------------+-------------------+ | stream | 43 | 0 | +--------+----------------+-------------------+ | stream | 103 | 0 | +--------+----------------+-------------------+ | stream | 40 | 0 | +--------+----------------+-------------------+ | stream | 101 | 0 | +--------+----------------+-------------------+ | stream | 43 | 0 | +--------+----------------+-------------------+ | stream | 59 | 0 | +--------+----------------+-------------------+ | stream | 0 | 5002 | +--------+----------------+-------------------+ | stream | 0 | 725 | +--------+----------------+-------------------+ | stream | 0 | 528 | +--------+----------------+-------------------+ | stream | 0 | 7423 | +--------+----------------+-------------------+ | stream | 0 | 3532 | +--------+----------------+-------------------+ | stream | 0 | 9088 | +--------+----------------+-------------------+ | stream | 0 | 105006 | +--------+----------------+-------------------+ | stream | 0 | 104868 | +--------+----------------+-------------------+ | stream | 0 | 50770 | +--------+----------------+-------------------+ | stream | 74595 | 0 | +--------+----------------+-------------------+ | stream | 0 | 90 | +--------+----------------+-------------------+ | stream | 0 | 90 | +--------+----------------+-------------------+ | stream | 0 | 95652 | +--------+----------------+-------------------+ | stream | 0 | 8745 | +--------+----------------+-------------------+ | stream | 0 | 2832 | +--------+----------------+-------------------+ | stream | 0 | 7204 | +--------+----------------+-------------------+ | stream | 0 | 7204 | +--------+----------------+-------------------+ | stream | 0 | 7204 | +--------+----------------+-------------------+ | stream | 0 | 7197 | +--------+----------------+-------------------+ | stream | 0 | 7197 | +--------+----------------+-------------------+ I can provide all (most) files privately. Happy to look into any examples if you have. Best sw _______________________________________________ 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".