wang-bin / mdk-sdk

multimedia development kit. download:
https://sourceforge.net/projects/mdk-sdk/files/
270 stars 32 forks source link

No image on linux #114

Open pierrexn opened 1 year ago

pierrexn commented 1 year ago

I have some users on linux that have no image but audio when playing video files Ive attached the log, do you have an idea? log.txt

wang-bin commented 1 year ago

vaPutSurface failed, don't know the reason, have to read libva source code. what about using xcb_egl?

pierrexn commented 1 year ago

which var should i set for?

wang-bin commented 1 year ago

QT_XCB_GL_INTEGRATION=xcb_egl

pierrexn commented 1 year ago

it works with xcb_egl

wang-bin commented 1 year ago

I have bug reports from other users, and this error exists in other projects, for example https://bbs.archlinux.org/viewtopic.php?pid=2079443#p2079443

Seems vaPutSurface always fails for iHD_drv_video.so driver. This is the answer from intel https://github.com/intel/media-driver/issues/1406#issuecomment-1537688086 You can run xdpyinfo|grep DRI to see if DRI2 is supported. I think in your app you can first check DRI2 support, then enable xcb_egl if necessary.

pierrexn commented 1 year ago

ok thanks

wang-bin commented 12 months ago

I have tested vlc, kodi, gstream and mpv, none of them support 0-copy rendering in this case(glx instead of egl).

Now i provide a new solution in the latest sdk: texture from dri3 pixmap. It supports both x11 glx and egl. If vaPutSurface failed, dri3 pixmap will be tried. This requires video processing feature in libva driver, i.e. if vainfo -a |grep VideoProc is true, dri3 pixmap will work. I tested on an intel gpu which supports both iHD and i965 driver but none of these drivers supports vaPutSurface, run apt install intel-media-va-driver-non-free to install iHD driver fixes the issue with the latest sdk(opensource iHD driver from intel-media-va-driver lacks of VideoProc).