Posts: 6,810
Joined: Jul 2010
Reputation:
198
Subtitles have timestamps and are supposed to be displayed with matching video timestamp. Why do you think this should be configurable? Do you observe sync issues. What platform do you use, what source of video?
Posts: 1,739
Joined: Aug 2011
Reputation:
23
I'm requesting this because with external subs (and only with using external subs) you often can have out of sync subtitles.
My experience is that in 9 out of 10 it can be solved by setting the offset to 1 sec or more. Mostly when i need to manual sync is that it goes out of sync during a commercial brake cut and this can be solved every time with a second. Having steps from 0.1 seconds is fine if it's only minimal out of sync but that's hardly the case, the need to use 0.1 steps is practically never used in all the situations in ran in to..
I'm running LibreELEC on RPi2's and AMD system, also using Windows and media is mostly 720p mkv's
Posts: 6
Joined: Dec 2016
Reputation:
0
On about 50% of the movies, there is not just a fixed time offset, there is also a difference in speed: subtitled limb behind or just gallup away.
Assuming this has to do with the speed of the movie, I posted the following suggestion. Up to the Kodi wizards to judge about this. It isn't that complicated and to my humble opinion an easy way for users to calibrate subtitle rates.
Consider changing the "subtitles offset" tool after the "sound" button.
It lets you slide forward or backward for max 1 minute to set an offset. This is OK for subtitles at the same speed of the movie.
To grasp it mathematically, this means:
t = timestamp of the subtitle in e.g. the .SRT file
o = offset of the subtitle
t' = t+o or the time the subtitle is actually shown
Actually, if the movie is played at a different rate, there is something like a speed factor. Let's call it "s".
s = speed factor
so a new expression for t' is now:
t' = s*t + o
At a constant speed difference, the subtitles should remain in sync.
However, getting a grip on that speed factor could be tedious, but it is a quite simple problem to solve mathematically, and with the help of an enhanced "subtitle offset" tool. How?
Simply let's calibrate on two places in the movie:
- calibrate for an offset one time and store
- cue the movie for some 15 minutes, calibrate another offset and store
Now it's up to the tool to do some calculations
We have:
t'1 = t1 + o1
t'2 = t2 + o2
offset evolves linearly with play time:
(o - o1) = (t - t1) / (t2 - t1)
o = o1 + (o2 - o1) * (t - t1) / (t2 - t1)
t' = t + o1 + (o2 - o1) * (t - t1) / (t2 - t1)
= (1 + (o2 - o1) / (t2 - t1) )* t +o1 - (o2 - o1) / (t2 - t1) * t1
so the constants "s" and "o" in our equation "t' = s*t + o" are:
s = 1 + (o2 - o1) / (t2 - t1)
o = o1 - (o2 - o1) / (t2 - t1) * t1
Quite a simple solution for a very annoying problem, I thought.