Skip to content

Conversation

@tsukinaha
Copy link

@tsukinaha tsukinaha commented Sep 29, 2024

According to the documentation, setting video-timing-offset to 0 prevents blocking during render updates.
This has a noticeable effect on improving the software frame rate on wayland.

photo_2024-09-29_07-52-03

@gnome-mpv
Copy link
Collaborator

I'm not sure this should be the default. Wouldn't it make frame timings worse in some cases?

@tsukinaha
Copy link
Author

I'm not sure this should be the default. Wouldn't it make frame timings worse in some cases?

By default, the render update callback blocks the UI thread for 0.05 seconds during rendering. We really shouldn’t be blocking the UI thread like that.

It works fine on my machine and even helps reduce frame drops. But you’re right, it probably does need more testing.

@Kimiblock
Copy link

Tested on a laptop with 240Hz screen. Celluloid went from under 60 FPS to 230-240 FPS.

@gnome-mpv
Copy link
Collaborator

After some more testing, I noticed that these options cause a small amount of AV desync (around 0.0002s). From my reading of the documentation, I think we're supposed to time the call mpv_render_context_render() ourselves to eliminate the desync. Once that's done, it should be okay to merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants