#7912 closed defect (fixed)
timing is all wrong when extracting Closed Captions
| Reported by: | jookiyaya | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | undetermined |
| Version: | git-master | Keywords: | cc |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
ffmpeg -fix_sub_duration -f lavfi -i "movie=test.mkv[out+subcc]" -map 0:1 test.srt
also tried
ffmpeg -fix_sub_duration -real_time 1 -f lavfi -i "movie=test.mkv[out+subcc]" -map 0:1 test.srt
video sample: https://x0.at/SrG.mkv
result of test.srt https://x0.at/pUA.srt
version 4.1.3
Change History (8)
comment:1 by , 7 years ago
| Keywords: | cc added |
|---|---|
| Reproduced by developer: | set |
| Status: | new → open |
| Version: | unspecified → git-master |
comment:2 by , 6 years ago
| Summary: | timing is all wrong when extract srt subtitle from video → timing is all wrong when extracting Closed Captions |
|---|
comment:3 by , 6 years ago
| Summary: | timing is all wrong when extracting Closed Captions → timing is off by factor of 90 or 3 when extracting srt subtitle from video |
|---|
comment:4 by , 6 years ago
ffmpeg -fix_sub_duration -f lavfi -i "movie=3hu.mp4[out+subcc]" -map 0:1 3hu.srt
3hu.srt : timing is off by factor of 3
comment:5 by , 6 years ago
| Summary: | timing is off by factor of 90 or 3 when extracting srt subtitle from video → timing is all wrong when extracting Closed Captions |
|---|
comment:6 by , 5 years ago
First of all sample is here now: https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket7912/
Second, mediainfo does not see CC in mkv.
Third, I do not understand what is the actual problem here. And VLC is no help, it looks good, but sees some kind of second stream there of cc?
4th, where is 3hu.mp4?
comment:8 by , 4 years ago
| Resolution: | → fixed |
|---|---|
| Status: | open → closed |
Fixed in a27853a7300bb3c2752256b2fc02f2439619f6f8. It was happening because SrG.mkv has "1k tbn (default)".



For future tickets: Please always test current FFmpeg git head, nothing else is supported, and provide the command line you tested together with the complete, uncut console output.
$ ffmpeg -f lavfi -i movie=SrG.mkv[out+subcc] out.srt ffmpeg version N-93886-gfbdb3aa179 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8 (SUSE Linux) configuration: --enable-gpl --enable-gnutls --enable-libxml2 --enable-libx264 --enable-libx265 --enable-libvpx --enable-libaom --enable-libdav1d --enable-libmfx libavutil 56. 28.100 / 56. 28.100 libavcodec 58. 52.101 / 58. 52.101 libavformat 58. 27.103 / 58. 27.103 libavdevice 58. 7.100 / 58. 7.100 libavfilter 7. 53.101 / 7. 53.101 libswscale 5. 4.101 / 5. 4.101 libswresample 3. 4.100 / 3. 4.100 libpostproc 55. 4.100 / 55. 4.100 Input #0, lavfi, from 'movie=SrG.mkv[out+subcc]': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc Stream #0:1: Subtitle: eia_608 Output #0, srt, to 'out.srt': Metadata: encoder : Lavf58.27.103 Stream #0:0: Subtitle: subrip (srt) Metadata: encoder : Lavc58.52.101 srt Stream mapping: Stream #0:1 -> #0:0 (eia_608 (cc_dec) -> subrip (srt)) Press [q] to stop, [?] for help size= 15kB time=00:00:03.27 bitrate= 38.2kbits/s speed=0.114x video:0kB audio:0kB subtitle:10kB other streams:0kB global headers:0kB muxing overhead: 48.054531%