Elgindy-VTT-to-SRT-Subtitle-Converter icon indicating copy to clipboard operation
Elgindy-VTT-to-SRT-Subtitle-Converter copied to clipboard

Timestamp not converted correctly

Open LiohMoeller opened this issue 3 years ago • 1 comments

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>

LiohMoeller avatar Dec 12 '20 21:12 LiohMoeller

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.

zezo010 avatar Jan 25 '22 08:01 zezo010