Jellyfin: Difference between revisions
Tesar-tech (talk | contribs) adds info about transcoding error that are due to bad ownership. |
Technics303 (talk | contribs) No edit summary |
||
| Line 108: | Line 108: | ||
VAAPI and QSV is often available on platforms with Intel GPUs but need their corresponding packages in <code>hardware.graphics.extraPackages</code>. | VAAPI and QSV is often available on platforms with Intel GPUs but need their corresponding packages in <code>hardware.graphics.extraPackages</code>. | ||
You have to choose between <code>intel-vaapi-driver</code> (old driver for pre-Broadwell CPUs) and <code>intel-media-driver</code> depending of your CPU. | |||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
| Line 114: | Line 116: | ||
# 1. enable vaapi on OS-level | # 1. enable vaapi on OS-level | ||
nixpkgs.config.packageOverrides = pkgs: { | nixpkgs.config.packageOverrides = pkgs: { | ||
# Only set this if using intel-vaapi-driver | |||
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; | |||
}; | }; | ||
systemd.services.jellyfin.environment.LIBVA_DRIVER_NAME = "iHD"; # Or "i965" if using older driver | |||
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; # Same here | |||
hardware.graphics = { | hardware.graphics = { | ||
enable = true; | enable = true; | ||
extraPackages = with pkgs; [ | extraPackages = with pkgs; [ | ||
intel-media-driver | intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD | ||
intel-vaapi-driver | intel-vaapi-driver # For older processors. LIBVA_DRIVER_NAME=i965 | ||
vaapiVdpau | vaapiVdpau | ||
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in) | intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in) | ||
| Line 128: | Line 133: | ||
vpl-gpu-rt # QSV on 11th gen or newer | vpl-gpu-rt # QSV on 11th gen or newer | ||
intel-media-sdk # QSV up to 11th gen | intel-media-sdk # QSV up to 11th gen | ||
intel-ocl # OpenCL support | |||
]; | ]; | ||
}; | }; | ||
| Line 135: | Line 141: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
You can check supported vaapi profile supported by your CPU / driver with : <code>nix-shell -p libva-utils --run vainfo</code>. If | |||
You can check the OpenCL properties and devices available on the system with : <code>nix-shell -p clinfo --run clinfo </code>. If clinfo shows <code>Number of platforms 0</code> on the first line, OpenCL is not enabled or available. | |||
The command <code>intel_gpu_top</code>, provided by the <code>intel-gpu-tools</code> package is also useful to check the status of your intel GPU. | |||
If you want to use an Arc GPU for transcoding, you may need to override the ffmpeg version used by jellyfin to ensure that it is compiled with <code>vpl</code> and, potentially, <code>unfree</code>. An example to achieve this through [[Overlays|an overlay]]:<syntaxhighlight lang="nix"> | If you want to use an Arc GPU for transcoding, you may need to override the ffmpeg version used by jellyfin to ensure that it is compiled with <code>vpl</code> and, potentially, <code>unfree</code>. An example to achieve this through [[Overlays|an overlay]]:<syntaxhighlight lang="nix"> | ||