Posts by voip-ninja


    To debug this, you might want to change only the delay in advancedsettings and change nothing else in the GUI and observe what happens in two cases. First, set the offset in the GUI to 0 while playing a 24p video. Then,
    Test 1: Set the delay in advancedsettings to 0. Reboot. Play the video and note what happens.
    Test 2: Change the delay in advancedsettings to 2000. Reboot. Play the same video and note what happens.

    You should see a 2 second relative difference to the first observation. From those two observations, you should be able to determine whether or not the delay in advancedsettings is doing something. And, with a two second delay and observing the difference between Test 1 and Test 2, you should be able to see whether a delay or advance (negative delay) is required for your setup.

    I use this to eliminate the delay for 24p material on my Odroid C2 played through my AVR on a projector. It's only slightly different from what you use.

    Code
    <video>
      <latency>
        <refresh>
          <min>23</min>
          <max>24</max>
          <delay>0</delay>
        </refresh>
      </latency>
    </video>

    Have you tested this out in Krypton?

    Your idea was a good one and when I tried it out I determined that video refused to play with the 2000ms setting (once video synced up at 23.976 it froze and showed "paused" and refused to start again).

    Then I set the delay to 0 and noticed the same problem of the video being off from audio.

    Then I set the delay to -175 (had tried before) and it looks like video is close to in sync. I need to test more because just as I was testing this out my 2 year old pitched a full on fit that he had to watch Disney's Cars while dad was debugging the NUC.

    So, if it turns out -175 is working then I can deduct a couple of things;

    1. Something in Krypton changed and the offset is now cumulative and not overwritten from the system advanced settings file.
    2. Something in the copy/paste of the stock settings file into the version in user data was not being interpreted correctly until I "slimmed it" down a bit.

    I will need to do some more testing on this to really know what is happening now but for the first time might be getting somewhere.

    So i guess that is why LibreELEC still ships with that advancedsettings.xml,
    because if you enable the option "adjust display refresh rate" you need the 175ms delay or else the audio won't be in sync with the video.

    Just out of curiosity you said you owned a Panasonic plasma,
    did you give a try to play those 24fps movies with "adjust display refresh rate" disabled and 0ms delay in the OSD?
    My plasma screen handles it better when staying in 60hz mode for Kodi, with a Blu-ray player i still use 24hz.
    The only real problem i have is with 25fps videos but at least i don't get those too often here.

    That makes no sense. If the 175ms in the stock advanced settings file was working the lip sync would not be 175ms off when I play my files back. If I didn't have other files (30fps, 60fps, etc.) then I would just set the offset in the OSD to 175ms, save it for all files and be done with it.

    There are other threads about this, so I'm not the first that has run into this. Unfortunately the fix (using new advancedsettings file) doesn't appear to work in the latest build, I guess I'll have to open a bug report on this.

    Disabling "adjust refresh rate to match display" has no effect on this problem. I've tried all combinations, the only one that sets the sync correct is to have the movie play back at 60fps (same frequency that OSD is set to in main menu) and then I get 3:2 pulldown motion problems (but at least audio is in sync).

    I don't have this problem with my PS4, the PS3 that proceeded that or the Panasonic BD player that proceeded that. All played 23.976 to this TV and it worked perfectly, on LibreElec/Kodi appears to be busted.

    When I posted a thread about this in the Kodi forums the devs reported to me that they've had this 175ms "built in" delay for 23.976 content removed from Kodi for quite a long time and they seemed irritated that Libre/OpenElec are still doing this as it's not supposed to be necessary any more.

    Maybe a developer will notice this thread and offer some insight. The old workaround of setting my own delay in the user profile advancedsettings.xml file is no longer working... apparently.

    Even better they could delete the ancient "fix" in the settings file that's been gone from Kodi mainline for something like 2 releases now.


    It is loading your advancedsettings.xml file properly, you still having the problem?
    And if you go now in the OSD while playing a 24fps movie, is the audio offset still at 175ms or at 0?

    The OSD says zero and I have the audio sync issue with the settings file you seen in the pastebin. I adjust the offset in the OSD to 175ms and the audio is properly in sync (FWIW the OSD shows zero when I don't use my advanced settings file too but again the audio sync is way off).

    There is no noticeable difference between when I have my own settings file in use vs. when I don't, the audio is off @ 23.976fps.


    ssh in and post the results of:
    cat /storage/.kodi/userdata/advancedsettings.xml

    Here you go... not sure WTF is wrong with formatting of code in this forum... sorry for this looking like crap.


    You can see in the log that LE's default delay for 23/24p material is set to 175 and then some other advancedsettings file is processed where the delay is *still* 175, not 0 as you've indicated. So you've got an additional advancedsettings.xml file somewhere where you've set the delay to 0 and it doesn't get processed. I'm going to guess you created a symlink back to the LE advancedsettings file as it looks like the system/xbmc/advancedsettings.xml file is getting processed twice.

    And pastebin the full log and post the link.

    OK, I only created one advanced settings file, which I've posted. I will get the full log and pastebin it in.

    I will also do a find from / on the file system and find all instances of advancedsettings.

    I did not create any symbolic links, etc.... I simply did a search in Kodi of where advancedsettings.xml needed to be for LibreElec and created one there.


    you have to reboot after making changes to advancedsettings.xml for the settings to take effect (or restart kodi, systemctl restart kodi)

    Yes, thanks, I know I have to reboot for advancedsettings file changes to take effect.

    I'm seeing below in logs so it looks like it is processing both settings files. This leaves me confused about why the 0 offset is not working. I will try -175 next.

    Code
    21:19:42.113 T:140460009465984  NOTICE: Loaded settings file from special://xbmc/system/advancedsettings.xml                                                           21:19:42.113 T:140460009465984  NOTICE: Contents of special://xbmc/system/advancedsettings.xml are...                                                                                                              <?xml version="1.0" encoding="UTF-8" ?>                                                                                                                                <advancedsettings>                                                                                                                                                       <showexitbutton>false</showexitbutton>                                                                                                                                 <remotedelay>1</remotedelay>                                                                                                                                           <cputempcommand>cputemp</cputempcommand>                                                                                                                               <gputempcommand>gputemp</gputempcommand>                                                                                                                               <video>                                                                                                                                                                  <latency>                                                                                                                                                                <delay>0</delay>                                                                                                                                                       <refresh>                                                                                                                                                                <min>23</min>                                                                                                                                                          <max>24</max>                                                                                                                                                          <delay>175</delay>                                                                                                                                                   </refresh>                                                                                                                                                           </latency>                                                                                                                                                           </video>                                                                                                                                                               <samba>                                                                                                                                                                  <clienttimeout>30</clienttimeout>                                                                                                                                    </samba>                                                                                                                                                             </advancedsettings>                                                                                                        21:19:42.115 T:140460009465984  NOTICE: Loaded settings file from special://profile/advancedsettings.xml                                                               21:19:42.115 T:140460009465984  NOTICE: Contents of special://profile/advancedsettings.xml are...21:19:42.113 T:140460009465984  NOTICE: Loaded settings file from special://xbmc/system/advancedsettings.xml                                                           21:19:42.113 T:140460009465984  NOTICE: Contents of special://xbmc/system/advancedsettings.xml are...                                                                                                              <?xml version="1.0" encoding="UTF-8" ?>                                                                                                                                <advancedsettings>                                                                                                                                                       <showexitbutton>false</showexitbutton>                                                                                                                                 <remotedelay>1</remotedelay>                                                                                                                                           <cputempcommand>cputemp</cputempcommand>                                                                                                                               <gputempcommand>gputemp</gputempcommand>                                                                                                                               <video>                                                                                                                                                                  <latency>                                                                                                                                                                <delay>0</delay>                                                                                                                                                       <refresh>                                                                                                                                                                <min>23</min>                                                                                                                                                          <max>24</max>                                                                                                                                                          <delay>175</delay>                                                                                                                                                   </refresh>                                                                                                                                                           </latency>                                                                                                                                                           </video>                                                                                                                                                               <samba>                                                                                                                                                                  <clienttimeout>30</clienttimeout>                                                                                                                                    </samba>                                                                                                                                                             </advancedsettings>                                                                                                        21:19:42.115 T:140460009465984  NOTICE: Loaded settings file from special://profile/advancedsettings.xml                                                               21:19:42.115 T:140460009465984  NOTICE: Contents of special://profile/advancedsettings.xml are...

    I thought about posting this as a feature request, but it's really more of a "stop fixing something that isn't broke" request.

    Mainline Kodi have abandoned hard-coding audio sync delay hard-code in the advancedsettings file but LE still is doing this.

    Specifically this section of the stock advancedsettings.xml is causing problems for me (and probably other users) by introducing unnecessary audio delay for 23.976 content.

    Most TVs/AVRs made in the last 5-6 years do not need this kind of adjustment, it would be really helpful if it was removed.


    [/code]


    I know what you mean, in my case i'm happy my plasma prefers 60hz so i set kodi at 60hz also and no more delay when setting in the OSD 0.00ms

    What do you have exactly in your advancedsettings.xml?

    This is the built in advancedsettings file where the problem is being introduced;

    All I did is copy this file and put it in the userdata folder with the one change of setting the delay from 175 to 0. Unfortunately it is having no effect on the problem.

    Hi all,

    I'm a long time OE user who recently wiped my Intel NUC and did a fresh install of LibreElec 8. After doing this I observed about 1/5 seconds of delay in playback of 23.976 fps content on my setup.

    You can see information about what I tried and what was investigated in this thread on Kodi forums;

    Upgraded OE Gotham -> Libre Krypton, audio sync at 24fps still broken?

    It was eventually shown to me that LibreElec (like OpenElec before it) is introducing a built-in 175ms delay for 23.976 content via the built in settings file. This is unfortunate as I have a TV (Panasonic Plasma) that handles 23.976 playback much better than 60 fps playback for content like native BD rips.

    I tried setting up advancedsettings.xml myself and changing the delay from 175 to 0 but the system seems to ignore it.

    I know that the 175ms delay is the culprit because if I go into the OSD and manually set the delay to .175 the audio and video are properly in sync.

    A couple of people involved in Kodi development commented that maybe it is time to ditch this 175ms hard coded delay as it is an archaic fix to a problem that most users would no longer have and is not even part of any other Kodi distributions.

    In the immediate future my question is, how can I override this delay being introduced in the system advancedsettings file?

    Thanks!