Open badgerkin opened 5 years ago
This is an mpv issue. opengl-cb
nor libmpv
work (correctly or only sometimes) with vaapi (native, non copy) only nvdec (/cuda) or vdpau work.
I already opened an issue on the mpv repository addressing this .... but no response yet. (well I opened it in December 2018)
https://github.com/mpv-player/mpv/issues/6353
But you were able to use it??????? just by editing the OpenGLDetect.cpp
file?
But you were able to use it??????? just by editing the
OpenGLDetect.cpp
file?
Yes. Actually it's sufficient for me to run QT_XCB_GL_INTEGRATION=xcb_egl plexmediaplayer
. Then ctrl-shift-D shows Hardware Decoding: vaapi (vaapi-egl)
while playing back video.
Well, that is amazing, never thought that vaapi
would work somehow.
And how do you execute the command?
Could you please try it with the libmpv patch (https://github.com/plexinc/plex-media-player/pull/727)? :)
I'm running QT_XCB_GL_INTEGRATION=xcb_egl plexmediaplayer --tv
from a bash prompt (in xfce4-terminal). plexmediaplayer
resolves to /usr/bin/plexmedia
and loads /usr/lib/libmpv.so.1
from the arch package mpv 1:0.29.1-6
.
I obtain the same result after applying #727.
Amazing, it really works. That´s unbelievable. Thank you so much!!! First time I tried it, it gave me an error, that´s why I asked how the command is executed... it was just a typo on my side ... ^^
So now how should "we" proceed with this?
@badgerkin thanks for your time + input.
To be honest, I'm having a little trouble telling if you're reporting an issue or proposing a fix. If the latter would you like to PR the change? Either way it'd be great if @rcombs could weigh in.
This is a bug report.
The workaround can't be applied in the general case, where the xcb-glx binding may be preferred. On an ubuntu box with nvidia nonfree graphics, for example, pmp starts to a black screen if I set QT_XCB_GL_INTEGRATION=xcb_egl
. It'd be nice if pmp could determine which to use at runtime.
On systems that support vaapi-egl, detectOpenGLEarly()
should set the egl backend, but doesn't because probeHwdecInterop()
returns a null QString from line 54.
Any movement on this bug? Without setting the environment variable, vaapi hardware decoding doesn't work on my XPS 13 9300 with Intel Iris Plus graphics running Linux Mint 20.
Is my issue similar to this one?
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_VERSION='4.6 (Compatibility Profile) Mesa 21.2.5'
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Detected desktop OpenGL 4.6.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_VENDOR='Intel'
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_RENDERER='Mesa Intel(R) UHD Graphics 620 (KBL GT2)'
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_SHADING_LANGUAGE_VERSION='4.60'
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_*_swap_control extension missing.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Testing FBO format rgba16f
2021-11-19 15:41:26 [ ERROR ] PlayerComponent.cpp @ 604 - libmpv_render: after creating texture: OpenGL error INVALID_OPERATION.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Using FBO format rgba16f.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: No advanced processing required. Enabling dumb mode.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading hwdec driver 'vaapi-egl'
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading failed.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading hwdec driver 'cuda-nvdec'
2021-11-19 15:41:26 [ ERROR ] PlayerComponent.cpp @ 604 - libmpv_render/cuda-nvdec: cu->cuInit(0) failed -> CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2021-11-19 15:41:26 [ ERROR ] PlayerComponent.cpp @ 604 - libmpv_render/cuda-nvdec: cu->cuCtxPopCurrent(&dummy) failed -> CUDA_ERROR_NOT_INITIALIZED: initialization error
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading failed.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading hwdec driver 'vdpau-glx'
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading failed.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading hwdec driver 'drmprime-drm'
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render/drmprime-drm: Failed to retrieve DRM fd from native display.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading failed.
2021-11-19 15:41:26 [ DEBUG ] PlayerComponent.cpp @ 598 - cplayer: Set property: audio-device="auto" -> 1
2021-11-19 15:41:27 [ DEBUG ] Log.cpp @ 29 - "qrc:/ui/webview.qml:166:onLoadingChanged: WebEngineLoadRequest starting: file:///tmp/.mount_Plex_Mo14Y7s/usr/bin/web-client/tv/index.html"
That is when I had QT_XCB_GL_INTEGRATION=xcb_egl
set.
Without it:
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_VERSION='4.6 (Compatibility Profile) Mesa 21.2.5'
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Detected desktop OpenGL 4.6.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_VENDOR='Intel'
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_RENDERER='Mesa Intel(R) UHD Graphics 620 (KBL GT2)'
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_SHADING_LANGUAGE_VERSION='4.60'
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: GL_*_swap_control extension missing.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Testing FBO format rgba16f
2021-11-19 15:37:18 [ ERROR ] PlayerComponent.cpp @ 604 - libmpv_render: after creating texture: OpenGL error INVALID_OPERATION.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Using FBO format rgba16f.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: No advanced processing required. Enabling dumb mode.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading hwdec driver 'vaapi-egl'
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading failed.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading hwdec driver 'cuda-nvdec'
2021-11-19 15:37:18 [ ERROR ] PlayerComponent.cpp @ 604 - libmpv_render/cuda-nvdec: cu->cuInit(0) failed -> CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2021-11-19 15:37:18 [ ERROR ] PlayerComponent.cpp @ 604 - libmpv_render/cuda-nvdec: cu->cuCtxPopCurrent(&dummy) failed -> CUDA_ERROR_NOT_INITIALIZED: initialization error
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading failed.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading hwdec driver 'vdpau-glx'
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading failed.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading hwdec driver 'drmprime-drm'
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render/drmprime-drm: Failed to retrieve DRM fd from native display.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - libmpv_render: Loading failed.
2021-11-19 15:37:18 [ DEBUG ] PlayerComponent.cpp @ 598 - cplayer: Set property: audio-device="auto" -> 1
PMS Version: 1.15.4.993 PMP Version: 2.33.1.dev-c4087ea7 Platform:
$(uname -r) = 5.0.10-arch1-1-ARCH
,gpu = Intel HD Graphics 3000
Hardware decoding functions using
vaapi-copy
instead ofvaapi
whenvo=opengl-cb
(default). Playback taxes CPU more than necessary.Steps to reproduce
(non working):
makepkg -Csi
(working):
if (probeHwdecInterop() == "vaapi-egl")
fromOpenGLDetect.cpp
(doqputenv()
regardless)makepkg -efi
Current behavior (log)
Expected behavior (log)