BlackRa1nFR / unraid-plex-nvdec

User Script to apply nvdec wrapper for Plex dockers on Unraid.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unraid-plex-nvdec

DISCLAIMER

This script now uses someone elses work!

Please visit https://github.com/revr3nd/plex-nvdec/ 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:

BEFORE YOU BEGIN

Ensure that Plex, and the unraid-nvidia environment is working properly. Follow the instructions from the LinuxServer.io 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.

REQUIREMENTS

  • 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 enable.sh 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.

Testing

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.

Updating

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.

FAQ

  • 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

About

User Script to apply nvdec wrapper for Plex dockers on Unraid.


Languages

Language:Shell 100.0%