mediathekview / MediathekView

Das Programm MediathekView durchsucht die Online-Mediatheken verschiedener Sender
https://mediathekview.de
GNU General Public License v3.0
855 stars 95 forks source link

Subtitle conversion to srt drops leading zero for milliseconds #612

Closed taugimo closed 3 years ago

taugimo commented 3 years ago

I investigated some subtitle rendering issues on Jellyfin for movies downloaded on MediathekView and I came across an inconsistency in ttml and srt files.

If the ttml file contains for example:

<tt:p xml:id="sub42" style="textCenter" region="bottom" begin="00:03:00.080" end="00:03:04.400">
<tt:span style="textYellow">Wenn du meinst.</tt:span>
</tt:p>

the corresponding srt entry becomes:

43
00:03:00,80 --> 00:03:04,400
<font color="#FFFF00">Wenn du meinst.</font>

Please note difference in the timestamp here.

This leads to rendering issues in some applications as srt files should have three digits for milliseconds I think the issue is caused by this format specifier: https://github.com/mediathekview/MediathekView/blob/a250ca7a2b15d533b3a0e858783d28c4f9917bf5/src/main/java/mediathek/tool/TimedTextMarkupLanguageParser.java#L47

derreisende77 commented 3 years ago

you are right, I somehow misread the srt spec in this case. Will be fixed in 13.8.