tkarabela / pysubs2

A Python library for editing subtitle files
http://pysubs2.readthedocs.io
MIT License
309 stars 40 forks source link

is there a way to fix words that are displayed at the same time (ass>srt) #101

Open nwgat opened 5 days ago

nwgat commented 5 days ago

am having a issue with ass > srt conversion, some of the text does not show as they seem to be at the same time, is there a way to detect words that are timestamped the same time and just shift them forward and back a little during pysubs2 conversion?

using the pysubs cli

nice work on this project btw :)

tkarabela commented 3 days ago

Hi @nwgat, can you provide an example file where this happens? I'm not exactly sure what you mean.

There is currently nothing to handle such things at the CLI level, but it should be reasonably simple to script. If it's something generally useful I'm happy to add it to the CLI for everybody.

nwgat commented 3 days ago

ASS

Dialogue: 0,0:13:57.02,0:13:59.69,Default,NTP,0,0,0,,You guys, what are you doing—
Dialogue: 0,0:13:59.69,0:14:12.45,Default,OS,0,0,0,,{\an9}THE\NFIVE-COLORED\NCLOUDS
Dialogue: 0,0:14:00.11,0:14:02.02,Default,NTP,0,0,0,,Please stay in bed for now.

SRT from pysubs2

250
00:13:57,020 --> 00:13:59,690
You guys, what are you doing—

251
00:13:59,690 --> 00:14:12,450
THE
FIVE-COLORED
CLOUDS

252
00:14:00,110 --> 00:14:02,020
Please stay in bed for now.

the OS one is the issue, when i play this sub on jellyfin androidtv player the only the OS line is shown not any of the rest of the NTP lines during the duration of the OS line

the solutions are probably to

nwgat commented 3 days ago

i think ive figured it out, make the OS lines stop when next NTP line start, that way everything shows on screen, there should also be a way to make the OS line before NTP line show a little earlier and still not clash with the NTP line, but thats not that critical