To make things clearer, at least to me, what’s the future here?
What the next nightly/release will be featured with?
The advancedsettings.xml tweak for audio delay based on resolution?
The script.audiooffsetmanager?
Both?
If the future is only script.audiooffsetmanager, how can I simply transpose my config strId=2160p24hz and delay=250 in the addon?
I haven’t tested it yet but from the screenshots, it seems I’d need to somehow duplicate the delay in all audio formats or can I set a global setting affecting all audio formats?
I can only speak about the addon, but the addon does not take into account resolution (rather HDR type, audio format, and FPS of source video instead). I think the ideal solution would be if Portisch’s new advanced setting for delay based on resolution is added into the codebase, and then for people that need more control they can install the addon once it’s added to either Kodi or CE repo. So, I think a combination of both would be the ideal solution. That’s my outside opinion.
The advanced settings tweak delay by resolution should be supported since 20241129. In CE-22 there is also a additional delay tweak if media is HDR: hdrextradelay. But for full support of this new parameter GetOSHDRStatus need to be implemented first.
No, this was not changed as I guess it’s good to start adjusting when ±2 frames and not on ±1 frame as it will lead to lot of picture stuck visible.
The “bug” is here:
It only skip frames when m_queued.front() != idx. But when one frame is late it’s m_queued.front() == idx and it does not skip it.
so, with the latest changes in the nightly the delay tweaks (when/if required) are in the advancedsettings.xml and not via the audiooffsetmanager addon, right?
On the nighties I’m seeing a nonzero value for VSyncOff for fractional frame rates. This was not the case in older versions of CE.
Going through the code, it looks like that is occurring because fps = 23.976025… and GetFPS() = 23.976023… leading to diff = ~8.3e-8. This obviously evaluates to true as no numeric tolerance is being used despite being below the tolerance for single precision calculations with both fps and GetFPS() being floats.
Yeah, as a relatively new CE user on an AM6B+, I’d certainly appreciate the quick bullet guide on what the “right” thing is to do to get the audio sync lined up. I’m a bit unclear from reading this thread as to whether the issue is now basically fixed (if I’m on 11/29 CE Nightly), or whether I should be doing some sort of manual edits to advancedsettings.xml (the latter leading to “how?”, but I’ll research/cross that bridge when I get to it!) Thank you!
Ok, but I was more asking about your change that went from if (diff < 0.0005) to if (diff && diff < 0.0005) with the comment “Don’t do a vsync adjust on perfect match”.
For a fractional 24 fps video on played on CE with a fractional 24 fps output, did you intend to set m_clockSync.m_enabled = true or not?
The fix to remove the default audio lag of four frames has not been included into the nightly.
By default everyone will need to make a advancedsettings.xml to correct this error and then adjust from there as needed. When doing so will also need to account for CE not using native refresh rates but doing frame doubling for some, but not all, refresh rates.
Understood, but only for 4K resolutions right? I saw that someone mentioned here all 1080p content is in sync.
Until that is incorporated into nightly, an advancedsettings.xml with every 4K resolution and refresh rate combo, and the resulting calculation from here: