nvidia-docker --gpus does not transcode #1153

Closed
opened 2026-02-06 20:34:14 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Arcanum417 on GitHub (Dec 22, 2019).

Describe the bug
Hw encoding / decoding using nvidia GPU in docker does not work with nvidia-docker --gpus param.

To Reproduce

  1. Install GTX 960 in your rig (GPU with nvenc support)
  2. Install Arch (thats what I did I imagine this is not Arch issue)
  3. Inall nvidia package (nvdia drivers)
  4. verify GPU drivers with nvidia-smi
  5. Install docker
  6. Install nvidia-container-toolkit https://github.com/NVIDIA/nvidia-docker
  7. werify that works with docker run --gpus all nvidia/cuda:9.0-base nvidia-smi
  8. Place .mp4 x264 video in /root/test/test.mp4
  9. run docker run --volume /root/test:/test --gpus all jrottenberg/ffmpeg:4.1-nvidia -hwaccel cuvid -c:v h264_cuvid -i /test/test.mp4 -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow -f null - that works
  10. run
docker run -d \
--gpus all \
--volume /root/appdata:/config \
--volume /root/cache:/cache \
--volume /root/test:/media \
--net=host \
--restart=unless-stopped \
jellyfin/jellyfin
  1. Go to http://yourip:8086 and do firsttime setup, add /media to your library
  2. in playback settings enable hw transcode for nvenc enable all settings if your gpu supports it
  3. try to play the video, it error with no streams available, in logs :
[h264_cuvid @ 0x559195d65c80] Cannot load libnvcuvid.so.1
[h264_cuvid @ 0x559195d65c80] Failed loading nvcuvid.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Error while opening decoder for input stream #0:0 : Operation not permitted

Expected behavior
Video plays transcoded using GPU. nvidia-smi run on host shows the job.

Logs
https://gist.github.com/Arcanum417/612f20921336ab14f56489f67276fc51

System (please complete the following information):

  • OS: Arch
  • Browser: Chrome
  • Jellyfin Version: 10.4.3
  • Installed Plugins: None
  • Reverse proxy: no
Originally created by @Arcanum417 on GitHub (Dec 22, 2019). **Describe the bug** Hw encoding / decoding using nvidia GPU in docker does not work with nvidia-docker --gpus param. **To Reproduce** <!-- Steps to reproduce the behavior: --> 1. Install GTX 960 in your rig (GPU with nvenc support) 1. Install Arch (thats what I did I imagine this is not Arch issue) 1. Inall `nvidia` package (nvdia drivers) 1. verify GPU drivers with `nvidia-smi` 3. Install docker 2. Install nvidia-container-toolkit https://github.com/NVIDIA/nvidia-docker 3. werify that works with `docker run --gpus all nvidia/cuda:9.0-base nvidia-smi` 1. Place .mp4 x264 video in /root/test/test.mp4 2. run `docker run --volume /root/test:/test --gpus all jrottenberg/ffmpeg:4.1-nvidia -hwaccel cuvid -c:v h264_cuvid -i /test/test.mp4 -vf scale_npp=-1:720 -c:v h264_nvenc -preset slow -f null -` that works 3. run ``` docker run -d \ --gpus all \ --volume /root/appdata:/config \ --volume /root/cache:/cache \ --volume /root/test:/media \ --net=host \ --restart=unless-stopped \ jellyfin/jellyfin ``` 4. Go to http://yourip:8086 and do firsttime setup, add /media to your library 5. in playback settings enable hw transcode for nvenc enable all settings if your gpu supports it 6. try to play the video, it error with no streams available, in logs : ``` [h264_cuvid @ 0x559195d65c80] Cannot load libnvcuvid.so.1 [h264_cuvid @ 0x559195d65c80] Failed loading nvcuvid. Stream mapping: Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc)) Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame)) Error while opening decoder for input stream #0:0 : Operation not permitted ``` **Expected behavior** Video plays transcoded using GPU. `nvidia-smi` run on host shows the job. **Logs** https://gist.github.com/Arcanum417/612f20921336ab14f56489f67276fc51 **System (please complete the following information):** - OS: Arch - Browser: Chrome - Jellyfin Version: 10.4.3 - Installed Plugins: None - Reverse proxy: no
OVERLORD added the bugstale labels 2026-02-06 20:34:14 +03:00
Author
Owner

@Arcanum417 commented on GitHub (Dec 28, 2019):

Also, the same thing works with https://hub.docker.com/r/linuxserver/jellyfin

@Arcanum417 commented on GitHub (Dec 28, 2019): Also, the same thing works with https://hub.docker.com/r/linuxserver/jellyfin
Author
Owner

@JustAMan commented on GitHub (Jan 13, 2020):

@Arcanum417 can you check for permission issues with the user inside your container? Maybe adding to video group, or whatever is needed to access NVENC? As Jellyfin is not running as root I think.

@JustAMan commented on GitHub (Jan 13, 2020): @Arcanum417 can you check for permission issues with the user inside your container? Maybe adding to `video` group, or whatever is needed to access NVENC? As Jellyfin is not running as `root` I think.
Author
Owner

@stale[bot] commented on GitHub (Jun 10, 2020):

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.
If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.
This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@stale[bot] commented on GitHub (Jun 10, 2020): This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments. If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or nightlies, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label. This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on [Matrix or Social Media](https://docs.jellyfin.org/general/getting-help.html).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#1153