Automatic fix for negative display times? #9681
DanielTheGreat
started this conversation in
Ideas
Replies: 1 comment
-
I'd love to see this too! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to repair some downloaded subtitles that contain overlapping display times. The overlapping text lines appear on-screen in separate lines, but reading them is confusing due to the reverse order that occurs with many couplets.
I first used SE's 'fix common errors' facility, selecting 'fix overlapping times'. That fixed a lot, but warned that thousands of errors would result. I pressed-on (ignored the error warnings) until there were fewer than 100 'uncorrectable' errors.
The result was dozens of negative display times amongst the mostly-correct (or good-enough) subtitles. SE appears not to have a way of 'automatically' correcting these. I know it's a tricky problem to solve, but I have a suggestion that would produce an acceptable outcome in many cases, and save me a hell-of-a-lot of time... Here's an example:
My suggested approach would look at the three lines that include the (-) time as the middle line. Retain the start-time for the first of the triplet and the end-time for the last of the triplet, then adjust the other four times to 'balance' the three display times roughly according to the length of each line's text.
This would work best when the three lines are 'related' (all part of one sentence, as in the example case). The program could determine that by observing that the start time for each line is close to the finish time of the preceding line. When the lines were not related (e.g. separate sentences with a significant silence between them), the algorithm might look at the start/end times and choose three 'related' lines where the (-) time one was perhaps the first or last rather than the middle line.
It might not always produce 'perfect' results, but hopefully mostly 'good enough'.
Beta Was this translation helpful? Give feedback.
All reactions