pysubs2
pysubs2 copied to clipboard
Timestamp rounding error results in incorrect timestamp and overlapping lines
When converting from SRT to ASS, the timestamp is sometimes converted incorrectly and can result in overlapping disaply times. Below are an SRT source file as well as the output from pysubs2 and SubtitleEdit which handled the scenario correctly.
In this case, pysubs2 converted 00:36:48,998 to 0:36:48.100 instead of 0:36:49.00
Original SRT
616
00:36:45,411 --> 00:36:48,915
Line1
617
00:36:48,998 --> 00:36:51,292
Line2
pysubs2
Dialogue: 0,0:36:45.41,0:36:48.92,Default,,0,0,0,,Line1
Dialogue: 0,0:36:48.100,0:36:51.29,Default,,0,0,0,,Line2
SubtitleEdit
Dialogue: 0,0:36:45.41,0:36:48.92,Default,,0,0,0,,Line1
Dialogue: 0,0:36:49.00,0:36:51.29,Default,,0,0,0,,Line2
I just tested and this is resolved with PR #77. It would be great if that could be merged for the next version.
Fixed in version 1.7.0.