Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Knufle opened this issue Dec 29, 2024 · 0 comments

Comments

@Knufle
Copy link

Knufle commented Dec 29, 2024

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant