umbrel-apps icon indicating copy to clipboard operation
umbrel-apps copied to clipboard

Add support for hardware-accelerated video decoding in Jellyfin server configuration

Open Knufle opened this issue 1 year ago • 3 comments

Context:

The current Docker Compose configuration for the Jellyfin server does not include hardware-accelerated video decoding capabilities. This feature is essential for improving media playback performance, especially for high-definition video streams, by leveraging GPU-based transcoding.

Proposed Changes:

Modify the docker-compose.yml to include the following device mappings:

  • /dev/dri: Enables Direct Rendering Infrastructure (DRI) for GPU access.
  • /dev/vcsm and /dev/vchiq: Facilitates GPU memory and communication, particularly for Raspberry Pi systems.
  • /dev/video10, /dev/video11, /dev/video12: Grants access to video device nodes for hardware-based video encoding/decoding.

The updated docker-compose.yml service configuration for the Jellyfin server would look like this:

version: "3.7"

services:
  app_proxy:
    environment:
      APP_HOST: jellyfin_server_1
      APP_PORT: 8096
      PROXY_AUTH_ADD: "false"

  server:
    image: linuxserver/jellyfin:10.10.3@sha256:97bb454710cc1d02ef2c750b57e4c4e9c6d2dbb3e849f405b37c5127f47b7d4c
    restart: on-failure
    hostname: "${DEVICE_HOSTNAME}"
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - ${APP_DATA_DIR}/data/config:/config
      - ${UMBREL_ROOT}/data/storage/downloads:/downloads
    ports:
      # Service auto-discovery
      - 7359:7359/udp
    devices:
      - /dev/dri:/dev/dri
      - /dev/vcsm:/dev/vcsm
      - /dev/vchiq:/dev/vchiq
      - /dev/video10:/dev/video10
      - /dev/video11:/dev/video11
      - /dev/video12:/dev/video12

Benefits:

  • Enables hardware-based transcoding for Jellyfin, reducing CPU usage.
  • Enhances performance during media playback, particularly for high-definition and 4K content.
  • Provides compatibility with GPUs and Raspberry Pi-specific hardware.

Steps to Validate:

  1. Update the docker-compose.yml file with the proposed changes.
  2. Deploy the updated Jellyfin container.
  3. Run docker exec <container_name> ls -l /dev/ to verify the container has access to the mapped devices.
  4. Check Jellyfin's playback settings and logs to confirm that hardware acceleration is enabled and functional.

Notes:

  • Ensure the host system has the appropriate GPU drivers installed and configured.
  • Additional Jellyfin configuration may be required to enable hardware acceleration in the application itself.

Knufle avatar Dec 29 '24 23:12 Knufle

Wondering why that is not a bigger problem for the community.. +1

mxwi avatar Mar 22 '25 10:03 mxwi

@mxwi Btw, I opened a PR in which this was discussed https://github.com/getumbrel/umbrel-apps/pull/2040

Knufle avatar Mar 22 '25 12:03 Knufle

Please soon, I've been waiting well over a year for this!

TowyTowy avatar Mar 23 '25 18:03 TowyTowy

Not that umbrelOS 1.5 has been released, what's the status of enabling hardware-accelerated video on Jellyfin?

dcampogiani avatar Nov 05 '25 12:11 dcampogiani

Hey @dcampogiani, thanks for the nudge! 👍

Hardware acceleration for jellyfin has been added in this PR: #3771

I tested it on an Umbrel Home, and it worked really nicely. ⏩

al-lac avatar Nov 05 '25 12:11 al-lac