Skip to content
User Script to apply nvdec wrapper for Plex dockers on Unraid.
Branch: master
Clone or download
Xaero252 Merge pull request #3 from tmchow/master
Error checking and test instructions
Latest commit 0534d87 Aug 16, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. Rename script to remove spaces Aug 13, 2019



This script now uses someone elses work!

Please visit for the author of the new transcode wrapper, and show them your support! Any issues resulting from using this script should be reported either on this repository, or on the unraid forums here:


Ensure that Plex, and the unraid-nvidia environment is working properly. Follow the instructions from the team to configure Plex to use the nvidia container runtime and pass through your card. Make sure you can transcode videos with that environment before attempting to use this script.

If you've manually applied, or installed any other version of this script prior to one using revr3nd's wrapper - please force update your Plex docker before proceeding.


  • Working Plex and Unraid-Nvidia setup.
  • User Scripts plugin from Community Apps.
  • A little bit of time.

First time setup

  1. Create a new script in the "User Scripts plugin" by clicking the "Add new Script" button on the "User Scripts" page in Settings.
  2. Enter a name for the script, "Plex nvdec enable" is the name I use, but you can name it anything you like.
  3. Click the name of the script, and then click "Edit Script."
  4. Delete the contents of the edit pane.
  5. Copy the contents of Plex nvdec from this repository into the empty edit pane.
  6. Click Save Changes.
  7. Click "Run Script" next to the script on the User Scripts page.
  8. (Optional) Set a schedule to run the script. Highly recommended to reapply the patch each time Plex is updated.


To test that this works, go to the command line on unraid, then run nvidia-smi dmon -s u. You'll see the final 2 columns be enc and dec which represents encoding and decoding by the GPU. Now go to a plex client and play a movie that will do a transcode. If this patch worked, you'll see both columns be non-zero as it's transcoding. If only the enc column is non-zero, something went wrong with your patch.


To update, simply edit the script, and paste the new code in. This script shouldn't be updated very often, as it is just pulling someone else's generic transcode wrapper.


  • Is there any way to get this script to run automatically when Plex updates? No. There isn't currently an event available to monitor the update of Docker containers. It could be done, but it would have to be done outside of this script. You can however set the script to run every day after you schedule your containers to update.

  • How do I use the CODECS variable, and when should I use it? Most users will not need to uncomment this variable. If you wish to experiment with adding various formats to decode, you can uncomment that variable. All "supported" formats are listed in that variable. Know that some of these formats are known to be unstable, or provide unsatisfactory quality output when used with nvdec currently. Below is a list of which formats they are, as well as which ones are enabled by default:

    • h264 (default) H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
    • hevc (default) H.265 / HEVC (High Efficiency Video Coding)
    • mpeg2video MPEG-2 video
    • mpeg4 MPEG-4 part 2
    • vc1 SMPTE VC-1
    • vp8 (default) On2 VP8
    • vp9 (default) Google VP9
You can’t perform that action at this time.