8.0.1-9.0.2 x86: Incorrect default aspect ratios on refresh rates other than 60Hz [SOLVED]

  • Dear Support,

    LibreELEC 8.0.0 Generic x86 (fresh install) does not display images/videos correctly at FullHD screen resolution and refresh rates other than 60Hz! In other words, if I change screen refresh rate from default 60Hz to any other (manually or automatically by auto-refresh feature), the image becomes distorted. With "distorted" I mean that it is not displayed pixel-to-pixel correctly. And this is the problem.

    Please find attached screenshots:


    As you can see, the image on first screenshot (50Hz) is little bit squeezed horizontally and the black bars appear at both sides. Looks like incorrect aspect ratio. At the same time the second image (60Hz) is displayed correctly.

    Best regards,
    Tepp

    P.S. My HTPC is based on ASUS N3150I-C MB.
    P.P.S. By the way, the same issue is observed in OpenELEC 7.0.1, but not in the LibreELEC 7.0.3 (!)

    Edited once, last by Teppopups (April 3, 2017 at 9:52 PM).

  • Could be the NUC (latest BIOS installed?),
    could be the TV (which one?) that needs a proper PC screen setting,
    or perhaps a stubborn HDMI cable?


  • Could be the NUC (latest BIOS installed?),
    could be the TV (which one?) that needs a proper PC screen setting,
    or perhaps a stubborn HDMI cable?

    Everything is OK with the setup. TV supports and switches correctly to all the modes, according to xrandr output. Screenshots are made not on TV, but directly on the openelec (Ctrl+S), so the black bars are coming from the openelec, not from TV!

    I tested this on different releases: OE 6.0.3 - is OK, LE 7.0.3 - OK, LE 8.0.0 has this issue as well as the OE 7.0.1! I suppose that most of the people just don't realize that the screen is little bit stretched or squeezed. It can be clearly seen on the screenshots or on test patterns.

    Can I ask you to capture screenshots with different refresh rates set manually?

    Edited once, last by Teppopups (March 27, 2017 at 11:36 AM).

  • Here you go 3 screenshots at 60,50 and 24Hz
    ->60Hz 60Hz - Imgur
    ->50Hz Imgur: The most awesome images on the Internet
    ->24Hz Imgur: The most awesome images on the Internet

    BTW i do see what you mean, but the GUI was meant to be displayed at 60Hz anyway and AFAIK you can't even change that on Windows at least not without modifying i think.
    Are you 100% sure it does that also while playing movies/videos, did you test?

    EDIT just realize that the 60Hz screenshot size is 293KB vs 291KB for the 50Hz and 24Hz screenshots.

    Edited once, last by vitorp07 (March 29, 2017 at 11:48 PM).


  • BTW i do see what you mean, but the GUI was meant to be displayed at 60Hz anyway and AFAIK you can't even change that on Windows at least not without modifying i think.
    Are you 100% sure it does that also while playing movies/videos, did you test?

    Thank you for your answer and the screenshots.

    On Windows - yes, you cannot change resolution of your desktop if your monitor does not support that (most of the computer monitors and notebook screens are locked to 60Hz only). But we are talking about OpenELEC (linux) connected to a TV, which supports different refresh rates, isn't it? Or you have different setup?

  • My setup is no different, i do use LibreELEC with an HDTV as most people do.
    Most HDTV/UHDTV now supports 60Hz so i don't know why would someone not use that as it makes navigation in the GUI smoother.

    The real question here is, if it affects also playback of 24,25,30,50Hz video/movie when "adjust display refresh rate" is enabled.
    That i am interested to know.

    Edited once, last by vitorp07 (March 30, 2017 at 2:44 PM).


  • The real question here is, if it affects also playback of 24,25,30,50Hz video/movie when "adjust display refresh rate" is enabled.
    That i am interested to know.

    Yes it affects the video playback as well. At least for me. Otherwise it would not be a problem.
    But I don't see any black bars on your screenshots. You either did not switch the refresh rate at all, either you don't experience this issue.

  • I don't see black bars but from the screenshots you can tell that at 24 and 50Hz the entire picture and even the TV show's posters are a bit "stretched" compared to 60Hz

    Edited once, last by vitorp07 (March 30, 2017 at 4:57 PM).


  • I don't see black bars but from the screenshots you can tell that at 24 and 50Hz the entire picture and even the TV show's posters are a bit "stretched" compared to 60Hz

    I just installed LE 8.0.1. and checked again - the problem is still there!

    As for your screenshots: the issue cannot be seen in the menu screens, only during the video or picture playback. At this time refresh rate must be anything other than 60Hz.

    To check that please do the following:
    1a. If you have enabled "Adjust display refresh rate" option in settings, just play any content with frame rate other than 60fps, the LE will switch the refresh rate automatically and the issue will appear;
    1b. If this option is disabled in your settings, you have to change the default refresh rate manually to anything other than 60Hz (for example 50Hz) and play any content, no matter of fps;
    2. During the playback, capture the screenshot (Ctrl+S);
    3. Attach it here without modifications.

    Thank you in advance!
    [hr]
    Another test with few more screenshots:




    The.Avengers.2012.BDRip.1080p.GORENOISE.sample.mediainfo.txt

    The actual content of the screenshots captured at 23.976 Hz and 24 Hz is squeezed by 16 pixels (8 pixels from each size), but the playback controls are not. So the resolution itself is OK, only the content is displayed incorrectly.

    What's strange is that info panel shows resolution of the stream as 1920x1088 (ten eighty eight) for all refresh rates, while the actual video content is standard 1920x1080 (see the mediainfo output attached).

    This is really weird! And definitely is a bug. But need confirmation from other users. Seems that no one else noticed that because the squeeze is very subtle.

    Edited once, last by Teppopups (March 30, 2017 at 9:46 PM).

  • New screenshots with different refresh rates, i see the black bars on every one of them except 60Hz.

    I did not notice that before because i was playing everything at 60Hz, i was interested in this now as this week i took the time to edit a custom xorg.conf so now i am using "Adjust display refresh rate".


  • New screenshots with different refresh rates, i see the black bars on every one of them except 60Hz.

    Thank you! That's what I wanted to see, so this is a common issue, not only on my setup. Now we need to realize how to fix it.

    Edited once, last by Teppopups (March 31, 2017 at 1:07 PM).

  • Hi All,

    Great news! I found where is the problem.

    The issue is caused by wrong default aspect ratios in the GUI configuration file (guisettings.xml). The file is located in /storage/.kodi/userdata/ directory (also is accessible through the samba share "Userdata"). All resolutions and refresh rates are described separately in the file, so the aspect ratios can be configured differently. By default, 1920x1080@60Hz mode has correct value, but others not. That's why we have black bars on the videos and the image is squeezed horizontally.

    To correct this, you have to edit the aspect ratio values in the guisettings.xml file for all required resolutions. I changed only 1920x1080 modes as I'm using only them.

    For example, for [email protected] mode, default aspect ratio was 1.009191, which is wrong:
    ---
    <resolution>
    <description>HDMI1: 1920x1080 @ 23.98Hz</description>
    <subtitles>1042</subtitles>
                <pixelratio>1.009191</pixelratio>
    <refreshrate>23.976080</refreshrate>
    <output>HDMI1</output>
    <xrandrid>0x10f</xrandrid>
    <overscan>
    <left>0</left>
    <top>0</top>
    <right>1920</right>
    <bottom>1080</bottom>
    </overscan>
    </resolution>
    ---
    You have to change this value to: 1.000000 for all standard square-pixel resolutions and refresh rates (for example 1920x1080, 1280x720).

    Best Regards,
    Tepp

    Edit:
    Seems that you need to stop the Kodi before modifying the file, otherwise it will revert back on restart:

    1. stop the Kodi, so it will write the config from memory to a file:
    # systemctl stop kodi

    2. edit the guisettings.xml file, then start the Kodi again so it will read the configuration:
    # systemctl start kodi

    3. verify if the file changes preserved after restart:
    # systemctl restart kodi

    It worked for me, even after several reboots the aspect is still correct: 1.000000

    Edited once, last by Teppopups (April 3, 2017 at 10:13 PM).


  • To correct this, you have to edit the aspect ratio values in the guisettings.xml file for all required resolutions. I changed only 1920x1080 modes as I'm using only them.

    Unfortunately changing the settings directly in the guisettings.xml file did not work for me, as it won't save the values i put in there and will always revert back to the wrong settings once a video is played or after a reboot.
    Also tried overriding these values with the advancedsettings.xml file but still no luck there, it won't override the guisettings.xml in this case.

    The only way to make it work here was to play a video file of every refresh rate which gives me the wrong aspect ratio, bring the OSD, go to video settings then "video calibration".

    From there i was able to change the wrong values of "pixel ratio", most of them where at 1.008 instead of 1.000.
    Doing it this way did change and saved these values in the guisettings.xml file, not to 1.000000 as i could only change up to 3 numbers after the decimal point but it is still very close and now these videos plays at 1920x1080 instead of 1904x1080 so all is good now.

    Thanks for sharing your findings
    [hr]

    @ozolli
    I guess you are having more luck than we did, on what kind of hardware you have LibreELEC installed on?

    Here is intel 4690s + Nvidia GTX 1070

    Edited once, last by vitorp07 (April 2, 2017 at 4:43 PM).

  • Hi vitorp07,

    Yes you also can modify aspect ratios from the GUI: manually switch one-by-one to all resolutions and refresh rates and set a correct aspect ratio in the Video Calibration window. This method is not precise, as will set only 3 digits after comma, that's why I recommend direct file modification. But it should be OK in case if the file method does not work for some reason.

    Edited once, last by Teppopups (April 3, 2017 at 10:10 PM).