Blog · Part 2, Jellyfin in depth

Hardware transcoding: Intel Quick Sync, NVIDIA, AMD

Hand video conversion to the graphics hardware and one small server can serve several 4K streams at once. The Compose lines and settings for each brand.

When a device can’t play a file as it is, Jellyfin converts it while you watch. Without hardware help, that conversion runs on the processor and a single 4K film can max out a mini PC. With hardware help, the same job uses a few percent.

Tomorrow explains when transcoding happens and how to avoid it. Today makes sure that when it does happen, it’s cheap.

What you need

  • A supported GPU in the server (Day 3): an Intel processor with integrated graphics, an NVIDIA card, or an AMD GPU.
  • Jellyfin running in Docker on Linux (Day 6). Hardware transcoding doesn’t work in Docker on Windows or macOS.

1. Check the GPU is visible on the host

ls -l /dev/dri

You should see renderD128 (and card0 or card1). If /dev/dri doesn’t exist, the graphics driver isn’t loaded. Make sure integrated graphics is enabled in the BIOS, and on Debian install the firmware with sudo apt install firmware-misc-nonfree (on Ubuntu it’s already there), then reboot.

2. Find the render group’s ID

getent group render | cut -d: -f3

It prints a number, like 105 or 992. It’s different on every system, so don’t copy one from a guide.

3. Pass the GPU to Jellyfin

Add devices and group_add to the Jellyfin service in /opt/media-server/compose.yaml, using your number:

  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    user: 1000:1000
    group_add:
      - "105"   # your render group ID
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
    ports:
      - 8096:8096
      - 7359:7359/udp
    environment:
      - TZ=Europe/Paris
    volumes:
      - ./config/jellyfin:/config
      - ./cache/jellyfin:/cache
      - /data:/data
    restart: unless-stopped

Apply it:

docker compose up -d

4. Check Jellyfin can use it

docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128

A healthy result lists the driver (iHD on modern Intel) and a long list of profiles like VAProfileHEVCMain10. An error here means the device or group isn’t right; recheck steps 2 and 3.

5. Switch it on in Jellyfin

Dashboard → Playback → Transcoding:

  • Hardware acceleration: Intel QuickSync (QSV). Jellyfin’s docs prefer it over VA-API on any Intel GPU from Broadwell (5th gen) onwards. Use Video Acceleration API (VA-API) only on older chips.
  • Enable hardware decoding for: tick what your generation supports. For 7th gen Core and newer: H264, HEVC, MPEG2, VC1, VP8, VP9, HEVC 10bit, VP9 10bit. Add AV1 on 11th gen and newer. When unsure, the Jellyfin Intel page has a full table.
  • Enable hardware encoding: on.
  • Allow encoding in HEVC format: on if your clients support HEVC (all recent Apple devices do). It halves the bandwidth of a transcode for the same quality.
  • Enable tone mapping: on. This converts HDR films to normal colors when the screen can’t show HDR, instead of leaving them washed-out grey.

Save at the bottom of the page.

NVIDIA

NVIDIA needs two things on the host first: the proprietary NVIDIA driver, and the NVIDIA Container Toolkit, which lets containers use the card. Follow NVIDIA’s install guide for your distribution, then check with nvidia-smi on the host. Jellyfin 10.11 needs driver 520.56.06 or newer.

In the Compose file, instead of devices and group_add:

  jellyfin:
    # ...the rest as before
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

Run docker compose up -d, then check from inside the container:

docker exec -it jellyfin nvidia-smi

In Dashboard → Playback → Transcoding, choose Nvidia NVENC, tick the decoding formats your card supports (HEVC 10-bit needs a GTX 900-series “Maxwell 2nd gen” or newer for decoding, a GTX 10-series for encoding), and enable hardware encoding and tone mapping.

Consumer NVIDIA cards used to limit the number of simultaneous encodes; recent drivers raised that limit well beyond what a home server needs.

AMD

AMD GPUs use VA-API on Linux. The Compose lines are the same as Intel’s (devices and group_add with the render group). In the transcoding settings choose Video Acceleration API (VA-API). It works, but Jellyfin’s docs note that AMD’s encoders give lower quality at the same bitrate than Intel or NVIDIA.

Check it’s actually being used

  1. On a phone or browser, start a film and force a lower quality in the player’s settings (for example 720p, 4 Mbps). That makes Jellyfin transcode.
  2. Open Dashboard on another device. Under Active Devices, the stream shows its play method. Click the info icon: it should say Transcoding, and the video codec line should mention the hardware path.
  3. On the host, watch the GPU work:
    • Intel: sudo apt install intel-gpu-tools, then sudo intel_gpu_top. The “Video” bar moves.
    • NVIDIA: nvidia-smi shows a ffmpeg process.

Processor usage should stay low. If it jumps to 100%, the GPU isn’t being used: check the logs under Dashboard → Logs, the newest FFmpeg.Transcode file, for errors.

Common problems

“Permission denied” on /dev/dri/renderD128. The group_add number doesn’t match your system’s render group. Run step 2 again.

Playback fails only with tone mapping on. Tone mapping uses OpenCL on Intel. Newer Intel chips work out of the box with Jellyfin’s image; if yours doesn’t, try with tone mapping off to confirm, then check the Jellyfin docs for your generation.

AV1 or HEVC 10-bit fails. You ticked a format your chip can’t decode. Untick it and Jellyfin will fall back to the processor for that format only.

Use the GPU for trickplay too

With hardware acceleration on, Dashboard → Playback → Trickplay offers Enable hardware decoding and Enable hardware accelerated MJPEG encoding. Tick both, and trickplay generation (Day 8) becomes several times faster.

Tomorrow: why transcoding happens at all, and how to store files so most devices never need it.

Use these tools with media you own or are authorized to use, and with public-domain works. Medusa does not host, provide, or stream any media of its own.