"Next subtitle" has 10 second latency before subtitles are shown
#1
When I use the "Next subtitle" command (keyboard shortcut L) or select a different subtitle in the dialog, the current subtitles, if any, are cleared immediately from the screen, but the new ones take around 10 seconds before they appear. Is this considered normal behavior? Note that if I skip back after switching subs, they show up immediately. Is there an unobtrusive way to get them to show up?

(Using Windows Kodi 19.3 and haven't tested other platforms/builds. These are S_TEXT/UTF8 text subs in .mkv files FWIW.)
Reply
#2
(2021-12-06, 01:22)crawfish Wrote: 10 seconds before they appear. Is this considered normal behavior?
flushing the existing subs, then reloading from source a new one is going to take whatever your system has for disk access, cpu cycles and gfx power not to mention syncing with ongoing media and available memory; so yes this would be typical, if you want to cut the timing down, work on each aspect until you have achieved the performance of your expectations. Skipping back, may have more to do with a pre-loaded cache than a fresh fetch. If the external sub is name the same as the movie, it will be loaded with the media.
(2021-12-06, 01:22)crawfish Wrote: Is there an unobtrusive way to get them to show up?
Keyboard letter 'T' ? https://forum.kodi.tv/showthread.php?tid=82605
Reply
#3
T doesn't help. Oh well, if the end-user functions are doing this, there's probably nothing I can do to improve on it in JSON, which is what I'm really interested in. I posted about it last night:

https://forum.kodi.tv/showthread.php?tid=365836

Finding that seeks work, including as small as Seek(-1), I tried Seek(0), but no dice.
Reply
#4
To ensure proper sync of the subtitles to the video they will appear at the next key frame after you enable them, which may take a few seconds to occur.
Reply
#5
(2021-12-06, 02:29)jjd-uk Wrote: To ensure proper sync of the subtitles to the video they will appear at the next key frame after you enable them, which may take a few seconds to occur.
What's the difference between toggling and switching? It's only switching that incurs the delay, and toggling after switching doesn't help during that long latency period. However, once the latency period is over, toggling happens pretty much immediately, which suggests that key frames can't be responsible for the long delay. Also, subtitles appear right away when I've started playback from a resume point. If loading subtitles was a big deal, I'd expect there to be latency right after playback is started de novo, and there's isn't.

I've traced some in the source code, but I haven't yet found the parts that actually perform the subs overlay. Again, after I switch subtitles, the existing ones are turned off immediately, but it's like the new ones are relegated to some background thread that takes a pretty consistent 10 seconds to sit up and notice.
Reply

Logout Mark Read Team Forum Stats Members Help
"Next subtitle" has 10 second latency before subtitles are shown0