-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
hwdec=vaapi doesn't work with libmpv/render api #10424
Comments
What's the problem? Cases three and four are the only relevant ones and you say they are working correctly. |
They work, but I don't think they use vaapi.
|
You need to provide the relevant native resource from your application that the vaapi hwdec will use to initialise itself - either the X11 display or the Wayland WL display, most likely. See https://github.com/mpv-player/mpv/blob/master/video/out/gpu/libmpv_gpu.c#L26 |
I have added the needed info, at least I hope so (did the same as other players). But I still get the same
With mpv I get
|
I see now that you appear to be using the release 0.34.1. Please try again with mpv master. The logic for how hwdecs are loaded has changed significantly in master, and should help, or at least the expanded logging will help us understand what is going wrong. |
mpv version: mpv 0.34.0-378-g8ef744d1b7 hwdec=vaapi log: https://pastebin.com/NLjTu5hL |
Ok. So based on your logs, you are not using EGL, and presumably using GLX in your application. |
So that means the context I give to mpv_render_context_create (through mpv_opengl_init_params) is an glx one and I need to give it an egl context? |
I did a brief read of the Qt docs and it does not make clear what it's using underneath the OpenGL context. Some other discussions suggest it knows how to use GLX and EGL but I don't see an explanation of how it chooses. But to your question, there is an OpenGL context (and that's the one that Qt can give you) but underneath OpenGL you need to use a window system binding (WGL on windows, GLX on X11, EGL is crossplatform). When writing GL code directly, you will naturally pick one and know what you used. With Qt it's not clear. You'll need to dig and find out how to control this. |
Ok, thank you for the help, really appreciate it. |
So it's possible to use egl with Qt, need to set the environment variable QT_XCB_GL_INTEGRATION="xcb_egl". This doesn't work with mpv master (mpv 0.34.0-386-g284fecc0bd), but it does with mpv 0.34.1. In the 0.34.1 log I have this:
While in the master log I get:
|
You need to have |
That was it, thank you. |
I have a player based on the qml render api example.
My problem is that hwdec=vaapi doesn't seem to work. I have tested
hwdec=vaapi
with differentvo
and added logs for each case. On my system with an nvidia cardhwdec=nvdec
it seems to work (novo
set) logSame happens on an AMD system https://bugs.kde.org/show_bug.cgi?id=456482
Can someone clarify how hwdec is supposed to work with libmpv/render api? Is what the documentation says valid in this case too? Any ideas why vaapi doesn't work in my player?
CPU: Intel i5 2500K
GPU: Intel HD Graphics 3000
First case
Video plays in separate window. Log: https://pastebin.com/p3eG1cPu
Second case
Doesn't play. Log: https://pastebin.com/jmWSUX2w
Third case
Plays in correct window. Log: https://pastebin.com/E3cvNHKv
Fourth case, not setting
vo
hwdec=vaapi
Plays in correct window. Log: https://pastebin.com/7xRwWgba
The text was updated successfully, but these errors were encountered: