Audio delay

Interesting.

Meanwhile, I found some differencies between 8.99.2 and 9.0.1 regarding audio delay (I know, its a bit offtopic, but maybe it is also relevant to the same root cause).

Before, without AVR, audio delay 0 usually works, and was same for h264 files from network disc and internet streams (prima TV via plugin for example) for basic setup C2->TV with 2m HDMI cable. Actually, I vaguely remember, than even before in some nightly I setup -75, but I am 90% sure that with 8.99.2 it was 0.

With 9.0.1, for the files I need to setup -125 delay. Which would be fine, I get used to do initial audio delay setup when installing environment (it depends on length of cables, type of TV and AVR in the way). But now, setuped audio delay works for 264 files, it doesnt work for (some?) internet streams. For prima for example, I must revert delay back to 0. And this is very bad for user experience, cant do this to my old parents, they didnt understand OSD audio delay things…

I didnt remember that difference in previous versions, the same delay usually works for all videos. Cant test DVB-T2 TV unfortunatelly, due not sufficient shared home antenna channel parts (still :rage:).

I could just guess it could be because lateframe fixes, which goes up and back, but it could be maybe also with something between Kodi 18 and Kodi 18.1 version. I didnt know that yet, but I planning test different lateframe patches back in time agains latest CE…

But I think your finding is also interesting and worth look into…

@JimmyS, you could add this part in advancedsettings.xml, restart kodi and check again

<advancedsettings>
  <video>
    <latency>
	 <refresh>
      <rate>50</rate>
      <delay>-60</delay>
     </refresh>
	 <refresh>
      <rate>59.940</rate>
      <delay>-50</delay>
     </refresh>
	 <refresh>
      <min>23</min>
      <max>24</max>
      <delay>-125</delay>
     </refresh>
	</latency>
  </video>
</advancedsettings>

Thank you, I already tried this. But the strange is, that it seems that this (new) behauviour isnt much dependent on refresh rate: delay in xml works fine, just as I would setup audio delay in OSD.

But shows, which are recorded and encoded to h264 displays 25 (Europe) or 30 (America) in process info, and are displayed as 50 / 60 fps on TV (this is not dependent on whitelist, Kodi just double it by itself - the same thing does with internet streams, mentioned Prima is 25 -> 50 as well). And for those files seems to have the same delay (lets say -125) as 23.976 h264.

So, with current status I can setup different delay for the refresh, but still I can choose spot on lipsync for files or internet streams, not for both.

P.S.: Take Internet streams lightly, I can confirm this for Prima, DVTV.cz, I cant do proper test for all other stream services, as I have full head already with testing different fps, different files, and different codecs…

P.P.S.: TV which I use to test can handle 24/25/30/50/60, other TV which I testing also (with AVR) should know 23.97/24/25/30/50/60, on both I experience same behauvior, only base delay is different because different HW setup.

I tried this settings on my Odroid N2, but still got audio delay after pausing.

Can you try: “keep audio device alive” “always” setting and “Send low volume noise”. You also need to remove any auto skip back addons on resume. They skip back wrongly and a keyframe needs to be found.

Just tried it, delay remains. I had the add-on to skip back disabled, but just to be sure I also uninstalled it.

Sometimes the delay is added by an AVR or Soundbar. In this case you can set a default delay for all videos.

There is no AVR or sound bar in my setup, everything straight to TV.