Add support for hardware-accelerated video decoding in Jellyfin server configuration
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/vcsmand/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:
- Update the
docker-compose.ymlfile with the proposed changes. - Deploy the updated Jellyfin container.
- Run
docker exec <container_name> ls -l /dev/to verify the container has access to the mapped devices. - 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.
Wondering why that is not a bigger problem for the community.. +1
@mxwi Btw, I opened a PR in which this was discussed https://github.com/getumbrel/umbrel-apps/pull/2040
Please soon, I've been waiting well over a year for this!
Not that umbrelOS 1.5 has been released, what's the status of enabling hardware-accelerated video on Jellyfin?
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. ⏩