mpv icon indicating copy to clipboard operation
mpv copied to clipboard

vo: add --display-fps-limiter option

Open Dudemanguy opened this issue 1 year ago • 6 comments

On my end, it seems to be about the same as using --opengl-swapinterval=2 + --display-fps-override=30. But people with better monitors should test to make sure it actually works. Also, I'm pretty sure using this breaks interpolation so that's a gap item as well.

Dudemanguy avatar Aug 02 '24 02:08 Dudemanguy

When using a --video-sync=display-*, limit mpv's framerate to the detected display FPS. This can be combined with the --display-fps-override

This is already the case though? I'm not sure what this PR is doing. You can already use the display-fps-override option to achieve this

llyyr avatar Aug 02 '24 02:08 llyyr

I guess I should be more clear with the wording/naming here. --display-fps-override will indeed limit the fps, but in a vacuum it will probably not accomplish the desired result since it will stutter and look terrible. It's because the internal renderloop still requires that whatever fps you specify is actually accurate. You can combine it with something like --opengl-swapinterval=2 to trick mpv and smooth out playback.

This is like a generic --opengl-swapinterval except it's not limited to integers and you don't have to do the math/multiplications to get the desired result. i.e. --display-fps-override=30 + --display-fps-limiter will force the render loop to wait at a rate of at least 30hz.

Dudemanguy avatar Aug 02 '24 02:08 Dudemanguy

I get the intention but I don't think this works as intended. With --video-sync=display-resample --display-fps-limiter=yes --display-fps-override=48, I get more judder on a VRR display that supports a lower-end of 48Hz than any other combination of options you could possibly use in mpv.

llyyr avatar Aug 02 '24 04:08 llyyr

I think for this to work, we'll need to make a lot of assumptions about the display and the media.

I think we'll need an option to let the users specify the lower end of the VRR range of their displays, or detect it somehow. Then automatically set display-fps-override to media_fps * ceil(lower_vrr_end / media_fps).

edit: I implemented that locally and I still can't say it's better than just video-sync=audio + VRR

llyyr avatar Aug 02 '24 04:08 llyyr

In theory this should be at least equivalent to audio mode with VRR in terms of presentation (e.g. it should be a consistent targets fps that is constantly rendered). If it's not, I'm not sure what can be done.

Dudemanguy avatar Aug 02 '24 13:08 Dudemanguy

Seems to based on a fundamentally wrong premise anyway so closing.

Dudemanguy avatar Jan 24 '25 18:01 Dudemanguy