Opened 8 hours ago

Closed 6 hours ago

#11459 closed defect (invalid)

Corruption of 608 captions data on transcode

Reported by: Zach Owned by:
Priority: critical Component: undetermined
Version: git-master Keywords: CLosed-caption
Cc: Zach Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg.exe -y -i AIM-2301.mp4 -pix_fmt yuv420p -c:v libx264 -flags +ilme+ildct -x264opts tff=1 -vf fps=29.97,scale=1920x1080 -b:v 25000k -codec:a aac -ar 48000 -threads 0 AIM-2301_x264_24tohd.mp4

ffmpeg-2025-02-06-git-6da82b4485-full_build
built on 2025-02-06

This transcode command produces a file with corrupted captions text. The source file is a 23.976fps progressive and target format is 1080i5994. I also see problems with other conversions such as progressive to interlaced at the same frame rate or 30 to 29.97 conversions but the errors are less pronounced and occur less often. Passing captions is a legal requirement for many that use ffmpeg.

https://drive.google.com/file/d/1U3DYkvmIbFECjdihFbDIcnRVgQxs1tbM/view?usp=drive_link

Change History (4)

comment:1 by Devin Heitmueller, 7 hours ago

My guess is that the cc_fifo code isn't being instantiated because "fps=29.97" isn't actually a broadcast-valid framerate. It's an approximation. To get what you really think is 29.97 FPS in ffmpeg you have to use the expression "30000/1001" rather than "29.97".

[Parsed_fps_0 @ 0x5f69540] cc_fifo cannot transcode captions fps=2997/100

comment:2 by Devin Heitmueller, 7 hours ago

Confirmed, using the following command line yields much better results, as the cc_fifo actually repacks the 608/708 tuples to the appropriate target framerate:

./ffmpeg -i ../../AIM-2301.mp4 -vframes 600 -pix_fmt yuv420p -c:v libx264 -flags +ilme+ildct -x264opts tff=1 -vf fps=30000/1001,scale=1920x1080 -b:v 25000k -codec:a aac -ar 48000 -threads 0 AIM-2301_x264_24tohd_3000.mp4

(the only material difference in the above command-line from the one in the original ticket is the filename and using "fps=30000/1001" rather than "fps=29.97")

comment:3 by Zach, 7 hours ago

Nice!, I'll give that a try

comment:4 by Zach, 6 hours ago

Resolution: invalid
Status: newclosed

Yes, that appears to work!! It appears the type of defect was: user...

Note: See TracTickets for help on using tickets.