smacke / ffsubsync

Automagically synchronize subtitles with video.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Only output fixed subtitles if offset/scale greater than threshold.

aaronrudkin opened this issue · comments

My experience with ffsubsync is that it works great when the input file is, in fact, incorrect; if I take a subtitle that's offset by 30 seconds and run ffsubsync, it'll get fixed. Which is great. When subtitles are correct (e.g. obtained directly from source media) ffsubsync tends to produce tiny incremental changes ("offset seconds: -0.002" or the like) that don't really materially impact the watching experience.

My goal is to take a large folder with thousands of files and ffsubsync all of them. Because of the potential for error, I plan to check all of the new subtitle files manually, comparing them against the old one. This is time consuming, and so I'd only like to do it for those files that are really impacted, say >0.5 seconds or non-1 framerate scale factor.

I think this would best be achieved by adding an argument that passes minimal offset / minimum framerate scale factor necessary to write a new output file. This seems like a relatively small adjustment; carry the arguments forward, compare against them in the file output stage, default them to 0/1 so that if not provided all outputs are generated.

What do you think?

(Side note: the only issue templates were bug report / sync issue; and only repo maintainers can remove labels, so apologies for the incorrect bug label on this)

This seems like it's definitely worth supporting and won't take too much effort, will try to get a fix out soon.

Latest version now has a --suppress-output-if-offset-less-than command line argument -- haven't tested it, so I'll close this issue in a few days or when I hear it's confirmed working as expected, whichever comes first :)

You can get the latest with pip install --upgrade ffsubsync

Tested this and it seems to be working as expected, please let me know if you encounter anything unexpected after upgrading. Thanks for opening an issue, it helps to improve ffsubsync!