The following python tool can be used to let it analyse the audio and subtitle and synchronise the subs to generate a new synced file. It works for offsets at the beginning, not for sync issues later in the file.
https://github.com/smacke/ffsubsync
Install on Linux Mint 22+:
pipx install git+https://github.com/smacke/ffsubsync@latest
Usage:
ffs video_file.mkv -i orig_sub.srt -o new_synced_sub.srt
Untested alternative without limitations:
https://github.com/kaegi/alass
Other alternative:
https://snapcraft.io/subsync
https://sc0ty.pl/
https://subsync.online/
https://github.com/sc0ty/subsync?tab=readme-ov-file
JSON-RPC
Method: Input.ExecuteAction
Parameter: {“action”:“subtitledelayminus”}
or
Parameter: {“action”:“subtitledelayplus”}