Docker 10.2.2 nvenc/nvdec libraries missing #520

Closed
opened 2026-02-06 19:47:56 +03:00 by OVERLORD · 12 comments
Owner

Originally created by @BobOkisama on GitHub (Mar 15, 2019).

Describe the bug
Trying to run nvenc/nvdec transcoding from docker version 10.2.2, it fails.

To Reproduce

  1. Enable nvidia transcoding
  2. Try to watch a movie forcing a transcode.
  3. Manually run the ffmpeg command from the logs in container

Expected behavior
Movie should transcode using nvenc/nvdec hardware transcoding

Logs
https://pastebin.com/KsEfDABx
When running the command from within the container itself I get:
[h264_cuvid @ 0x556c4b4b0800] Cannot load libnvcuvid.so.1
[h264_cuvid @ 0x556c4b4b0800] Failed loading nvcuvid.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (ac3 (native) -> mp3 (libmp3lame))
Error while opening decoder for input stream #0:0 : Operation not permitted

If I run this command outside the container with my working /usr/bin/ffmpeg I get no errors and all works.

System (please complete the following information):

  • OS: Ubuntu 18.04.2 with ffmpeg version 3.4.4-0ubuntu0.18.04.1
  • Browser: Latest Chrome
  • Jellyfin Version: 10.2.2 docker:latest

Additional context
It would seem the libraries for nvenc/dec are missing.
It would be nice to have a way to point JF to use my own ffmpeg path, however the UI element to do that is now gone. Perhaps allow this in a "advanced" section within transcodes, or even a debug or something in the encoding.xml.

Originally created by @BobOkisama on GitHub (Mar 15, 2019). **Describe the bug** Trying to run nvenc/nvdec transcoding from docker version 10.2.2, it fails. **To Reproduce** 1. Enable nvidia transcoding 2. Try to watch a movie forcing a transcode. 3. Manually run the ffmpeg command from the logs in container **Expected behavior** Movie should transcode using nvenc/nvdec hardware transcoding **Logs** https://pastebin.com/KsEfDABx When running the command from within the container itself I get: [h264_cuvid @ 0x556c4b4b0800] Cannot load libnvcuvid.so.1 [h264_cuvid @ 0x556c4b4b0800] Failed loading nvcuvid. Stream mapping: Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> h264 (h264_nvenc)) Stream #0:1 -> #0:1 (ac3 (native) -> mp3 (libmp3lame)) Error while opening decoder for input stream #0:0 : Operation not permitted If I run this command outside the container with my working /usr/bin/ffmpeg I get no errors and all works. **System (please complete the following information):** - OS: Ubuntu 18.04.2 with ffmpeg version 3.4.4-0ubuntu0.18.04.1 - Browser: Latest Chrome - Jellyfin Version: 10.2.2 docker:latest **Additional context** It would seem the libraries for nvenc/dec are missing. It would be nice to have a way to point JF to use my own ffmpeg path, however the UI element to do that is now gone. Perhaps allow this in a "advanced" section within transcodes, or even a debug or something in the encoding.xml.
OVERLORD added the bug label 2026-02-06 19:47:56 +03:00
Author
Owner

@cvium commented on GitHub (Mar 18, 2019):

Are you using nvidia-docker?

@cvium commented on GitHub (Mar 18, 2019): Are you using nvidia-docker?
Author
Owner

@BobOkisama commented on GitHub (Mar 18, 2019):

No I am not. I upgraded to 18.04 and the ffmpeg you can get has all the libraries needed for nvenc/nvdec, but the jellyfin docker does not allow you to point to your own ffmpeg, that UI element was removed, and the 10.2.2 does not have the nvidia libraries needed in it. I can actually take the ffmpeg command being run from the logs and point it to my /usr/bin/ffmpeg and it works without issue, but the /usr/local/bin/ffmpeg is missing libraries. Cannot do a symlink within a contain either... so that option is out.

@BobOkisama commented on GitHub (Mar 18, 2019): No I am not. I upgraded to 18.04 and the ffmpeg you can get has all the libraries needed for nvenc/nvdec, but the jellyfin docker does not allow you to point to your own ffmpeg, that UI element was removed, and the 10.2.2 does not have the nvidia libraries needed in it. I can actually take the ffmpeg command being run from the logs and point it to my /usr/bin/ffmpeg and it works without issue, but the /usr/local/bin/ffmpeg is missing libraries. Cannot do a symlink within a contain either... so that option is out.
Author
Owner

@cvium commented on GitHub (Mar 18, 2019):

It's recommended to use the Nvidia docker runtime. Could you try extracting ffmpeg from the container and running the same command on the host?

Edit: I don't remember if we actually support nvdec yet.

@cvium commented on GitHub (Mar 18, 2019): It's recommended to use the Nvidia docker runtime. Could you try extracting ffmpeg from the container and running the same command on the host? Edit: I don't remember if we actually support nvdec yet.
Author
Owner

@BobOkisama commented on GitHub (Mar 18, 2019):

I am not sure what you are asking me to try. The ffmpeg in the container is compiled with nvenc/dec enabled, but it is missing the nessesary libraries in the container to actually have it work. As far as I am aware you can't use external libraries in a container, and you cannot use libraries from another container in your container, so I am not really sure what you are asking me to try.

@BobOkisama commented on GitHub (Mar 18, 2019): I am not sure what you are asking me to try. The ffmpeg in the container is compiled with nvenc/dec enabled, but it is missing the nessesary libraries in the container to actually have it work. As far as I am aware you can't use external libraries in a container, and you cannot use libraries from another container in your container, so I am not really sure what you are asking me to try.
Author
Owner

@crobibero commented on GitHub (Mar 18, 2019):

Even in Emby the recommended way to use nvenc/dec in docker is to use the nvidia-docker driver.
Jellyfin probably can't include the drivers in the container as they are non-free.

https://github.com/NVIDIA/nvidia-docker

edit: Use this to get started, process should be the same: https://github.com/MediaBrowser/Wiki/wiki/Hardware-Acceleration-with-Docker#nvidia-in-docker

@crobibero commented on GitHub (Mar 18, 2019): Even in Emby the recommended way to use nvenc/dec in docker is to use the nvidia-docker driver. Jellyfin probably can't include the drivers in the container as they are non-free. https://github.com/NVIDIA/nvidia-docker edit: Use this to get started, process should be the same: https://github.com/MediaBrowser/Wiki/wiki/Hardware-Acceleration-with-Docker#nvidia-in-docker
Author
Owner

@BobOkisama commented on GitHub (Mar 18, 2019):

I am still totally confused. I already have nvidia drivers and vainfo installed on my box, I can do a nvidia-smi and that works fine. Jellyfin is running in a container, in docker, so someone correct me if I am wrong here, it can only use the libraries that are included in that container.

Are you telling me if I add the nvidia-docker that my jellyfin container will be able to access the libraries from it?

@BobOkisama commented on GitHub (Mar 18, 2019): I am still totally confused. I already have nvidia drivers and vainfo installed on my box, I can do a nvidia-smi and that works fine. Jellyfin is running in a container, in docker, so someone correct me if I am wrong here, it can only use the libraries that are included in that container. Are you telling me if I add the nvidia-docker that my jellyfin container will be able to access the libraries from it?
Author
Owner

@crobibero commented on GitHub (Mar 18, 2019):

Correct, that's all you need to do. Check out that wiki link, those are all of the commands that I wrote to get it working.

@crobibero commented on GitHub (Mar 18, 2019): Correct, that's all you need to do. Check out that wiki link, those are all of the commands that I wrote to get it working.
Author
Owner

@BobOkisama commented on GitHub (Mar 18, 2019):

Rock on... when I get a few minutes (at work) I'll give that a try and report back here.

@BobOkisama commented on GitHub (Mar 18, 2019): Rock on... when I get a few minutes (at work) I'll give that a try and report back here.
Author
Owner

@fhriley commented on GitHub (May 26, 2019):

That's how I do it. Working example here.

@fhriley commented on GitHub (May 26, 2019): That's how I do it. Working example [here](https://github.com/jellyfin/jellyfin/issues/482#issuecomment-496012051).
Author
Owner

@anthonylavado commented on GitHub (May 27, 2019):

Is this something we can close now? I imagine we’ll probably need a docs update, but is it otherwise good?

@anthonylavado commented on GitHub (May 27, 2019): Is this something we can close now? I imagine we’ll probably need a docs update, but is it otherwise good?
Author
Owner

@crobibero commented on GitHub (May 27, 2019):

It works perfectly for me and others, so I'd think you can close it

@crobibero commented on GitHub (May 27, 2019): It works perfectly for me and others, so I'd think you can close it
Author
Owner

@dhruvinsh commented on GitHub (Oct 19, 2020):

in case if some still stumble upon this issue, I have Ubuntu-20.04 server edition (headless). This package I installed:
apt install nvidia-headless-450 nvidia-utils-450 libnvidia-decode-450 libnvidia-encode-450

and then installed nvidia-docker2

once that part is done fix the docker daemon.js with absolute path and default runtime.

{
    "default-runtime": "nvidia",
    "runtimes": {
        "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": []
        }
    }
}
@dhruvinsh commented on GitHub (Oct 19, 2020): in case if some still stumble upon this issue, I have Ubuntu-20.04 server edition (headless). This package I installed: `apt install nvidia-headless-450 nvidia-utils-450 libnvidia-decode-450 libnvidia-encode-450` and then installed `nvidia-docker2` once that part is done fix the docker daemon.js with absolute path and default runtime. ``` { "default-runtime": "nvidia", "runtimes": { "nvidia": { "path": "/usr/bin/nvidia-container-runtime", "runtimeArgs": [] } } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#520