Delayed audio problem

  • Hi folks,

    I've had this problem on the WeTek Hub, but I thought it was due to the maturity of the build for the little box.

    Now I've installed LibreELEC 7.0.3 on my old Zotac Zbox (Intel Atom + Geforce 520M) which worked perfectly with old OpenELEC, and the audio delay has appeared there too!

    I should point out that the video files themselves are fine, they work fine in Windows media player, VLC, and under OpenELEC.

    Since I did a clean install it's possible that I'm missing some configuration options, but I haven't seen anything.

    Does syncing refresh rates cause audio delays?

    I have a Denon AV receiver and I've enabled passthrough and I've ticked all the boxes since the receiver is capable of all formats.

    Any way to fix this? If a fix works on the intel platform then it might work on the WeTek as well!

    Thanks!
    [hr]
    I've found something here that makes me wonder - does passthrough only work when you select 2.0 output?! I have a 5.1 system and 7.2 capable receiver. What settings should I use?

    PulseAudio - Official Kodi Wiki

    Edited once, last by Crotach (January 17, 2017 at 8:42 PM).

  • Kodi still has a default audio delay in its internal advancedsettings, you can either undo that in your own advancedsettings.xml file, or use Kodi's video OSD option, and select the audio offset in the Audio & Subtitle settings window, and then save that new setting as default for all videos.


  • Kodi still has a default audio delay in its internal advancedsettings, you can either undo that in your own advancedsettings.xml file, or use Kodi's video OSD option, and select the audio offset in the Audio & Subtitle settings window, and then save that new setting as default for all videos.

    I was trying to find that in the menus yesterday, but I admit I was tired after messing with this all evening.

    I do think it's refresh rate dependent, because most of my videos have about 250-275ms audio delay, but for example the Grand Tour has a much bigger delay.

    First thing I'll try is to turn off the two options for syncing playback and refresh rate. If that doesn't work I'll enter the hell of advancedsettings.xml and different audio delays based on different refresh rates :(

  • I never had any delay problems using the Wetek Hub.

    "Sync Playback to display" will disable passthrough at all. As audio has to be resampled by this setting.

    "Change refreshrate to match video" will set the TV in the specific Hz mode the movie will provide. So if Kodis GUI is set to use 60Hz and a movie is 1080p50 it will set the TV to use 50Hz instead of 60HZ by that setting. That is mostly important to get a smooth stutter-free playback for 24p content (which nearly any Bluray has). If you disable that, your TV isn't set to 1080p24 if the movie starts and the movie will be played at what you have Kodi set to. That might cause stuttering.

    So if you want to have passthrough and a smooth playback depending on the refreshrate of the movie, please disable "sync playback to display" and set "change refreshrate to match video" to "start/stop".

    The speaker layout (2.0, 5.1 whatever) is only important if you don't use passthrough. Kodis GUI and the menu sounds (for example) will use that speaker layout. That's the reason you will see your AVR is switching to "DolbyPrologic IIx" probably if you stop a movie and navigate through the menus.

    If you still have an audio delay with those settings I mentioned above, please provide a full debuglog.

    And please don't compare LibreELEC with something that might be set up on Ubuntu. LibreELEC is not Ubuntu. It's completely different.

  • Thanks guys, problem solved!

    I turned off "Sync playback to display", I had no idea this would turn off sync.

    The other issue is that audio delay settings were stored on the MySQL database, so when I reinstalled and tried to play a video it picked up the audio delay settings, and once again it was out of sync :)

    Third potential culprit was the AVR which has the lipsync option enabled, but that one is still on and it works fine so I'll keep it.

    Thanks for all your help!

  • I used to have "Adjust display refresh rate" to "on start/stop", but my gf and i are watching a lot of 3D movies recently and i have an addon to automatically switch to 3D mode on my TV when a 3D file is played.
    Having "Adjust display refresh rate" to "on start/stop" would create a lot of problems, like not switching the TV to 3D or not putting back to 2D when the movie stop or having the screensaver in 24hz.
    I have "Adjust display refresh rate" to "OFF" for a while now and i have not seen stuttering yet.

    Edited once, last by vitorp07 (January 18, 2017 at 9:32 PM).


  • Kodi still has a default audio delay in its internal advancedsettings, you can either undo that in your own advancedsettings.xml file, or use Kodi's video OSD option, and select the audio offset in the Audio & Subtitle settings window, and then save that new setting as default for all videos.

    thank you! this hint helped me to solve my audio delay problem! First I guessed that the audio passthrough is the problem as I did not have it with liveTV (it always gets transcoded to PCM). But the problem was the 24fps default internal delay of Kodi of about 200ms. I added this advancedsettings.xml to user config folders and reboot. DTS and AC§ are in sync now :)

    Edited once, last by kszabo (February 19, 2017 at 7:45 PM).

  • @kszabo

    Thanks, it relay helped. I double checked your information and indeed, the default delay in the advancedsettings.xml is 175.

    But if you want to override the settings, you do not have to reverse it, you need to set it to 0.

    Fore me the following code worked just fine:

    I think delay configured by default is only relevant if your TV can't play 24p nativly.

    Regards,
    Dennis

  • Hawk. That really made my day. I have a libreelec installed on my mac mini (late 2014) which is hooked via hdmi cable to the AVR Yamaha RX-A1050 and then to the TV (Samsung 46f8000). To gain shutterfree playback I need to set player option to adjust refresh rate (always), but then the problems with audio just began. I did almost everything; played with different settings, factory reset. Adjusting audio offset did work somehow, but I was never 100% pleased with playback until I created advancedsettings.xml settings listed above.

  • For me, with Pioneer VSX-930 + Panasonic TV (fully supporting 23.987, 24 etc.), the value -200 works: this is mandatory delay, when is AVR in turn off state, and works just like HDMI passthrough to the TV. Interestingly, when is AVR turned ON, the delay seems to be gone (even when AVR auto delay is OFF), so I just have setuped +200 delay on AVR.

    Thank you very much for this thread, until now I need to setup audio delay for all videos within Kodi Audio OSD - and that way I cannot choose different values for different fps.

    Edited 2 times, last by JimmySmith (March 9, 2019 at 11:42 AM).