Tempo Changes result in seeking ahead
#1
Hi,

I'm currently working on a small Kodi python3 script add-on and encountered a problem when using the Tempo APIs (both tempoup/down and tempo(v)).
Here is what's happening:
  • I'm playing a File through xbmc.Player().play
  • I'm checking each second the current position and sync it with an external service
  • If I am too fast (ahead of the service) I slow down, if I'm behind I speed up.
  • Speed changes are done fine and I can see the current speed in the kodi gui and it is doing what it should
  • Once I switch back to Speed 1.0 I sometimes (I know...) notice a seek ahead happening which is destroying the whole purpose of me slowing down...
There seems to be an actual seek happening as the "Player.DisplayAfterSeek" is also set to True after this happens.

Does anyone have an idea what's going on or what I'm doing wrong?

Thanks!

Below are some lines of me printing out the current timestamp, current position in the file (xbmc.Player().getTime), any speed changes and the mentioned seek flag:


curTime 1614588727.2482271 curPos 629.4830322265625 has Seeked False
changing speed to 0.95
curTime 1614588728.2645051 curPos 630.302001953125 has Seeked False
curTime 1614588729.231189 curPos 631.1470336914062 has Seeked False
[...]
curTime 1614588744.248039 curPos 645.4110107421875 has Seeked False
changing speed to 1
curTime 1614588745.264204 curPos 646.3780517578125 has Seeked False
curTime 1614588746.231403 curPos 650.3030395507812 has Seeked True
curTime 1614588747.2318459 curPos 651.321044921875 has Seeked True
curTime 1614588748.23129 curPos 652.3550415039062 has Seeked False
curTime 1614588749.2645068 curPos 653.373046875 has Seeked False

I'm on Kodi 19.0.0 and have the same issue on MacOS and on my AppleTV (tvOS)
Reply
#2
I just noticed that this also happens outside of any add-on... so just playing something and changing the speed manually to 0.9x and after a few seconds back to 1.0x will result in the same jumpy behavior.
Again this happens on both of my systems and also for a variety of different files wrt codecs/container formats.

Should I then move this into the general section of the forum?
Reply

Logout Mark Read Team Forum Stats Members Help
Tempo Changes result in seeking ahead0