Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPS problem in qt-opengl example #13

Closed
THMonster opened this issue Dec 7, 2017 · 3 comments
Closed

FPS problem in qt-opengl example #13

THMonster opened this issue Dec 7, 2017 · 3 comments

Comments

@THMonster
Copy link

In the example codes, the QOpenGLWidget updates at the same frequency as video's FPS.
When I use a QTImer to update it at fixed 60 FPS, the QOpenGLWidget also updates at the same frequency as the video's FPS. But after I paused the video, it works at 60 FPS.
I'm really puzzled by this phenomenon. How can I update the QOpenGLWidget at a fixed 60FPS?

@THMonster
Copy link
Author

I have solved this issue, just use:

        mpv::qt::set_option_variant(mpv, "display-fps", "60");
        mpv::qt::set_option_variant(mpv, "video-sync", "display-resample");

@ghost
Copy link

ghost commented Dec 8, 2017

It's not really clear what you want. The normal way to update the screen is by responding to the opengl-cb update callback. Without display-sync it will update whenever a new video frame needs to be shown, with display-sync it will request a redraw immediately (unless the video is paused).

@THMonster
Copy link
Author

@wm4 Because I want to draw some animation over every frames. If it doesn't update at 60 fps, animation won't be enough smooth.

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

No branches or pull requests

1 participant