How to setup Nvidia in Plex docker for hardware transcoding?

  • +-----------------------------------------------------------------------------+

    | NVIDIA-SMI 440.64 Driver Version: 440.64 CUDA Version: 10.2 |

    |-------------------------------+----------------------+----------------------+

    | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |

    | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |

    |===============================+======================+======================|

    | 0 GeForce GTX 760 Off | 00000000:01:00.0 N/A | N/A |

    | 0% 35C P0 N/A / N/A | 0MiB / 1999MiB | N/A Default |

    +-------------------------------+----------------------+----------------------+


    +-----------------------------------------------------------------------------+

    | Processes: GPU Memory |

    | GPU PID Type Process name Usage |

    |=============================================================================|

    | 0 Not Supported |

    +-----------------------------------------------------------------------------+



    Not sure why it's saying not supported?

  • I think, your OMV + Docker + NVIDIA video card system is ready to hardware transcoding, but ....


    Quote

    Not sure why it's saying not supported?

    what video or movie do you want to transcode, H.264 or HEVC or...... because your video card (GTX 760) only supports transcoding up to H264.


    Read these articles:

    Using Hardware-Accelerated Streaming

    NVIDIA Hardware Transcoding Calculator for Plex

  • Please see if the hardware transcoding works with Jellyfin.


    Example:


  • I'm not sure about how to set it up as all my hard drives are not shown in Jellyfin. But I do think the transcoding is working as my CPU is not touched while transcoding. It still does not show HW transcoding so I don't know why? Thanks for all the help along the way. Im just curious why does the NVIDIA docker keeps replicating I have 2 unusable docker images of it in my docker.

  • Quote

    Im just curious why does the NVIDIA docker keeps replicating I have 2 unusable docker images of it in my docker.

    When you run the docker run --gpus all nvidia/cuda:10.0-base nvidia-smi command, it downloads the "nvidia/cuda:10.0-base" image, which it uses to test the nvidia-container-toolkit and nvidia-container-runtime, so you can safely delete the containers



    and then the "nvidia/cuda:10.0-base" image.


    Quote

    It still does not show HW transcoding so I don't know why?

    In nvidia-smi: I found this and this (with the solution? (I can't try it because nvidia-smi works well for me)).

    In Plex: If I start the hardware transcoding in Plex I have the hw indication after about 7 seconds.


    Quote

    Just noticed whenever Jellyfin is running Plex will hw decode stuff as the CPU stays under 20% activity. Now when Jellyfin is closed it hit's the CPU hard.

    Now I watched it with Plex + Handbrake duo, but CPU usage didn't jump when I stop Handbrake (although the Handbrake only encodes using the nvidia card). (For me, at the moment Jellyfin does not want to use the nvidia card for hardware transcoding.)

  • I followed this guide before with OMV 4 and it worked. I am now trying to just install the patch.sh but OMV keeps saying - No such file or directory. I know it's there. I even made a new directory and it can't find it? I gave my account permission to read and write to all the folders I want to access. I am able to read and write to the disks so I don't know what is going on.

  • I don't know what the problem might be for you, I was able to install the nvml_fix and the nvidia-patch without error.

    Install nvml_fix (NVIDIA Linux Graphics Driver 440.64) :


    apt install -y git


    git clone https://github.com/CFSworks/nvml_fix.git

    cd nvml_fix

    make TARGET_VER=440.64

    sudo dpkg-divert --add --local --divert /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1.orig --rename /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1

    sudo make install TARGET_VER=440.64 libdir=/usr/lib/x86_64-linux-gnu

    before_nvml_fix_440.64.txt  after_nvml_fix_440.64.txt


    then I installed the latest nvidia driver (NVIDIA Linux Graphics Driver 440.82) (if you are using a container in the Docker (e.g. Plex) that uses the nvidia card, stop the Docker before installing newest nvidia driver) and I reinstalled the nvml_fix:


    cd nvml_fix

    make TARGET_VER=440.82

    sudo dpkg-divert --add --local --divert /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1.orig --rename /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1

    sudo make install TARGET_VER=440.82 libdir=/usr/lib/x86_64-linux-gnu

    before_nvml_fix_440.82.txt  after_nvml_fix_440.82.txt


    Install nvidia-patch:


    git clone https://github.com/keylase/nvidia-patch.git

    cd nvidia-patch

    bash ./patch.sh

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!