Opened 5 days ago

Closed 4 days ago

#11455 closed defect (duplicate)

Degradation in Closed Captions decoding

Reported by: ValeryKot Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: ccaption_dec
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by ValeryKot)

Summary of the bug: in some cases, FFmpeg fails to extract Closed Captions (A/53 Part 4 format). This is a degradation: same file can be processed correctly with FFmpeg 4.0, but also with VLC.
How to reproduce:

% ffmpeg.EXE -f lavfi -report -i "movie=CC720p60_10sec.mp4[out+subcc]" -map 0:1 output_10sec.srt
ffmpeg version N-118422-g1fbe9deee3-20250204
built on 2025-02-04 17:56

Relevant error is:

[Closed Captions Decoder @ 000002f8b063dec0] Data ignored due to columns exceeding screen width.

I will (try to) attach original file, and reports and output by latest master and by 4.0

Attachments (4)

master_ffmpeg-20250205-095901.log (43.0 KB ) - added by ValeryKot 5 days ago.
FFmpeg report, latest master
master_output_10sec.srt (103 bytes ) - added by ValeryKot 5 days ago.
output SRT file, latest master
4.0_ffmpeg-20250205-100028.log (123.0 KB ) - added by ValeryKot 5 days ago.
FFmpeg report, version 4.0
4.0_output_10sec.srt (241 bytes ) - added by ValeryKot 5 days ago.
output SRT file, version 4.0

Download all attachments as: .zip

Change History (9)

by ValeryKot, 5 days ago

FFmpeg report, latest master

by ValeryKot, 5 days ago

Attachment: master_output_10sec.srt added

output SRT file, latest master

by ValeryKot, 5 days ago

FFmpeg report, version 4.0

by ValeryKot, 5 days ago

Attachment: 4.0_output_10sec.srt added

output SRT file, version 4.0

comment:1 by ValeryKot, 5 days ago

I uploaded cropped (CC720p60_10sec.mp4) and longer (CC720p60.mp4) video files which trigger the issue to https://streams.videolan.org/upload/

Last edited 5 days ago by ValeryKot (previous) (diff)

comment:2 by ValeryKot, 5 days ago

Description: modified (diff)

comment:3 by Marth64, 5 days ago

Your sample has actual text on field 1 (odd) instead of field 2. But field 2 is transmitting bits before field 1, the CC decoder is choosing it as the default field to decode. This command works for your sample:

ffmpeg -data_field first -f lavfi -i "movie=CC720p60_10sec.mp4[out+subcc]" -map 0:1 output_10sec.srt

This is similar to #11263

comment:4 by ValeryKot, 4 days ago

With explicit -data_field first it works indeed, thanks! So it is not a degradation, but change in functionality and default behaviour. Before 4.4, CC decoder was always processing first data field. Since 4.4 it has an option to select first or second, but default is "auto", which in 50% might get wrong and non-deterministic. In my view, "first" would be a better default. But of course it is now too late to discuss.

Thanks for the explanation, ticket can be closed.

comment:5 by MasterQuestionable, 4 days ago

Cc: MasterQuestionable added
Component: undeterminedavcodec
Keywords: ccaption_dec added
Resolution: duplicate
Status: newclosed

͏    Exact duplicate?
͏    https://trac.ffmpeg.org/ticket/11263#comment:12

Note: See TracTickets for help on using tickets.