5.5 KiB
type, project, tags
| type | project | tags | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| guide | homelab |
|
🎬 Jellyfin GPU Hardware Acceleration (VA-API & QuickSync) Guide
This guide details how to configure, verify, and troubleshoot GPU hardware-accelerated video transcoding for Jellyfin running in Docker on NixOS and Linux hosts.
1. Overview & Architectural Context
When streaming media to clients that do not natively support a video codec, container, or bitrate, Jellyfin transcodes the stream on the fly. Without hardware acceleration, software transcoding runs on the CPU across all cores, causing high CPU load and potential thermal throttling on compact mini PCs.
GPU hardware acceleration offloads video decoding and encoding to dedicated on-die Application-Specific Integrated Circuits (ASICs) — such as AMD's Video Core Next (VCN) or Intel's QuickSync Video (QSV).
Device Nodes & Permission Architecture
- Direct Rendering Infrastructure (
/dev/dri):card0: DRM master node (modesetting and display output).renderD128: Unprivileged render node dedicated to offscreen compute, video decoding, and encoding.
- Host Group Permissions (
group_add: ["303"]):- Jellyfin executes as a non-root user (
PUID:PGID = 1000:1000). - On NixOS,
/dev/dri/renderD128is owned byroot:renderwith GID303(check viastat -c '%g' /dev/dri/renderD128). - Passing
group_add: ["303"]grants the unprivileged container process read/write access to the GPU render node without requiringprivileged: true.
- Jellyfin executes as a non-root user (
2. Docker Compose Configuration
In the Jellyfin application stack (~/Sites/homelab-jellyfin/docker-compose.yml), configure device passthrough and supplementary group membership:
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
environment:
- PUID=1000
- PGID=1000
- TZ=America/Chicago
devices:
- /dev/dri:/dev/dri
group_add:
- "303" # NixOS host render GID (use `stat -c '%g' /dev/dri/renderD128` on host)
volumes:
- ./config:/config
- ./cache:/cache
- /media:/media:ro
restart: unless-stopped
Note
On non-NixOS hosts (e.g. Debian/Ubuntu), the
rendergroup is typically GID107or110. Always verify the host GID before configuringgroup_add.
3. GPU Hardware Profiles & Codec Capabilities
AMD Radeon Graphics (e.g. Radeon 780M / Phoenix / RDNA3)
- Acceleration Framework: VA-API (Video Acceleration API)
- Render Device:
/dev/dri/renderD128 - Supported Hardware Codecs:
- H.264 / AVC: Decode & Encode
- HEVC / H.265 (8-bit & 10-bit): Decode & Encode
- VP9: Decode
- AV1: Decode & Encode (RDNA3 / Phoenix)
Intel Integrated Graphics (e.g. Intel N100 / N150 / Alder Lake-N)
- Acceleration Framework: Intel QuickSync (QSV) (Recommended) or VA-API
- Render Device:
/dev/dri/renderD128 - Supported Features:
- Low-Power H.264 / HEVC hardware encoder
- VPP Tone Mapping / OpenCL HDR-to-SDR conversion
- AV1 decode (Alder Lake-N)
4. Web Interface Configuration (Jellyfin Dashboard)
- Navigate to Admin Dashboard → Playback → Transcoding.
- Set Hardware acceleration:
- For AMD GPUs: Select VAAPI.
- For Intel GPUs: Select Intel QuickSync (QSV).
- Set VA-API / QSV Device:
/dev/dri/renderD128. - Under Enable hardware decoding for:
- Check H.264
- Check HEVC (8-bit & 10-bit)
- Check VP9
- Check AV1 (if supported by hardware)
- Check Enable Hardware Encoding.
- (Optional) Enable VPP Tone Mapping or Tone Mapping for HDR conversion.
- Click Save at the bottom of the page.
5. Verification & Diagnostics
A. Real-Time Playback Info Overlay
- Start playing any video in the Jellyfin web or desktop client.
- Manually force transcoding by selecting a lower quality (e.g., 720p - 4 Mbps).
- Click the Gear icon (Settings) in the player control bar and select Playback Info.
- Verify that:
Play method: TranscodeTranscode reason: Container bitrate exceeds limit or Audio/Video codec not supportedHardware encoding: vaapi or qsv
B. Transcoding Log Inspection
Inspect the FFmpeg transcode log files generated by the server:
- Open Admin Dashboard → Logs → select
FFmpeg.Transcode-*.log. - Verify the presence of hardware acceleration flags:
-hwaccel vaapi -hwaccel_output_format vaapi Stream #0:0: Video: h264 (h264_vaapi) - Ensure no fallback errors (
Device creation failedorPermission denied) appear.
C. Live GPU Telemetry & Monitoring
Important
Understanding Telemetry Tools & 0% GPU Misconception:
- Direct Play vs Transcode: When clients natively support the media format, Jellyfin streams the source file directly (
Play method: Direct Play). In this mode, GPU load is expected to be 0%.- 3D Engine vs VCN ASIC: Standard GPU monitoring tools like
radeontopmeasure 3D rendering pipeline usage (shaders, rasterizers). Video decode/encode occurs on dedicated Video Core Next (VCN) hardware blocks.
To monitor hardware transcoding engines:
- AMD Radeon: Run
amdgpu_top(monitors VCN decode/encode engines) or read/sys/class/drm/card0/device/gpu_busy_percent. - Intel iGPU: Run
intel_gpu_top(fromintel-gpu-tools) to monitor Video and VideoEnhance engine percentages.