Opened 5 years ago
Last modified 4 years ago
#8825 new defect
Corrupt timestamps on WebVTT subtitles
Reported by: | paralucent | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
When processing WebVTT subtitles FFMPEG skips the X-TIMESTAMP-MAP data resulting in a temporally corrupt subtitle output file in which every caption starts at 0:00:00.000.
How to reproduce:
ffmpeg -i "https://sdn-global-streaming-cache-3qsdn.akamaized.net/stream/9378/files/18/12/1068412/9378-HWQKVTXrYyxwncZq.ism/9378-HWQKVTXrYyxwncZq-textstream_eng=1000.m3u8?mime=mp4&source=html5" subs.srt
Attachments (6)
Change History (9)
by , 5 years ago
Attachment: | ffmpeg-20200728-102425.log added |
---|
by , 5 years ago
Attachment: | subs_sample.srt added |
---|
comment:1 by , 5 years ago
comment:2 by , 4 years ago
I am also affected by this issue. German TV station ZDF for example serves their livestream with WebVTT subtitles served via HLS.
I found that there is a patch for X-TIMESTAMP-MAP support on patchwork.ffmpeg.org.
The E-Mail address used to submit this original patch appears not to exist anymore. I tried to contact it but the particular mail server answered with an error 550 and the message "mailbox unavailable".
It is rather old (from 2017-02-05) but i changed it a little bit so that it applies to the current master branch. I also made it so that it treats all timestamps relative to the first fragment. See the attached patches.
Using these patches i successfully converted an HLS livestream with webVTT subtitles into one video file.
by , 4 years ago
Attachment: | 0002-avformat-webvttdec-Change-prefer_hls_mpegts_pts-into.2.patch added |
---|
.
by , 4 years ago
Attachment: | 0001-avformat-webvttdec-Add-support-for-HLS-WebVTT-MPEG-t.patch added |
---|
The original patch by Franklin Phillips <franklinphillips@gmx.com> applied to the current master.
by , 4 years ago
Attachment: | 0002-avformat-webvttdec-Change-prefer_hls_mpegts_pts-into.patch added |
---|
.
by , 4 years ago
Attachment: | 0003-avformat-webvttdec-Calculate-hls_ts_offset-relative-.patch added |
---|
A change to treat X-TIMESTAMP-MAPs relative to the first fragment.
comment:3 by , 4 years ago
I just found an FFmpeg fork on GitHub which contains a version of the aforementioned patch by Franklin Phillips <franklinphillips@gmx.com> which was already committed on 2014-04-06. There are also some other related commits.
Please attach the input file, do not attach the output file to avoid confusion.