Jellyfin: Difference between revisions

Makefu (talk | contribs)
m fix markup
Clarify the driver selection code block
Line 113: Line 113:
{ pkgs, lib,config, ... }:
{ pkgs, lib,config, ... }:
{
{
   # 1. enable vaapi on OS-level
   # Only set this if you're using intel-vaapi-driver (see below):
   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; };
     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
   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-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
       intel-ocl # generic OpenCL support, for all processors
       intel-vaapi-driver # For older processors. LIBVA_DRIVER_NAME=i965
 
       libva-vdpau-driver # Previously vaapiVdpau
      # 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


       # choose one of these two matching your CPU:
       # In addition, for newer processors (13th gen and higher), add this as well:
       intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
       intel-compute-runtime
       # OpenCL support for intel CPUs before 12th gen
        
       # see: https://github.com/NixOS/nixpkgs/issues/356535
       # ... while for older processors, add this (https://github.com/NixOS/nixpkgs/issues/356535):
       intel-compute-runtime-legacy1  
       intel-compute-runtime-legacy1  


       vpl-gpu-rt # QSV on 11th gen or newer
      # In addition once more, for newer processors (11th gen or newer), add this:
       # deprecated since NixOS unstable (25.11) and may not build at all
       vpl-gpu-rt
      intel-media-sdk # QSV up to 11th gen
 
      intel-ocl # OpenCL support
      # ... while for older processors, add this:
       intel-media-sdk # (note it's been deprecated since NixOS 25.11 and may not build anymore nowadays)
     ];
     ];
   };
   };


   # 2. do not forget to enable jellyfin
   # 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: [[Accelerated Video Playback]] and [[Intel Graphics]]
Related: [[Accelerated Video Playback]] and [[Intel Graphics]]


[[Category:Server]]
[[Category:Server]]
[[Category:Applications]]
[[Category:Applications]]
[[Category:Web Applications]]
[[Category:Web Applications]]