snapcrafters / obs-studio

This is a community-supported modified build of OBS Studio.
https://snapcraft.io/obs-studio
111 stars 37 forks source link

No VAAPI support for Comet Lake Intel Processores due to lack of iHD userspace driver beeing bundled #118

Closed PipeL1n3 closed 9 months ago

PipeL1n3 commented 3 years ago

Hello there,

I am just setting up an OBS environment on a Intel I3-1100 CPU based system. Host OS is CentOS8-stream. Using snap'ed obs-studio 27rc from the edge channel. It is working well but the i3 software encoding performance is real bad, so i liked to try to use the hardware based encoder within the intel cpu. so I set up vaapi support on the host OS and its working like a charm if i use a vanilla obs setup from the rpmfusion repo (which uses host libs and drivers). But using the snap'ed version it fails because its using the libs and drivers the snap brings with itself and the intel-media-driver (iHD_driver_video) is missing. I´ve tried integrate it by linking the .so file via mount --bind to the snap lib-dir, but there are further depencies which fail. Here the output from vainfo [pipe@server dri]$ vainfo libva info: VA-API version 1.11.0 libva info: User environment variable requested driver 'iHD' libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so libva info: Found init function __vaDriverInit_1_11 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.11 (libva 2.11.0) vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.1.3 () vainfo: Supported profile and entrypoints VAProfileNone : VAEntrypointVideoProc VAProfileNone : VAEntrypointStats VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264Main : VAEntrypointFEI VAProfileH264Main : VAEntrypointEncSliceLP VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264High : VAEntrypointFEI VAProfileH264High : VAEntrypointEncSliceLP VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointVLD VAProfileJPEGBaseline : VAEntrypointEncPicture VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointFEI VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP VAProfileVP8Version0_3 : VAEntrypointVLD VAProfileVP8Version0_3 : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointFEI VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointEncSlice VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointVLD

and the output from obs-studio.vainfo [pipe@server dri]$ obs-studio.vainfo libva info: VA-API version 1.7.0 libva info: User environment variable requested driver 'iHD' libva info: Trying to open /snap/obs-studio/1250/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: va_openDriver() returns -1 vaInitialize failed with error code -1 (unknown libva error),exit

I hope it will be integrated soon as the rpmfusion repo doesn´t have packages for the many plugins integrated to this snap, which i am in need. Always building them myself would be a real pain in the a**

P.S.: the bundled i965 driver won´t work for comet lake basend integrated GPUs i´ve also tried to using it: [pipe@server dri]$ obs-studio.vainfo libva info: VA-API version 1.7.0 libva info: User environment variable requested driver 'i965' libva info: Trying to open /snap/obs-studio/1250/usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so libva info: Found init function __vaDriverInit_1_6 libva error: /snap/obs-studio/1250/usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed libva info: va_openDriver() returns -1 vaInitialize failed with error code -1 (unknown libva error),exit

flexiondotorg commented 9 months ago

Fixed via #172 which is build using core22