Kodi Community Forum
24p and audio sync issues - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: 24p and audio sync issues (/showthread.php?tid=80247)



RE: 24p and audio sync issues - Helioy - 2015-08-28

fritsch: I got a question then. If you open the Codecinfo overlay while playing, I see a/v going from 120-180ms. How does Kodi know there is such a delay if it is a avr/TV delay?


RE: 24p and audio sync issues - fritsch - 2015-08-28

(2015-08-28, 10:05)Helioy Wrote: fritsch: I got a question then. If you open the Codecinfo overlay while playing, I see a/v going from 120-180ms. How does Kodi know there is such a delay if it is a avr/TV delay?
We know how far Video and audio are off concerning _our_ clock obviously. HW delay which adds on top, we don't know.


RE: 24p and audio sync issues - Helioy - 2015-08-28

All right. But this is consistent with the delay of ~175ms we are adding as delay. Shouldn't this clock in theory be close to 0ms? Naturally you can't take HW delay into consideration.


RE: 24p and audio sync issues - fritsch - 2015-08-28

In theory it is 1/fps. That means 20 ms for 50, 16 for 60 and >40 for 24p.

Now consider a TV doing post processing, e.g. color enhancement or 100hz calc bs which needs 3 frames queued ...

I suggest: measure your personal value once and for all and put it per refreshrate into advancedsettings and be happy.

Edit: concerning the question, yes we add our introduced delay and tell dvdplayer to keep that value in mind before resyncing, which would happen when 200 ms off.


RE: 24p and audio sync issues - jznine - 2015-08-28

Fritsch, we appreciate your thoughts on this; for the purposes of maybe making this thread more definitive, can you briefly elaborate on how you would suggest users measure their personal value for this (appreciating AV hardware downstream adds further delays that require manual fine tuning)? It is the only real solution I agree, but documenting here (e.g. measure using test tracks etc) could help users to find out how to find this value and find their answer.


RE: 24p and audio sync issues - fritsch - 2015-08-28

Watch some conversations in 24p and shift the delay via GUI manually. Remember the value that fits.

Then set it to zero again, cause kodi saves per file!

For a/v sync it's the same as for audiophilists ... all fine when you are happy with what you see/ hear.

I admit that av.xml is not straight forward for beginners. Currently travelling with no media access. I suggest: go with oe's advancedsettings.xml and see if that is okay for you.


RE: 24p and audio sync issues - jjd-uk - 2015-08-28

fritsch aren't you supposed to be away Wink


RE: 24p and audio sync issues - fritsch - 2015-08-28

(2015-08-28, 12:50)jjd-uk Wrote: fritsch aren't you supposed to be away Wink

Yeah. See what happened :-). Had some things to finish/organize - hevc vaapi with fernet, wsnipex and Timo. But we are done, bright future :-)


RE: 24p and audio sync issues - Soli - 2015-08-28

(2015-08-28, 10:33)fritsch Wrote: In theory it is 1/fps. That means 20 ms for 50, 16 for 60 and >40 for 24p.

Now consider a TV doing post processing, e.g. color enhancement or 100hz calc bs which needs 3 frames queued ...

I suggest: measure your personal value once and for all and put it per refreshrate into advancedsettings and be happy.

Edit: concerning the question, yes we add our introduced delay and tell dvdplayer to keep that value in mind before resyncing, which would happen when 200 ms off.

IMO it's flat out wrong wrong to set a delay of 23-24fps vsync to 175ms as default in OE.
The TV might do 200 frames of post processing and it wouldn't matter. The sound output from the TV will be delayed exactly the same. I have yet to experience a TV that didn't do this properly. Yes a lot of TVs do all sorts of crappy things, but audio delay? Never a problem whatsoever.

This is only an issue when you run the signal into an AV receiver and HDMI from receiver to TV.
Then you would need to do one of 2 things:
1. Nothing, as the TV will report it's delay through HDMI's 1.3b lip sync feature and they will automatically sort out the delay.
2. You adjust the lipsync/delay in the receiver.

You do not ever mess with the delay from source, unless you're running sound directly (i.e analog audio output) to an amplifier and use HDMI only for picture. Even then the delay would be global.

There's no reason to set a delay specifically for 23-24hz, unless there is a bug in the software itself at these rates. (That's not meant to be passive aggressive rhetorical, 23-24hz works as intended @ my home' without needing to set a special delay for 23-24hz)


RE: 24p and audio sync issues - fritsch - 2015-08-28

In theory ... show me the API where I can call GetHWDelay and can feed that into AE ...

In fact the minority of our users use refreshrate adjusting at all. It's an engineering approach, nothing more. Happy for your HDMI standard solution that works in a generic standard way on all platforms ...

Edit: and your "no reason" is directly and obviously proben wrong by the thread you just posted. Global avr delay is no Option, especially when a ps3 is connected or something else, which can actually Read the spec's delay ... Another thing proves you also wrong: plex and OE ship this delay by default, cause it made the majority of their users happy. It workarounds a real world issue. And Again: this is an experimental engineering approach, nothing else.


RE: 24p and audio sync issues - Soli - 2015-08-28

Be that as it may. But I still think it's wrong to "force" this 175ms delay as default. I have to make an extra ad.xml to counter that delay in the default ad.xml (which of course isn't writable because it lives in a squash).

If anything it should be global, cause then it would be easy to adjust in the OSD and save for all videos. The people who experience this extra delay only for 23-24 could set the required delay themselves.

Edit to answer you edit:
I get it , I really do. And maybe I should have added "...wrong (in theory)", and that it might basically be a practical "hack" of a real world issue (that I obviously don't have) But I still think it's wrong..so to speak. How about redoing an uptodate survey of this?


RE: 24p and audio sync issues - steelman1991 - 2015-08-28

(2015-08-28, 09:29)fritsch Wrote:
(2015-08-28, 08:36)steelman1991 Wrote:
(2015-08-28, 04:43)pleccy Wrote: Oh? I didn't realize that, sorry. It's just that problem doesn't exist with Plex so I just assumed that it was a Kodi thing.
So if it's not a SW issue, I can only assume that it's a hardware issue? I'm a little confused. One thing that seems to be agreed upon is that is it an 'issue'. So how can it be addressed? If you're saying the problem lies in the hardware, I doubt approaching Samsung, LG, Sony etc about their TVs would achieve anything? But there could be a solution written in to the software to solve the problem?

I just wonder why it doesn't happen with plex What do they do differently.

AFAIK, their software ships with a delay of 175ms already set (via an advancedsettings file - same as is available in Kodi). They asked users for their opinions and this was the 'common' delay reported.
That you got wrong. This was me and newphreak 2 years ago. We asked arround 100 users with 2 samples, 24 and 23.976 and averaged the results. This is why _openelec_ ships 175 for those Rates by default.

So we are aware of this avr/TV delay, but drivers don't tell us, so we decided for the 175 via advancedsettings. So plex copied this, also?

Sorry it was early this morning - getting my plex's and openelec mixed up. Lesson learned - shouldn't read and reply before coffee in the morning.


RE: 24p and audio sync issues - fritsch - 2015-08-28

(2015-08-28, 13:38)Soli Wrote: Be that as it may. But I still think it's wrong to "force" this 175ms delay as default. I have to make an extra ad.xml to counter that delay in the default ad.xml (which of course isn't writable because it lives in a squash).

If anything it should be global, cause then it would be easy to adjust in the OSD and save for all videos. The people who experience this extra delay only for 23-24 could set the required delay themselves.
Make a vote. If majority, that uses adjusting refreshrate, has no delay with 24p, we remove it. In fact when we gathered those numbers there was no one without delay :-(

Save for all movies is no solution AS that would set it for all refreshrates, which is not wanted. In fact since we have that delay not a single complaint was received even in official media reviews. Every half a year someone wants it disabled in IRC ... Far better than such lengthy thread than this one.

Still happy for a real solution that out of the box Joe can accomplish.


RE: 24p and audio sync issues - Soli - 2015-08-28

Fair enough. I just dont like the concept that you (or OE) must adjust something to suit things that are obviously wrong on the user end, be that hardware, software, or other things... And that adjustment is only an average value, so it's not a perfect fix anyways. At the same time, we who are not affected by this have to make a counter ad.xml. But I get it, OE is the Open media center for "everyone", not the hardcore geeks like meWink (and I'm not really a hardcore geek but it's a figure of speech..)


RE: 24p and audio sync issues - fritsch - 2015-08-28

Hehe. Yeah :-) but something in OE addon that creates AV.XML if not existing and adding a Video, refreshrate Tag/ altering it should be easily possible with nowadays Python XML libs. Probably 10 loc.