adjustrefreshrate advanced settings ignored (24hz for 25fps)
#1
I've come across the following issue while trying to watch 25 FPS content.

If I let XBMC change the refresh rate, it'll select 60hz for 25fps content and the video playback is really jerky. If I play back a 24fps file, xbmc will leave the refresh at 24hz and play it. If I set the desktop to 60hz, xbmc adjusts to 24hz for a 24fps file, but stays at 60hz for a 25fps file.

If I set my desktop refresh to 24hz, and disable "adjust refresh rate" options, the video is slowed to 24p and it plays smooth as butter. If I want to play 30/60FPS content I need to toggle the option between allowing xbmc control, or manually setting refresh to 24hz.

XBMC also doesn't look very nice when you're navigating at 24hz, I'd rather have it look super slick when I'm showing it off! Smile

I've attempted to set overrides in my advancedsettings.xml file like this:

<adjustrefreshrate>
<override>
<fpsmin>23</fpsmin>
<fpsmax>26</fpsmax>
<refresh>24</refresh>
</override>
</adjustrefreshrate>

However, they don't seem to do anything at all. The debug log shows
DEBUG: Resolution 1920x1080 @ 24.00 - Full Screen (12) not a very good match for fps 25.000 (weight: 0.040), trying 2:3 cadence
DEBUG: Resolution 1920x1080 @ 24.00 - Full Screen (12) not a very good match for fps 25.000 with 2:3 cadence (weight: 0.616), choosing 60 hertz
NOTICE: Display resolution ADJUST : 1920x1080 @ 60 - Full Screen (51) (weight: 0.200)

Is there any way to increase the weight of the match so that it will actually use 24hz for 25fps content? I'm assuming there's a predisposition in the software to weight that sort of change lightly since it would be better to jump up to something like 50hz. (which my display doesn't support) The other option is that these settings are being ignored, but the debug log shows them being parsed without error at the beginning.
Reply
#2
H bruor!

Just try the following lines in the advancedsettings.xml:

<advancedsettings>
<video>
<adjustrefreshrate>
<override>
<fps>25.000</fps>
<refresh>23.976</refresh>
</override>
</adjustrefreshrate>
</video>
</advancedsettings>

Maybe you have to try 24 instead of the 23.976 parameter.

Cheers spooky
Reply
#3
Thanks Spooky,

I gave what you suggested a shot and it didn't yield any results. The logs still show the same weighting and failure select 24hz as the proper refresh rate.

I've tested this both on windows and openelec and have exactly the same results. Also tested on Eden, and now the Frodo RC3
Reply
#4
So I did more testing. If I set the desktop refresh to 60hz, and load a 23.976 fps file it'll switch to 24hz and play it just fine. If I try to play a 25hz file it stays at 60hz regardless of my overrides.

debug logs for a 23.976 file, then 2 25fps files, SD/HD. What's weird is that it doesn't even seem to be trying to jump to a lower refresh.

14:03:32 T:3052 NOTICE: fps: 23.976024, pwidth: 1280, pheight: 720, dwidth: 1280, dheight: 720
14:03:32 T:3052 DEBUG: CDVDPlayerVideo::OutputPicture - change configuration. 1280x720. framerate: 23.98. format: DXVA
14:03:32 T:3052 NOTICE: Display resolution ADJUST : 1920x1080 @ 23.98 - Full Screen (59) (weight: 0.000)

14:04:10 T:3396 DEBUG: Resolution 1920x1080 @ 59.94 - Full Screen (55) not a very good match for fps 25.000 (weight: 0.199), trying 2:3 cadence
14:04:10 T:3396 DEBUG: Resolution 1920x1080 @ 59.94 - Full Screen (55) not a very good match for fps 25.000 with 2:3 cadence (weight: 0.041), choosing 60 hertz
14:04:10 T:3396 NOTICE: Display resolution ADJUST : 1920x1080 @ 60.00 - Full Screen (16) (weight: 0.200)

14:04:26 T:2328 DEBUG: Resolution 1920x1080 @ 59.94 - Full Screen (55) not a very good match for fps 25.000 (weight: 0.199), trying 2:3 cadence
14:04:26 T:2328 DEBUG: Resolution 1920x1080 @ 59.94 - Full Screen (55) not a very good match for fps 25.000 with 2:3 cadence (weight: 0.041), choosing 60 hertz
14:04:26 T:2328 NOTICE: Display resolution ADJUST : 1920x1080 @ 60.00 - Full Screen (16) (weight: 0.200)
Reply
#5
well, in my case i get jerky playback for 23.976 content, so i have to set the refreshrate to 24.000 Hz, because this is the only mode my tv supports.
But i also have 25fps files, so let me test them for your case with my setup. I will let you know later on if i had success.
Reply
#6
Hi!

I have tested to play a 25fps file at a refresh rate of 24.000 Hz and it played flawlessly.
(in the advancedsettings.xml: fps 25.000 and refresh 24.000)
A reason why it didnt work yet for you are probably the settings in the system/hardware menue.
Here are my ones:
"Use a fullscreen window rather than a true fullscreen" OFF
"Vertical blank sync" ALWAYS ENABLED

"Allow hardware acceleration" ON
"Adjust display refresh rate" ON
"Sync playback to display" ON
"A/V sync method" VIDEO CLOCK (RESAMPLE AUDIO)

Hope that helps

cheers spooky
Reply
#7
I'll have to test with the decimal point to 3 places for each.

Other than that our settings match exactly. I have found that turning off "adjust refresh rate" and setting the desktop to 24hz before launching xbmc forces xbmc to play flawlessly.

I will test tonight and report back, could you post a debug log for the playback case showing that it detects the refresh and uses it properly at all? I'm wondering if it's the way these Doctor Who espisodes are encoded or something since it spits out messages about playing the file with a 3:2 cadence etc. Reminds me of some old progressive scan deinterlaving voodoo.
Reply
#8
This is what my debug log says:

20:55:25 T:3668 NOTICE: Creating audio stream (codec id: 86017, channels: 2, sample rate: 48000, no pass-through)
20:55:25 T:1448 NOTICE: fps: 25.000000, pwidth: 512, pheight: 384, dwidth: 512, dheight: 384
20:55:25 T:1448 NOTICE: Display resolution ADJUST : 1920x1080 @ 24.00 - Full Screen (61) (weight: 0.040)

I really cant say whats going on with your setup because i also dont know whats wrong. There might be the possibility that your episodes are crappily encoded.
Do you have any chance to test a NATIVE 25fps file (which was recorded at that framerate)?


Reply
#9
The files I'm trying to play back are scene releases of Doctor Who. I haven't tried digging for any other content to test with the overrides. I'm going to try to match at 3 decimal places to see if it makes any difference.
Reply
#10
I'm having a similar problem 25fps content from the UK is playing at a 60hertz refresh rate in frodo. When i was using eden my modelines in my xorg.conf would force XBMC and my tv to switch to the proper 50hertz refresh rate but its seems my xorg.conf no-longer works in frodo. In XBMC I have these setting enabled

"Vertical blank sync" ALWAYS ENABLED
"Allow hardware acceleration" ON
"Adjust display refresh rate" ON
"Sync playback to display" ON
"A/V sync method" VIDEO CLOCK (RESAMPLE AUDIO)

Any help would be appreciated.

Code:
Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    Option         "DynamicTwinView" "False"
    Option         "NoFlip" "false"
    Option         "NoLogo" "true"
    Option         "ConnectToAcpid" "0"
    Option         "FlatPanelProperties" "Scaling = Native"
    Option         "ModeValidation" "NoVesaModes, NoXServerModes"
    Option         "HWCursor" "false"
    # To put Xorg in debug mode change "false" to "true" in the line below:
#    Option         "ModeDebug" "false"
    # To use a local edid.bin file uncomment the 4 lines below (change DFP-0 to match your card)
#    Option         "ConnectedMonitor" "DFP-0"
#    Option         "CustomEDID" "DFP-0:/storage/.config/edid.bin"
#    Option         "IgnoreEDID" "false"
     Option         "UseEDID" "true"
EndSection

Section "Monitor"
    Identifier     "Monitor"
    VendorName     "Unknown"
    ModelName      "Unknown"
#    HorizSync       28.0 - 33.0
#    VertRefresh     43.0 - 72.0
    
    Option "ExactModeTimingsDVI" "TRUE"
    HorizSync 31 - 82
    VertRefresh 57 - 63
    ModeLine "1920x1080@60p" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
    ModeLine "1920x1080@50p" 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
    ModeLine "1920x1080@24p" 74.16 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
    Modeline "1920x1080@23976" 74.23 1920 2560 2604 2752 1080 1084 1089 1125 +hsync +vsync
    ModeLine "1920x1080@25p" 74.25 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
    ModeLine "1920x1080@30p" 89.01 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
EndSection

Section "Screen"
    Identifier     "screen"
    Device         "nvidia"
    Monitor        "Monitor"
    DefaultDepth    24
#    Option         "ColorRange" "Full"
     Option         "ColorRange" "Limited"
#    Option         "ColorSpace" "RGB"
#     Option         "ColorSpace" "YCbCr444"
    SubSection     "Display"
        Depth       24
        Modes "1920x1080@23976" "1920x1080@24p" "1920x1080@50p" "1920x1080@60p" "1920x1080@25p" "1920x1080@30p"
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "false"
EndSection
Reply
#11
I figured this out after another attempt and the problem was rather simple.

In looking through the advancedsettings wiki entry I never noticed that the <adjustrefreshrate> needed to be wrapped in <video>

Once I added the video tags everything is working as expected. The logs show that the refresh is being overridden based on the framerate of the video and now 25fps and 30fps content are playing back as expected.
Reply

Logout Mark Read Team Forum Stats Members Help
adjustrefreshrate advanced settings ignored (24hz for 25fps)0