Opened 12 months ago
Last modified 8 months ago
#9724 open defect
Duplicate character pairs in Closed Captions
Reported by: | Selcuk Ozturk | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avcodec |
Version: | git-master | Keywords: | mpeg2video cc regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
Bug in the handling of eia-608 closed captions. Captions have duplicated character pairs. The bug did not exist in ffmpeg versions 4.3.2 and earlier.
How to reproduce:
You will need a HDHomerun Prime and a cable service with cable card like Verizon FIOS or Comcast.
% ffmpeg -i http://192.168.78.45:5004/auto/v103 -c:v libx264 -preset:v ultrafast -g 29 -crf 40 -s 128x72 -bsf:v h264_mp4toannexb -map 0:v -f mpegts -t 60 z-4.4.1.ts % ffmpeg -f lavfi -i movie=z-4.4.1.ts[out+subcc] z-4.4.1.srt
The resulting z-4.4.1.srt file has text like the following:
5
00:00:04,571 --> 00:00:10,410
<font face="Monospace">{\an7}ABABORORTITIONON T THAHATT I I
TETEXAXASS D DOEOESS H HAVAVEE E</font>
6
00:00:10,410 --> 00:00:11,845
<font face="Monospace">{\an7}TETEXAXASS D DOEOESS H HAVAVEE E
LALAWSWS T THAHATT A ARERE P PUT</font>
Using the old releases available on https://johnvansickle.com/ffmpeg/ site, I have narrowed down the introduction of the bug somewhere between ffmpeg versions 4.3.2 and 4.4.1. All versions up to and including 4.3.2 are working properly and producing correct closed captions. All versions from 4.4.1 on have this bug.
The problem is at the recording of the TS file and not at the extraction of SRT file. Playing the resulting TS file in VLC demonstrates the problem in closed captions.
I can provide both the recorded TS files and the SRT files if needed.
Attachments (4)
Change History (17)
comment:1 by , 12 months ago
comment:3 by , 12 months ago
Replying to Elon Musk:
Provide input file, output files are waste of space.
There is no input file. The input is a live stream from a HDHomerun as visible in the first command -i http://192.168.78.45:5004/auto/v103.
However, the .ts files are inputs to the second command.
follow-up: 5 comment:4 by , 12 months ago
I tried first ts file and 2nd command and srt output is ok. used latest git version of ffmpeg
comment:5 by , 12 months ago
Replying to Elon Musk:
I tried first ts file and 2nd command and srt output is ok. used latest git version of ffmpeg
v4.3.2.ts produces good SRT file. v4.4.1.ts creates the duplicate character pairs. If you play both .ts files in VLC with closed captions on, you see good captions with the 4.3.2 file and bad ones with 4.4.1.
follow-up: 7 comment:6 by , 12 months ago
You need to record said livestream. (You may try "-map 0 -c copy" and see whether the issue is reproducible with the output; or you can use "-f data -i http://192.168.78.45:5004/auto/v103 -map 0 -c copy -f data out.ts".)
(The issue in v-4.4.1.ts exists regardless of whether I use git master or release 4.3; similarly v-4.3.2.ts is fine regardless of whether I use git master or 4.3.)
comment:7 by , 12 months ago
Replying to mkver:
You need to record said livestream. (You may try "-map 0 -c copy" and see whether the issue is reproducible with the output; or you can use "-f data -i http://192.168.78.45:5004/auto/v103 -map 0 -c copy -f data out.ts".)
(The issue in v-4.4.1.ts exists regardless of whether I use git master or release 4.3; similarly v-4.3.2.ts is fine regardless of whether I use git master or 4.3.)
I have produced an out.ts file using "ffmpeg -f data -i http://192.168.78.45:5004/auto/v103 -map 0 -c copy -f data out.ts". The issue is reproducible using this out.ts file as input to the first command instead of the live stream. The out.ts file is 23MB. How and where do I upload it?
comment:11 by , 11 months ago
comment:12 by , 8 months ago
Component: | ffmpeg → avcodec |
---|---|
Keywords: | cc regression added; eia_608 closed captions removed |
Priority: | normal → important |
Reproduced by developer: | set |
Status: | new → open |
Version: | 4.4.1 → git-master |
Regression since 29ea4e1b3c511de0a406722bcfffa11604745451, related to ticket #6105
comment:13 by , 8 months ago
Keywords: | mpeg2video added |
---|
Please do.