I came here searching for the fix to error: Failed to initialize MFX error I encountered when trying to use hardware-accelerated recording with OBS.
On 24.05, all I needed is to add onevpl-intel-gpu to hardware.opengl.extraPackages:
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
# https://nixos.wiki/wiki/Accelerated_Video_Playback
intel-media-driver # LIBVA_DRIVER_NAME=iHD
libvdpau-va-gl
# OpenCL filter support (hardware tonemapping and subtitle burn-in)
intel-compute-runtime
# To make OBS HW recording work
# https://discourse.nixos.org/t/trouble-getting-quicksync-to-work-with-jellyfin/42275
onevpl-intel-gpu
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Force intel-media-driver
Thank you for the hint!