Jellyfin: Difference between revisions

m NVENC: Add more nvenc config details
Add section for how to identify the GPU to add to services.jellyfin.hardwareAcceleration.device
Line 145: Line 145:
<!--T:18-->
<!--T:18-->
Modern hardware often includes video acceleration capabilities that can significantly reduce CPU usage during transcoding. For detailed information, see the [https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/ official Jellyfin documentation].<ref name="jellyfin-hw">Jellyfin Documentation Team, "Hardware acceleration", Jellyfin Documentation, Accessed October 2025. https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/</ref>
Modern hardware often includes video acceleration capabilities that can significantly reduce CPU usage during transcoding. For detailed information, see the [https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/ official Jellyfin documentation].<ref name="jellyfin-hw">Jellyfin Documentation Team, "Hardware acceleration", Jellyfin Documentation, Accessed October 2025. https://jellyfin.org/docs/general/post-install/transcoding/hardware-acceleration/</ref>
==== GPU Identification ====
If a computer with multiple GPUs is being configured, such as a laptop with a discrete GPU, selecting the correct GPU by path may be difficult. The paths in question are at <code>/dev/dri</code>. There will be several entries within this directory:
* <code>/dev/dri/card*</code>
: 2D graphics accelerators, these are not relevant to Jellyfin.
* <code>/dev/dri/renderD*</code>
: 3D graphics accelerators. These are what Jellyfin uses. Often <code>/dev/dri/renderD128</code> and sequentially increasing from there.
* <code>/dev/dri/by-path</code>
: A directory that contains symlinks to the above devices, but with their PCI bus IDs. This will be used for identification.
To identify, run <code>lspci</code>. This will most likely need to be downloaded, and is included in the package [https://search.nixos.org/packages?channel=unstable&query=lspci#show=pciutils pciutils]. This will show all devices on the PCI bus. For example:
{{code|lang=text|line=no|
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 05)
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 05)
00:02.0 VGA compatible controller: Intel Corporation Kaby Lake-H GT2 [HD Graphics 630] (rev 04)
00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem (rev 31)
00:15.0 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #0 (rev 31)
00:15.1 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Serial IO I2C Controller #1 (rev 31)
00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31)
00:17.0 SATA controller: Intel Corporation HM170/QM170 Chipset SATA Controller [AHCI Mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #3 (rev f1)
00:1c.3 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #4 (rev f1)
00:1f.0 ISA bridge: Intel Corporation HM175 Chipset LPC/eSPI Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31)
00:1f.3 Audio device: Intel Corporation HM175/QM175/CM238 HD Audio Controller (rev 31)
00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31)
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
02:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01)
03:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller (rev 12)
}}
The beginning of each line denotes the device's PCI bus ID. Note this for the GPU desired, and add this device to your Jellyfin configuration via the <code>/dev/dri/by-path</code> directory. In this example, the Nvidia 1060M is added to the config. It can also be added to the config by inspecting the <code>by-path</code> symlink with <code>realpath</code> and using the canonical path.
{{code|1={
  services.jellyfin = {
    enable = true;
    hardwareAcceleration = {
      enable = true;
      type = "nvenc";
      device = "/dev/dri/by-path/pci-0000:01:00.0-render";
    };
}|lang=nix}}


==== NVENC ====
==== NVENC ====