Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp not converted correctly #8

Open
LiohMoeller opened this issue Dec 12, 2020 · 1 comment
Open

Timestamp not converted correctly #8

LiohMoeller opened this issue Dec 12, 2020 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@LiohMoeller
Copy link

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>
@zezo010
Copy link
Owner

zezo010 commented Jan 25, 2022

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 zezo010 added the help wanted Extra attention is needed label Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants