smacke/ffsubsync

subsync silently fails to process lines with 4 digit miliseconds

nick-s-b opened this issue · 3 comments

Hi Stephen,
I was syncing a foreign movie with English subs and I noticed that the resulting srt file was a lot smaller than the original file (subsync usually produces smaller files but this one was 85kb smaller).
subsync showed no errors of any kind and just reported that it finished processing:

INFO:subsync.speech_transformers:...done.
INFO:subsync.aligners:computing alignments...
INFO:subsync.aligners:...done
INFO:subsync.subsync:offset seconds: 0.060

After looking at the resulting file, I noticed that it cut off everything after the line 78. I couldn't immediately tell what was wrong (srt file looked normal to my eyes) but after opening the srt with Aegisub and re-saving it, and comparing the differences, I noticed that Aegisub replaced the following:

79
00:08:54,009 --> 00:08:55,1000
blah

with:

79
00:08:54,009 --> 00:08:55,100
blah

Running the exported file through subsync produced a valid, synced, srt file. I've confirmed that changing the milliseocnds to 1000 or some other 4 digit number will cause the same bug with other files too.

Hi Nick,

Thanks so much for filing an issue. This seems pretty serious; looking into it now.

This seems to be an issue with one of subsync's dependencies. I filed an issue and PR with the maintainer; fingers crossed that it goes through. See cdown/srt#52 and cdown/srt#53.

I've made a quick-ish fix for this issue in 80de741 for the time being while we work on addressing the issue in the dependency more properly; if you reinstall via the following command:

pip install --upgrade git+https://github.com/smacke/subsync@stable

you should be good to go.

Again, thanks for filing this issue @nick-s-b!