iina icon indicating copy to clipboard operation
iina copied to clipboard

Add an option to match refresh rate in fullscreen

Open jesec opened this issue 3 years ago • 1 comments

Allow to switch to a matching refresh rate (if there is any) when the player goes fullscreen. This can eliminate stuttering, and, on some external displays, enable frame interpolation.

Bug: #3414

Match patterns:

[23.976, 47.952, 24, 48]
[29.97, 59.94, 30, 60]
[24, 48]
[25, 50]
[30, 60]

Screenshot:

image

For reference, refresh rates available in newer Mac and Pro Display XDR:

image

image

and certain external displays:

image

jesec avatar Oct 27 '21 10:10 jesec

I'm just another IINA user looking at PRs, but this is really cool! Sounds like it automatically adjusts the actual macOS system wide display settings to accommodate the video's frame rate and then restores it? Wish I had a monitor that supported something other than 30 and 60fps so I could actually try this out with 23.976 fps video. Though adjusting and restoring the display refresh rate would cause my screen to black out for ~3-5 seconds, but I imagine on the new M1 machines it happens instantly.

Have you compared this to just setting mpv's video-sync property to display-resample? I experienced stuttering due to the video/display mismatch, but setting video-sync=display-resample in my mpv.conf, which I have IINA load, has totally fixed it for me without noticeable side effects. I believe it works be slightly adjusting video/audio playback speed so that the video's frames align with the display refresh rate, though they're subtle enough I've never noticed the speed adjustments.

This PR is the proper solution, but I wonder if just having IINA default to use video-sync=display-resample would get 90% of the way there.

varenc avatar Nov 12 '21 22:11 varenc