#11470: get_eia608_packet misparses well formed files and corrupts Close Captions since 2020 -------------------------------------+------------------------------------- Reporter: Pavel | Type: defect Koshevoy | Status: new | Priority: critical Component: avformat | Version: git- Keywords: lavf mov | master captions | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Summary of the bug: How to reproduce: {{{ $ ./ffmpeg -i 'Test for Quicktime 608 CC file.mov' -map 0 -c copy -y /tmp/remuxed.mov ffmpeg version N-118471-ga50d36b5fd Copyright (c) 2000-2025 the FFmpeg developers built with gcc 7 (SUSE Linux) configuration: --prefix=/Developer/x86_64 --prefix=/Developer/x86_64 --enable-runtime-cpudetect --enable-libzimg --enable-libx264 --enable- libass --enable-libmodplug --enable-libxml2 --enable-libvmaf --enable- shared --enable-pthreads --enable-gpl --enable-version3 --enable-gnutls --enable-libfreetype --enable-pic --disable-static --enable-shared --enable-rpath --enable-ffnvcodec --enable-debug --disable-stripping --disable-optimizations --disable-mmx libavutil 59. 56.100 / 59. 56.100 libavcodec 61. 33.102 / 61. 33.102 libavformat 61. 9.107 / 61. 9.107 libavdevice 61. 4.100 / 61. 4.100 libavfilter 10. 9.100 / 10. 9.100 libswscale 8. 13.100 / 8. 13.100 libswresample 5. 4.100 / 5. 4.100 libpostproc 58. 4.100 / 58. 4.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Test for Quicktime 608 CC file.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2010-11-04T17:28:46.000000Z Duration: 00:00:28.40, start: 0.000000, bitrate: 1603 kb/s Stream #0:0[0x1](eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 640x360, 1485 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn (default) Metadata: creation_time : 2010-11-04T17:28:46.000000Z handler_name : Apple Video Media Handler vendor_id : [0][0][0][0] Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 109 kb/s (default) Metadata: creation_time : 2010-11-04T17:28:46.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] Stream #0:2[0x3](eng): Subtitle: eia_608 (cc_dec) (c608 / 0x38303663), 640x360, 4 kb/s (default) Metadata: creation_time : 2010-11-04T17:28:46.000000Z handler_name : Apple Closed Caption Media Handler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Stream #0:2 -> #0:2 (copy) Output #0, mov, to '/tmp/remuxed.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt encoder : Lavf61.9.107 Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709, progressive), 640x360, q=2-31, 1485 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn (default) Metadata: creation_time : 2010-11-04T17:28:46.000000Z handler_name : Apple Video Media Handler vendor_id : [0][0][0][0] Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 109 kb/s (default) Metadata: creation_time : 2010-11-04T17:28:46.000000Z handler_name : Apple Sound Media Handler vendor_id : [0][0][0][0] Stream #0:2(eng): Subtitle: eia_608 (c608 / 0x38303663), 640x360, 4 kb/s (default) Metadata: creation_time : 2010-11-04T17:28:46.000000Z handler_name : Apple Closed Caption Media Handler Press [q] to stop, [?] for help [out#0/mov @ 0x17fb8420] video:5147KiB audio:379KiB subtitle:15KiB other streams:0KiB global headers:0KiB muxing overhead: 0.546079% frame= 851 fps=0.0 q=-1.0 Lsize= 5571KiB time=00:00:27.66 bitrate=1649.8kbits/s speed= 920x }}}
The problem was introduced in commit f91906973c62459f31beb5683a8e2105758af0bb in June 2020 The problem is reproducible with 'Test for Quicktime 608 CC file.mov' from https://samples.ffmpeg.org/MPEG2/subcc/ A fix was provided in June 2023: https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2023-June/310456.html Two alternative fixes were provided in February 2025: https://ffmpeg.org//pipermail/ffmpeg-devel/2025-February/339780.html https://ffmpeg.org//pipermail/ffmpeg-devel/2025-February/339790.html Attached are screenshots demonstrating the problem with the closed captions corruption caused in get_eia608_packet, and what the captions are supposed to look like when get_eia608_packet is fixed. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11470> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
_______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org https://ffmpeg.org/mailman/listinfo/ffmpeg-trac To unsubscribe, visit link above, or email ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".