Jump to content

Jellyfin: Difference between revisions

imported from old wiki
imported>Heartbeast42
(Add more detailed copy for how to install and configure nixos)
(imported from old wiki)
(5 intermediate revisions by 5 users not shown)
Line 7: Line 7:
<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
{
{
  services.jellyfin.enable = true;
   environment.systemPackages = [
   environment.systemPackages = [
     pkgs.jellyfin
     pkgs.jellyfin
Line 15: Line 16:
</syntaxHighlight>
</syntaxHighlight>


You'll also need to enable Jellyfin, e.g.
If you want more advanced configuration, use something like what's shown below and [https://search.nixos.org/options?query=jellyfin see the docs for more configuration options]
 
<code>services.Jellyfin.enable = true;</code>
 
Or for more advanced configuration use something like what's shown below and [https://search.nixos.org/options?query=jellyfin see the docs for more configuration options]


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 43: Line 40:
* Go to http://localhost:8096 if your setting this up on your primary computer or want to test your build locally.  
* Go to http://localhost:8096 if your setting this up on your primary computer or want to test your build locally.  
* If you're logging into a remote server, replace localhost with the ip address of the server.
* If you're logging into a remote server, replace localhost with the ip address of the server.
=== Allow Jellyfin to read external drives ===
You might encounter permission issues when you try to access external drives if you haven't configured anything else with the server yet. If you haven't explicitly set up a mounting configuration for your drives and instead have your desktop environment (e.g. GNOME or KDE) automatically mount it when you try accessing it via their file explorers, Jellyfin won't be able to access the drive. This is because the desktop environment mounts it to your user, while Jellyfin uses by default the "jellyfin" user.
The easiest way to allow it to see these external drives mounted is to change the service's user . Here is an example:
<syntaxhighlight lang="nix">
  services.jellyfin = {
    enable = true;
    openFirewall = true;
    user="yourusername";
  };
</syntaxhighlight>
If you have changed the user option after you have already installed Jellyfin, you have to change the permissions of the folder /var/lib/jellyfin via chown to the user you set it to by doing this:
<syntaxhighlight lang="nix">
  sudo chown -R /var/lib/jellyfin
</syntaxhighlight>
The alternative to this is to explicitly mount the drives via [[Filesystems]], but takes more effort to set up and requires every new drive you want plex to see to be explicitly declared, but allows more control in what Plex is allowed to see.
=== Intro Skipper plugin ===
If you install intro skipper plugin, it will not be able to display skip button in web interface. This is due to the plugin being unable to modify contents of files in nix store. To get around this you can make the changes yourself with this:
<syntaxhighlight lang="nix">
  nixpkgs.overlays = with pkgs; [
    (
      final: prev:
        {
          jellyfin-web = prev.jellyfin-web.overrideAttrs (finalAttrs: previousAttrs: {
            installPhase = ''
              runHook preInstall
              # this is the important line
              sed -i "s#</head>#<script src=\"configurationpage?name=skip-intro-button.js\"></script></head>#" dist/index.html
              mkdir -p $out/share
              cp -a dist $out/share/jellyfin-web
              runHook postInstall
            '';
          });
        }
    )
  ];
</syntaxhighlight>


== Hardware Transcoding ==
== Hardware Transcoding ==
Line 49: Line 92:
Source: https://jellyfin.org/docs/general/administration/hardware-acceleration.html
Source: https://jellyfin.org/docs/general/administration/hardware-acceleration.html


=== VAAPI ===
=== VAAPI and Intel QSV ===
VAAPI is often available on intel boards (Intel HD).
 
VAAPI and QSV is often available on platforms with Intel GPUs but need their corresponding packages in <code>hardware.opengl.extraPackages</code>.


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 63: Line 107:
     extraPackages = with pkgs; [
     extraPackages = with pkgs; [
       intel-media-driver
       intel-media-driver
       vaapiIntel
       intel-vaapi-driver # previously vaapiIntel
       vaapiVdpau
       vaapiVdpau
       libvdpau-va-gl
       libvdpau-va-gl
       intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
       intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
      vpl-gpu-rt # QSV on 11th gen or newer
      intel-media-sdk # QSV up to 11th gen
     ];
     ];
   };
   };
Line 75: Line 121:
</syntaxHighlight>
</syntaxHighlight>


Related:  [[Accelerated_Video_Playback]]
Related:  [[Accelerated_Video_Playback]] [[Intel_Graphics]]
 
[[Category:Server]]
[[Category:Applications]]