Win Problem with "Adjust display refresh rate to match video"
#1
Smile 
Hi to all here, first of all, I´m new to Kodi and this forum.
I use Kodi with a projector, the refresh rate changer of Kodi is working, but not 100% perfect, maybe someone here knows a solution / workaround.
I live in PAL area and watch PAL movies as well as other formats. So I configured with CRU utility all necessary refresh rates within Windows for playback all kind of movies with different framerates. So I have 4 refresh rate settings:

47.952 Hz = 2 * 23.976 fps called 48 Hz in Windows (for not-PAL movies)
50.000 Hz = 2 * 25.000 fps called 50 Hz in Windows (for PAL movies)
59.940 Hz = 2 * 29.970 fps called 60 Hz in Windows (for NTSC material)
72.000 Hz = 3 * 24.000 fps called 72 Hz in Windows (for exact 24p movies)

I had to implement the 72 Hz setting because Windows can´t distinguish between a 47.952 Hz and a 48.000 Hz setting, they show up only as one 48 Hz setting.

Problem: Kodi takes the 72 Hz setting for 23.976fps movies. Obviously Kodi takes the highest matching refresh rate when rounded. If Kodi would look "into" the refresh rate setting (not just using the Windows name) it would detect that the 72Hz settting is a multiple of 24fps and the 48 Hz setting is a multiple of 23.976fps.
My workaround so far is the following: I deleted the 72 Hz setting so Kodi is working for 23,976fps, 25.000fps and 29.97fps movies. 24.000fps is not the rule but there are movies with this framerate. If I watch one of these I have to reimplement the 72Hz setting before watching a movie.
Other solution would be to deactivate the refresh rate changer of Kodi, determine the movie framerate and switch manually the appropiate refresh rate. That would then be the case for every movie.

Maybe you have some thoughts on this topic.
Thanks, Hannes. Smile
Reply
#2
You can tell Kodi what refresh rate to choose based on the material you are playing by using the <adjustrefreshrate> tag in advancedsettings.xml.

For example, my AVR can do 50Hz but my TV cannot, so I get audio with a blank screen. So I have set the above tag to force 25 fps material to use 60Hz. The correct refresh rate gets selected on the TV, and only 25 fps material gets the override.
HP Stream Mini w/Libreelec -> HDMI -> Toshiba 37"
Intel NUC8i3BEH w/Libreelec -> HDMI -> LG OLED55C3PUA -> S/PDIF -> Sony HT-CT80
Dell Optiplex 7050 Micro w/Libreelec -> HDMI -> Yamaha RX-V467 -> HDMI -> Toshiba 47L7200U
Reply
#3
Hello Jogee,
thanks for your reply. Didn´t realize the existence of advancedsettings.xml, so many thanks for the hint.
Maybe I did something wrong, it still doesn´t work as intended.
I filled the advancedsettings.xml and put it in C:\\User\MyName\AppData\Roaming\Kodi.
Kodi seems to find the file, the logfile says:

09:50:12 T:848 NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
09:50:12 T:848 NOTICE: Loaded settings file from special://profile/advancedsettings.xml
09:50:12 T:848 NOTICE: Contents of special://profile/advancedsettings.xml are...
<advancedsettings>
<adjustrefreshrate>
<override>
<fpsmin>23.50</fpsmin>
<fpsmax>23.99</fpsmax>
<refreshmin>47.9</refreshmin>
<refreshmax>48.1</refreshmax>
</override>
<override>
<fpsmin>24.00</fpsmin>
<fpsmax>24.50</fpsmax>
<refreshmin>71.9</refreshmin>
<refreshmax>72.1</refreshmax>
</override>
<override>
<fpsmin>24.51</fpsmin>
<fpsmax>25.50</fpsmax>
<refreshmin>49.0</refreshmin>
<refreshmax>51.0</refreshmax>
</override>
<override>
<fpsmin>29.90</fpsmin>
<fpsmax>30.10</fpsmax>
<refreshmin>59.90</refreshmin>
<refreshmax>59.99</refreshmax>
</override>
<fallback>
<refreshmin>49.0</refreshmin>
<refreshmax>51.0</refreshmax>
</fallback>
</adjustrefreshrate>
</advancedsettings>

My refresh settings are recognized, logfile says:

09:50:13 T:848 NOTICE: Found screen: PnP-Monitor (Standard) on AMD Radeon R7 200 Series, adapter 0.
09:50:13 T:848 NOTICE: Primary mode: 1280x720@ 60.00 - Full Screen
09:50:13 T:848 NOTICE: Additional mode: 640x480@ 48.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 640x480@ 50.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 640x480@ 72.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 720x480@ 48.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 720x480@ 50.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 720x480@ 72.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 720x576@ 48.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 720x576@ 50.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 720x576@ 60.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 720x576@ 72.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 800x600@ 50.00 - Full Screen
09:50:13 T:848 NOTICE: Previous line repeats 2 times.
09:50:13 T:848 NOTICE: Additional mode: 1152x648@ 50.00 - Full Screen
09:50:13 T:848 NOTICE: Additional mode: 1280x720@ 48.00 - Full Screen
09:50:13 T:848 NOTICE: Additional mode: 1280x720@ 50.00 - Full Screen
09:50:13 T:848 NOTICE: Additional mode: 1280x720@ 60.00 - Full Screen
09:50:13 T:848 NOTICE: Additional mode: 1280x720@ 59.94 - Full Screen
09:50:13 T:848 NOTICE: Additional mode: 1280x720@ 72.00 - Full Screen
09:50:13 T:848 NOTICE: Checking resolution 16

I opened a 23.976fps movie and I get this (logfile says this and it is confirmed as the setting that was really taken):

09:52:11 T:3000 NOTICE: fps: 23.976024, pwidth: 1280, pheight: 544, dwidth: 1280, dheight: 544
09:52:11 T:3000 NOTICE: Display resolution ADJUST : 1280x720@ 72.00 - Full Screen (32) (weight: 0.001)

I have no clue why this override doesn´t work:

<override>
<fpsmin>23.50</fpsmin>
<fpsmax>23.99</fpsmax>
<refreshmin>47.9</refreshmin>
<refreshmax>48.1</refreshmax>
</override>

The movie has a framerate of 23.976024fps reported and there exists a refresh rate of 48Hz ( Additional mode: 1280x720@ 48.00 - Full Screen). But this setting is not taken, instead the wrong 72Hz setting.

I don´t think the implementation of Kodi´s advancedsettings is wrong, there must be a mistake I made I think.
Maybe you have another helpful hint for me Smile
Hannes.
Reply
#4
A couple of things to double check first, based on the log snippet you provided.

Put advancedsettings.xml in the folder %APPDATA%\kodi\userdata (C:\Users\username\MyName\Roaming\Kodi\userdata). Looks like you didn't put it down far enough. The log says it can't find the file, so this is why your overrides don't work. This would be consistent with the file not being in the correct directory. Double check the advancedsettings.xml wiki link I posted above and see the bit at the top in yellow.

Also, be sure you have turned off the option in windows to hide file extensions of known type. When file extensions are hidden you can easily get screwed up when creating the text file. You'll end up getting a file actually called advancedsettings.xml.txt. But as the .txt is hidden you'll miss it, and Kodi will ignore it as it's not the correct filename.

Also, you have to include the <adjustrefreshrate> inside a <video> tag. I.e. anything in the advancedsettings.xml wiki section 2.2.3 has to be within a <video> tag. Here is mine as an example, which has an override for 25fps material only and lets Kodi determine the rest, including the fallback if nothing matches my override:
Code:
<advancedsettings>
<video>
<adjustrefreshrate>
  <override>
   <fps>25</fps>
   <refreshmin>59.9</refreshmin>
   <refreshmax>60.1</refreshmax>
  </override>
</adjustrefreshrate>
</video>
</advancedsettings>

I would like to suggest to you to remove the fallback bit from your code so that Kodi can select a best match. It should never come to that as you've defined pretty much everything, but it will keep you out of trouble if something does go wrong and give you a pretty good match.

Finally, triple check everything in your video display chain (video card, audio/video receiver, projector, etc.) can do the refresh rates you are trying. You've done this already as it appears that your windows desktop displays them correctly. But it's a good reminder for others reading along or finding this later.

Be sure to get back to us with your results.
HP Stream Mini w/Libreelec -> HDMI -> Toshiba 37"
Intel NUC8i3BEH w/Libreelec -> HDMI -> LG OLED55C3PUA -> S/PDIF -> Sony HT-CT80
Dell Optiplex 7050 Micro w/Libreelec -> HDMI -> Yamaha RX-V467 -> HDMI -> Toshiba 47L7200U
Reply
#5
Why cant you use kodi defaults and just use 24hz and 23.976hz. There is no benefit whatsoever at running 47.xxx and 72hz.
Reply
#6
@Jogee
Problem found, thanks to your hints:
The advancedsettings.xml file had the right extension and was in the right folder. Problem was the missing <video>-tags. I added the tags and now it is working as intended. Many thanks for that!

@Soli
A little bit complicated but I try to explain:
I have a projector which accepts refresh rates from circa 30Hz up to 75 Hz. I want to playback every possible framerate of the video-world judder-free with no dropped or repeated frames within a normal movie time. So the refresh rate has to be very accurate and the deviation of the audio and video clock in the playback chain has to be taken into account. I made 4 custom resolutions by using CRU utilty which uses EDID overrides. I need 4 refresh rates for playing back 23.976fps, 24.000fps, 25.000fps and 29.970fps. I have test samples of all of these framerates. By using MPC-HC with madvr renderer I loaded these samples and madvr shows the clock deviation in %. By using a calculator for video timings I got the right settings for each framerate to fill the video timings in CRU utility. Concerning 23.976fps and 24.000fps I land in the refreshrate = 2 * fps - region with refreshrates of 47.95190 Hz for 23.976fps and 47.99990 Hz for 24.000fps. If I create these two refresh rates with CRU utility the operating system (Windows 7 64 bit in my case) doesn´t allow these two settings to co-exist; they "melt" into one setting called "48 Hz". My projector doesn´t accept the *1 settings, so 23.976 Hz or 24.000 Hz is not possible. So I implemented a *3 setting for 24.000fps and landed at 71.99985 Hz called "72 Hz" in Windows.
All my 4 refresh rate settings are accurate enough to playback movies with a duration >3h without a single dropped or repeated frame.
Now the problem is solved, Kodi switches correctly to all 4 different refresh rates automatically by using the advancedsettings.xml in a right manner.

Hannes. Smile Smile Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with "Adjust display refresh rate to match video"0