Lip-sync errors after latest update?

Here is how it might be:

As far as I can tell, there has always been an audio delay on the Vero 4k. At least there was on the dec/18 version. angry_sardine actually mentioned this here:

That was way before Kodi 18. And I can confirm, it was there, as I have now twice rerolled to the dec/18 Kodi 17.6 version. It might have been a bit less, which might just fit into the window of what you describe as not detectable and barely noticable.

So it might be that things just got that tiny bit inflated that makes people notice more… and as I said above, lipsync issues are a can of worms, once you open it, you really have a problem. I do not mean for the devs but for the users. Now people might have a closer look on the sync issue and might not be pleased what they find, I have to say that I am most not pleased atm. For the first time in two years I am actively looking for an alternative.

Why? Because with the measly 20€ box I once bought in China and libreelec Kodi 17.6 on it, I have no audio delay at all. Sure the box has its own problems and can‘t replace the Vero 4k but I wonder if something else can. Because having a 150ms audio delay randomly on video files isn‘t fun. If it were 100ms, it really might fall under non detectable… and that might have been in the past. But even if it that was true, the device would have danced a long time on the edge of non detectable to noticable.

And the issue would be a non issue if the audio delay would be global, but it just isn‘t. Sometimes it is there, sometimes not. And nothing is as annoying and frustrating to change settings for each file you play. Again, if the difference was 100ms max, it would also not matter but it matters with 150ms.

I hope the issue gets resolved because this is - at least for me - a real dealbreaker right now :frowning:

Thx Sam. The combination of audio delays of 150ms or more in combination with the fact, that this behavior appears randomly from file to file, makes it a big issue.

Also keep in mind: TV in 2019 have a much faster response time than in 2016. That means, if there is an audio delay, an older TV with rather mediocre response time (video lag) would have swallowed most of the audio lag, balancing things a bit in a most curious way. But now we have TVs with a video lag of 30ms or less, now we WILL notice audio lags more and more often, if they are there,

You’re comparing two different versions of Kodi with over two years of changes to video and audio processing; so it’s not a like for like comparison whatsoever.

I suspect the issue is at least worsened by the introduction of Kodi v18.

I’m normally sensitive to lip sync, and I haven’t noticed at all. Vero -> Yamaha RX-660 -> Hisense (I think 2018, maybe late 2017)

I got DirectTV when it had only been out for a few months. I called several times because of lip sync issues and they always denied it. Non of my friends could see it. I seemed to be the only one with the issue. I did notice after about a year that the issues mostly went away, but for years I would sometimes see it.

No I compare the Dec/18 version (Kodi 17.6) with a libreelec Box also on Kodi 17.6. Like I mentioned above the audio delay was already there before the osmc Leia release. See the thread I posted, that was Jan/19, three months before the release.

The audio delay just might have become a bit larger since Leia, that large that people are starting to notice, But whatever it is, it looks like something that already existed before Leia.

The one thing I hope you do is have a look at the 10 second clip I uploaded. If you examine the video professionally with a proper tool, you see it is in perfect sync, just as you expect.

Then record this video in your setup, sound and video as you here it with the Vero 4k and whatever device plays the sound and examine this file then with the same proper tools.

I have tried all kind of osmc versions and all kind of settings and I can‘t get the audio delay below 125ms (and it is actually at least 160ms because the video lag of the Tv lowers the overall audio lag by 35-40ms), which is at least for me very noticable. If I play the file on my alternatives I have here, I have no audio delay at all, or even the audio slightly ahead… which is how it is supposed to be because TV has a response time of 35-40ms, the audio should have next to none!

For 17.6 I had no significant lip sync issue and audio offset worked perfectly if I had to make any minor adjustment. Same with the January update based on 18.1.

The May update with 18.2 introduced the lip sync issue, and it may or may not be related to the Audio Offset now being broken. I’m thinking that they are related, however, and that this is no coincidence. If I set an audio offset I need to stop and restart the video for it to take effect, but if I then pause the move or engage the GUI with something like Technical Information, the lip sync goes out of whack. Furthermore, setting an audio offset globally may fix the affected files, but then creates a lip sync issue for files that were not affected, like AAC 2.0 movie trailers.

As per above, the C2 is not affected at all by any of these issues using 18.2, so that will be my Vero 4K replacement for the time. Not sure, but would comparing the LibreELEC and OSMC code as it relates to video and audio playback help?

Also @bmillham and @sam_nazarko, are you testing using the Vero 4K or the Vero 4K+? In my case, the issue affects the 4K.

I have an original 4K. I don’t have a + to test with.

@MidnightWatcher: Actually no device I have produces an audio lag… at least nothing that is bigger than the response time of my TV, which is 40ms. That is a huge gap compared to what I experience with the Vero 4k, where the audio delay on some files exceeds (!) the video lag of the TV by more than 100ms. I mean, how is that even possible?

Something is completely wrong, the only question seems to be when it started. After rolling back, I still had the problem, just slightly less prominent. Anyway, even if I would, I probably can‘t stay on an older version forever.

No matter what, no player should produce an audio lag higher than what any TV has as its response time and absolutely no way should it exceed that response time by 100-200ms.

I’ve found the problem and can reproduce it.

4 Likes

nice :slight_smile:

Thx Sam… I know I have harsh words sometimes but I am rarely mistaken when I find something out of the norm. I have Aspergers and made my handicap my profession (though not in IT like most)… and once I find something to be „off“, I am quite relentless confirming the issue and pestering the devs :smiley:

Just wanted to confirm that the audio delay (on the randomly affected files) in Kodi 17.6 is just that it mostly falls into the „not detectable“ category. I did quite alot of testing this morning with various videos. I could not find any logical pattern which files are affected. But it is almost a 50/50 chance.

What is worth mentioning is that files, that are not affected are just like files played on other players. No audio delay at all, which actually results in the video being late by the response times of the TV. That is what it should be because the response time of the Tv can be offset either by the AVR or in Kodi. But the affected files have a 100 to 125ms audio delay in Kodi 17.6… and 150 to 200ms in Leia, which is just too much.

This issue escalated just that much in Leia, that it starts getting detectable. While I hope you could at least implement what you called „the Krypton hack“, it would be alot better if you could fix the issue at at roots… because I fear the issue could crawl back in future updates. No audio delay (or at least lower than 50ms = not higher than the response time of modern TVs) whatsoever… if that is possible, but it seems that libreelec for example does just that.

I had a quick look at the code and Leia seems to have a different approach to syncing than Krypton. We’ll discuss in the team and fix it.

2 Likes

Late to the party but thought I’d contribute my 2¢:

A Leia update around the time of the start of this thread knocked off the audio sync on my setup as well. Prior to that I had audio in sync but it was noticeably off afterwards for 23.976Hz content but not as much for others. My setup is Vero 4K+ → AVR → TV.

I then realized I had the following in my advancedsetting.xml which was the cause of the issue:

<advancedsettings>
  <video>
    <latency>
      <delay>0</delay>
    </latency>
  </video>
</advancedsettings>

My guess this was working around some defunct issue that I can no longer remember.

Anyway, a means by which to correct the audio sync is to first grab some video clips which make the audio sync clear. These do 25Hz and 23.976Hz respectively:
https://editorsean.com/articles/audio-video-sync-alignment-latency-test/

(grab the latter with youtube-dl)

Then, play the clips and record it using Slo-Mo on your phone. During slow-mo playback, you can much more clearly see how far it is off. If, for example, the 23.976Hz audio was 250ms ahead, but only on that refresh rate, you can put something like this in advancedsetting.xml to correct it for now:

<advancedsettings>
  <video>
    <latency>
      <refresh>
        <min>23</min>
        <max>24</max>
        <delay>250</delay>
      </refresh>
    </latency>
  </video>
</advancedsettings>

Obviously whenever the issue is fixed, you’ll want to remove that from the file.

Unfortunately the delay is not always there for all 23.976fps content. It might have something to do with the audio codec though. But not even sure about that. Buttom line, there is no universal workaround currently. You either fix the issue for some files with an offset setting or create an issue for actually perfectly synced files with the same offset. It is very frustrating,

I have the same problems on the Kodi Android Version for the FireTV 4K stick without anything between. Seems like some versions are broken because on the Pi i have no issues.

I got a Firestick 4K recently also and there is a lip sync issue, but at least the Audio Offset works as it should.

I actually bought MrMC and there is no sync issue anymore but they are still bugs with 4K content (stutter and other stuff which has to do with HDR to SDR).

No idea why Kodi is not sync i coult not fix it every mkv had an different delay.

This seems to be a Kodi bug and it affects all platforms.

This also affects OSMC on Pi when using ALSA, but it doesn’t seem to have been widely reported. I think the issue is more prevalent with 4K content.

I have a fix now for OSMC devices. I’ll need a couple of days.

Cheers

Sam

5 Likes

Looking forward to the fix. Thanks for investigating Sam.