Is impossible to avoid occasional frame drop? (SOLVED)

  • Hi everyone..

    I recently joined to the list of libreelec users.. searching for the most perfect and smooth experience...

    My system is a PC equipped with AMD AMD A6 9500 E, Nvida GT710 and 4Gb Ram, Before, i was using kodi in linux mint, and because i was having occasional frame jumps i decided to go with libreelec, so far the migration is positive however, i cannot say i have 100% rock solid playback.

    Is very ocasional.. but still there.. i still can see very random frame jumps.. (my media is all mkv 1080p audio passthrough through spdif, played at 23,927 hz - fps in a 100inch screen wide with a projector) VDPAU video acceleration is on..Sync of play/stop ON, CPU% and mem load never goes above 20 %
    I have tried everything but no result so i wonder if it's something i have to deal with, at the end we are talking about computers with very different components.. videos from many different sources... etc maybe the problem is in the spdif passtrhough? I think when it's off y goes better but can't assure is still 100% smooth during the playblack of the full movie.

    So.. questions are.. do you have perfect smooth play? do you know anything i can do to improve experience?

    Please.. before you say i play perfectly smooth... ask yourself if you are really picky about this, i know by experience most of people would not see the difference between playng 24p content at 24hz or 30 hz

    I attach my kodi log ( not debug) if it helps... this is just a 1st post if someone comes with a quick idea..
    Kodi Log.txt

    Thanks

  • Two Three things for now...

    - Your log file does not show any 'problem video' being rendered.

    - Your attached harddrive mentions Anime movies. Such movies tend to have the h264/10bit format, which is an a-typical video combination. Not every GPU handles that equally well

    - Have you tried switching the Sync playback to display option on and off? (I didn't know a GT710 could do 4K60...)

  • Well, movies with the problem i mention are not only the ones in Anime Folder..they are standard h.264. non hdr.

    i don't play 4K.. just 1080p for now, and as far as i know.. sync playblack to display disables spdif passthrough what is a must for me. But will try it anyways to see if it improves antything

  • I didn't mention hdr, I doubt the GT710 can handle that, and I only noticed that Kodi's GUI is running at 4K60.

    But a problem movie with some details in the log file would be nice.

  • Code
    2021-11-15 08:44:19     INFO <general>: ID:0x1ec Name:4096x2160 Refresh:23.975760 Width:4096 Height:2160
    2021-11-15 08:44:19     INFO <general>: ID:0x1f9 Name:1920x1080 Refresh:23.977369 Width:1920 Height:1080

    The Kodi log shows that your 23.976 modes are not accurate (23.976025 is the target) so frame drops will be needed to keep in-sync.

    Way back in time (before LibreELEC, in OpenELEC days) when I maintained the AppleTV image (which had an nVidia GPU) I used to see similar things. I discovered the nVidia driver *never* gives correct modes from the EDID data, and I have fuzzy memory on reading somewhere that this is caused by nVidia having their own way of calculating things that's different from everyone else (I forget details, but this sounds exactly like something nVidia would do). Anyway, I discovered that Xorg uses modelines that with the base frequency defined at one or two decimal places, but the maximum supported is four. So with a custom /storage/.config/xorg.conf deployed it was possible to set manual modelines (based on the actual ones captured with Xorg iin debug mode) but tweak the frequencies a little to make the modelines more accurate. It was never possible to get them 100% but the difference became small enough that I never noticed the frame drops when they did occur.

    This is the custom xorg.conf file for the Samsung TV that I was using back then: https://chewitt.libreelec.tv/xorg.chewitt - the Device section probably has options set that are specific to AppleTVs, but the Monitor and Screen sections show how I added custom modelines.

    NB: No guarantees this resolves the issue .. and LE11 will not use Xorg so even if it does, it's not a long-term thing.

  • Thanks for answering.

    For now i would be happy if i can fix the issue in LE10, for the future i will probably abandon HTPC philosophy and go for modern and simple hardware like the nvidia shield.

    I'm not an expert so i have to study deeper your conclussions... i don't want to annoy you asking every simple stuff, but as a start point i cannot find a proper xorg.conf file under Libreelec directory, There is just one under /usr/share/debugconf/ , but it comes empty.

    Translating to my own language what you said is: i can add custom modelines to that conf file to match as best as possible the refresh rate of my devices to the movies frame rate, because what comes by default taken from the edid data, is not accurate?.

    Edited 2 times, last by Dozeros (November 15, 2021 at 5:52 PM).

  • Translating: I can add custom modelines to that conf file to match as best as possible the refresh rate of my devices to the movies frame rate, because what comes by default taken from the edid data is not accurate?

    Correct. Using more decimal places in the frequency value of the modeline can improve accuracy:

    Code
    ModeLine       "1920x1080_23.976" 74.1756 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync

    ^ The 74,1756 value uses four decimal places.

    The default conf for nVidia should be /etc/X11/xorg-nvidia.conf .. the override location is /storage/.config/xorg.conf

  • So you think i can add directly the modeline you wrote for a standard 1080p "acurated" 24fps refresh.?

    i read here and there that playing with edid files wrongly can damage monitor / screen so i'm a bit scared

  • Well following your posts i was able to make my own xorg.conf, i took chewitt's one as a template and made my own. So far i didn't broke anything.
    Was testing for 15 min and didn't see any frame skipping, i will know it for sure when i check a full movie.

    I actually discovered that there was no edid taken from the projector, no way to retrieve it so libreelec was using some kind of full standar range of resolutions and refresh rates, which i filtered at some moment with a white list inside kodi , however some of them where missing , like rounded 24hz (netflix series for example have this rate) thinking that my projector didn't support it, now it 's there thanks to that modeline configuration.

    The only data i was not sure to put there was the HorizSync & VertRefresh values so i put the ones from chewitt and it worked, however i tried a moment ago to dump the edid data with a windows laptop i have and a small utility i downloaded... and it worked!, so i will update my conf file with my own values.

    Thanks to all for the help... wonder why libreelec doesn't have some utility to config this through interface.. i think it's important stuff for those who like me.. are not code masters.

  • Wonder why libreelec doesn't have some utility to config this through interface..

    because every monitor or TV panel is different so it would be fiddly as arse to script (perhaps more than doing it manually) and the number of nVidia users has been declining for years so the need to do it has also reduced.

  • because every monitor or TV panel is different so it would be fiddly as arse to script (perhaps more than doing it manually) and the number of nVidia users has been declining for years so the need to do it has also reduced.

    I see.
    Yeah, defintely my bulky HTPC is a thing from the past... will extend just a bit more it's life until i do full migration to 4K.

  • ok, after watching a couple of movies i think i can mark this as solved.

    i think i still can see very very ocassional and small frame jumps, two or three in a full movie, but maybe it's just i'm obssesed with this right now,.

    if they are there it's just 1% of what it was before, probably becasue what is being said about sync impossible to be 100% accurate.

    thanks again for your help.