Jellyfin: Difference between revisions

From NixOS Wiki
imported>Makefu
(init)
 
imported>Justinas
No edit summary
Line 27: Line 27:
       vaapiVdpau
       vaapiVdpau
       libvdpau-va-gl
       libvdpau-va-gl
      intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
     ];
     ];
   };
   };

Revision as of 20:37, 16 June 2022

Jellyfin is the volunteer-built media solution that puts you in control of your media. Stream to any device from your own server, with no strings attached.

Usage

services.jellyfin.enable = true;

Hardware Transcoding

In most cases you want to make most of your hardware. Modern boards often come with Hardware Accelerators, all you need to do is enable it!

Source: https://jellyfin.org/docs/general/administration/hardware-acceleration.html

VAAPI

VAAPI is often available on intel boards (Intel HD).

{ pkgs, lib,config, ... }:
{
  # 1. enable vaapi on OS-level
  nixpkgs.config.packageOverrides = pkgs: {
    vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
  };
  hardware.opengl = {
    enable = true;
    extraPackages = with pkgs; [
      intel-media-driver
      vaapiIntel
      vaapiVdpau
      libvdpau-va-gl
      intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
    ];
  };

  # 2. allow jellyfin user to access the graphics card
  users.users.${config.services.jellyfin.user}.extraGroups = [ "video" "render" ];

  # 3. override default hardening measure from NixOS
  systemd.services.jellyfin.serviceConfig.PrivateDevices = lib.mkForce false;
  systemd.services.jellyfin.serviceConfig.DeviceAllow = lib.mkForce [ "/dev/dri/renderD128" ];

  # 4. do not forget to enable jellyfin
  services.jellyfin.enable = true;
}

Related: Accelerated_Video_Playback