Kodi Community Forum
A/V sync settings in Openelec? - 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: Raspberry Pi (https://forum.kodi.tv/forumdisplay.php?fid=166)
+---- Thread: A/V sync settings in Openelec? (/showthread.php?tid=316744)



A/V sync settings in Openelec? - EvilWayz - 2017-06-17

Going thru the wiki I saw an a/v sync setting with three options. However, it's not in my video settings where it should be. I know I can manually offset the audio forward and backwards, but I was liking the idea of an automatic version. No one on the openelec forum has deigned to reply so I thought I'd try here. I am referring to a/v sync method, under PLayback here: http://kodi.wiki/view/Settings/Videos

Running OE 8.0.4, Kodi Krypton 17.3 on a raspi3 if that helps.


RE: A/V sync settings in Openelec? - noggin - 2017-06-18

(2017-06-17, 21:52)EvilWayz Wrote: Going thru the wiki I saw an a/v sync setting with three options. However, it's not in my video settings where it should be. I know I can manually offset the audio forward and backwards, but I was liking the idea of an automatic version. No one on the openelec forum has deigned to reply so I thought I'd try here. I am referring to a/v sync method, under PLayback here: http://kodi.wiki/view/Settings/Videos

Running OE 8.0.4, Kodi Krypton 17.3 on a raspi3 if that helps.

That setting doesn't do what you think it does. It's purely there to decide how audio is handled when 'Sync Playback to Display' is enabled, or when audio can't be output 'unmolested' for other reasons, to avoid audio doesn't increasingly go out of sync (it isn't there to fix a constant offset)

Sync Playback to Display is used in a couple of situations :

1. To play 24.000p/23.976p content at 25p when you have a non-24p-friendly display and want to avoid judder from asymmetric frame repetition (like 3:2 pulldown) This is done by speeding up 23.976/24.000 to 25p.

2. To play 23.976p content on hardware that only outputs or displays 24.000p without a frame repeat every 40" or so. This is done by speeding up 23.976p to 24.000p.

In both situations you are speeding up video. But you can't 'speed up' audio in the same way as audio runs at a fixed clock rate 44.1/48kHz - irrespective of whether it is PCM, analogue or in the compressed domain. You can't run audio at 50kHz sampling when you speed up 24p to 25p for instance (which is what you'd have to do if you sped up the audio to match the video). If you don't do anything - the audio will run 'slower' compared to the video, and will get more and more out of sync the longer you watch.

So you had a choice - resample (which won't work for DD/DTS/True HD/DTS HD bitstreamed audio) or repeat/dupe audio frames (which will work for bitstreams - but can leave glitches) - or by adjusting the clocks by small amounts. The latter would be better for 23.976->24.000 potentially - as the clocks are very similar. Not so good for 24->25...

However these options don't fix a/v delays caused by poor encoding - they don't detect a/v sync (that would need huge amounts of AI-type processing to look at lips and correlate with dialogue surely?)

The option you are talking about


RE: A/V sync settings in Openelec? - EvilWayz - 2017-06-19

Ah. *nods like he understood a word of that*


RE: A/V sync settings in Openelec? - hansl - 2017-06-19

noggin's explanation only sounds really tech-y on the surface but indeed does answer your question (and gives lots of technical background Wink)

important bits:
(2017-06-18, 12:31)noggin Wrote: That setting doesn't do what you think it does.

(2017-06-18, 12:31)noggin Wrote: (it isn't there to fix a constant offset)

(2017-06-18, 12:31)noggin Wrote: [...] they [These settings] don't detect a/v sync (that would need huge amounts of AI-type processing to look at lips and correlate with dialogue surely?)

my non-tech version of an answer: the setting you mean does not help in the following case: you have a video file (streamed or local) and video and audio is out of sync. Activating the setting you mentioned will not help in that case.

I'll refrain from trying to give a non-tech explanation what "a/v sync" is for. That's because a) I think the aforementioned is your problem and b) I don't know if I could Big Grin


RE: A/V sync settings in Openelec? - EvilWayz - 2017-06-21

My problem is with certain movies, the longer I watch them, the more out of sync the audio gets.

I also have this problem with bluetooth, it starts off fine, and then it gets out of sync and then eventually crashes my system. But that i believe is the fault of my pi not being able to properly push ad2p.

I thank you for your answers, nonetheless.