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

STL reader can generate 4 digits milliseconds time #432

Closed
nywhere opened this issue Oct 18, 2024 · 4 comments · Fixed by #433
Closed

STL reader can generate 4 digits milliseconds time #432

nywhere opened this issue Oct 18, 2024 · 4 comments · Fixed by #433
Assignees
Labels
bug Something isn't working

Comments

@nywhere
Copy link

nywhere commented Oct 18, 2024

STL to VTT:

396
01:31:09.631 --> 01:31:11.1000
brauchen nur
etwas länger als erwartet.

STL to TTML:

<p region="r0" begin="01:31:09.631" end="01:31:11.1000" tts:fontSize="160%" tts:lineHeight="125%" tts:textAlign="center">
  <span tts:color="#ffffff">brauchen nur</span>
  <br />
  <span tts:color="#ffffff">etwas länger als erwartet.</span>
</p>

issue.stl.zip

@palemieux palemieux added the bug Something isn't working label Oct 18, 2024
@palemieux palemieux assigned palemieux and andreastai and unassigned palemieux Oct 18, 2024
@nywhere
Copy link
Author

nywhere commented Oct 18, 2024

It actually comes from ClockTime:

>>> from ttconv.time_code import ClockTime
>>> from fractions import Fraction
>>> f = Fraction(41039999,7500)
>>> c = ClockTime.from_seconds(f)
>>> c.get_milliseconds()
1000

@palemieux
Copy link
Contributor

Ouch the issue is from:

@palemieux
Copy link
Contributor

@nywhere See #433

@nywhere
Copy link
Author

nywhere commented Oct 31, 2024

@palemieux Yes, that fixes the issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants