Elgindy-VTT-to-SRT-Subtitle-Converter
Elgindy-VTT-to-SRT-Subtitle-Converter copied to clipboard
Timestamp not converted correctly
It appears that in a segmented VTT the timestamp is indicated by the MPEGTS value, which is offset by 1 second (90000). The correct start time (in seconds) could therefore be calculated by dividing the MPEG-TS by 90000, less one. Elgindy-VTT-to-SRT-Subtitle-Converter seems to use the local time, which in a segmented WebVTT is always zero.
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:900000,LOCAL:00:00:00.000
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:13204800,LOCAL:00:00:00.000
1
00:00:00.000 --> 00:00:03.440
<i>First Sentence.</i>
WEBVTT
X-TIMESTAMP-MAP=MPEGTS:13514400,LOCAL:00:00:00.000
2
00:00:01.480 --> 00:00:03.560
<i>Second Sentence.</i>
Elgindy VTT uses the same time in the vtt file then convert it and save it in srt file. But MPEGTS time needs specific converting.