Altho’ I am completely w/o Python experience, it has been on the ToDo List for quite a while - and I’m a former ‘Gun Programmer’ in C and Assmblr so I decided to have a crack at a python App that’d take as input a ‘Delta’ (=‘Difference’ or Change in Value) - Millisecs adjustment constant±, read in an SRT file (downloaded from Opensubtitles or SubScene for ‘House’ e.g. House M.D. - 4x13 - No More Mr. Nice Guy.HDTV.XOR.en.SRT) and adjust each subtitle time In and Out by that Constant, writing out a changed file which could then be uploaded using Plex Web Client’s ‘Upload’ option, effectively fixing the sync. (Obviously this would only help with SRT files that were ALWAYS too Early or Too Late by a fixed amount - which seems to be most of them…).
I struggled with the IDE, API and language & got MOST of the way thru inputting a file name (Browse) and ±Millisecond Sync value, identifying and converting each SRT record’s time start and time stop FROM Hrs:Mins:Secs:millisecs to millisecond values, adding the sync value and reconverting to Hrs:Mins:Secs:millisecs and writing out the record…
I showed a Pythonesque mate I’ll call ‘Monty’ (for obvious reasons)
and he responded by showing me a cpl of web pages - on ‘SubShifter’ and ‘SRT’. Their intros Read as follows (respectively:):
“These tools shift all the time stamps of a movie subtitle file. They can be used for synchronizing the subtitles to a movie when there is a slight offset between the two (this can be the case when the subtitles and the movie come from two different sources), or when there is a time scale difference (for instance if the movie and the subtitle file have different frame rates).
SubShifter currently supports the SRT file format…”
AND
" srt is a tiny but featureful Python library for parsing, modifying, and composing [SRT files]. … Quickstart for a basic overview of the library. Detailed API documentation is also available.".
IOW, these Python apps did precisely what I needed - and a whole lot more (There were also a big bunch of others - Obviously you and I are not the first people to have encountered the problem).
My efforts were very nearly a complete waste of time - only ‘nearly’ because I learned some things I needed to know: It WAS a useful exercise for me but was not exactly Productive Programming…
Fo0r the curious, HERE are the links:-
https://subshifter.bitsnbites.eu/
AND
https://pypi.org/project/srt/.
I’m off to see what I have to do to build a standalone App from these.
\Best wishes to all.