Jellyfin: Difference between revisions
m fix markup |
Clarify the driver selection code block |
||
Line 113: | Line 113: | ||
{ pkgs, lib,config, ... }: | { pkgs, lib,config, ... }: | ||
{ | { | ||
# | # Only set this if you're using intel-vaapi-driver (see below): | ||
nixpkgs.config.packageOverrides = pkgs: { | nixpkgs.config.packageOverrides = pkgs: { | ||
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; | intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; | ||
}; | }; | ||
systemd.services.jellyfin.environment.LIBVA_DRIVER_NAME = "iHD"; # | |||
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; | systemd.services.jellyfin.environment.LIBVA_DRIVER_NAME = "iHD"; # or i965, see below | ||
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # ditto | |||
hardware.graphics = { | hardware.graphics = { | ||
enable = true; | enable = true; | ||
extraPackages = with pkgs; [ | extraPackages = with pkgs; [ | ||
intel- | intel-ocl # generic OpenCL support, for all processors | ||
intel- | |||
libva-vdpau-driver # | # For newer processors (Broadwell and higher, ca. 2014), use this paired with `LIBVA_DRIVER_NAME=iHD`: | ||
intel-media-driver | |||
# ... while for older processors, use these paired with `LIBVA_DRIVER_NAME=i965`: | |||
intel-vaapi-driver | |||
libva-vdpau-driver # aka vaapiVdpau | |||
# | # In addition, for newer processors (13th gen and higher), add this as well: | ||
intel-compute-runtime | intel-compute-runtime | ||
# | # ... while for older processors, add this (https://github.com/NixOS/nixpkgs/issues/356535): | ||
intel-compute-runtime-legacy1 | intel-compute-runtime-legacy1 | ||
vpl-gpu-rt # | # In addition once more, for newer processors (11th gen or newer), add this: | ||
# deprecated since NixOS | vpl-gpu-rt | ||
# ... while for older processors, add this: | |||
intel-media-sdk # (note it's been deprecated since NixOS 25.11 and may not build anymore nowadays) | |||
]; | ]; | ||
}; | }; | ||
# | # Of course, do not forget to enable Jellyfin: | ||
services.jellyfin.enable = true; | services.jellyfin.enable = true; | ||
} | } | ||
Line 162: | Line 170: | ||
==== VAAPI and Intel QSV on Arc GPU ==== | ==== VAAPI and Intel QSV on Arc 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"> | ||
Line 189: | Line 196: | ||
Note that if your system has an integrated GPU (one built into the CPU) and a discrete GPU, you may need to select the QSV device in the "Playback" settings. Otherwise the device may be picked at random and produce random results. You can use <code>intel_gpu_top -L</code> to identify the devices. | Note that if your system has an integrated GPU (one built into the CPU) and a discrete GPU, you may need to select the QSV device in the "Playback" settings. Otherwise the device may be picked at random and produce random results. You can use <code>intel_gpu_top -L</code> to identify the devices. | ||
Related: | Related: [[Accelerated Video Playback]] and [[Intel Graphics]] | ||
[[Category:Server]] | [[Category:Server]] | ||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Web Applications]] | [[Category:Web Applications]] |