Since there’s a huge interest in how to force nvdec/nvenc in Windows I rather post it here.
Since you don’t know anything nor care about it take your own advice and send me a PM and stop polluting the thread.
As others have mentioned, this thread, as stated in it’s title, is for Linux based PMS only
Please start a new thread, and then mention the author of the script if needed
Yes it is, but there’s been plenty of connected Windows discussions above. It’s a simple question with the same content as the rest of the thread.
As said, off-topic to the title, so do follow my advice, and stop posting/high-jacking this thread!
So the hack is working pretty well. In this screen shot, everything to the left of the break is using the P2000 for encoding only. Everything to the right of the break is using the P2000 for decoding and encoding.
Any ideas of how to pass the “-hwaccel nvdec” on Windows?
plex already supports hardware decoding on windows.
To clarify the misinformation to other users, Plex does not use nvdec nor nvenc on Windows.
Edit: Either you didn’t know that or you purposely gave an answer of a question that wasn’t posted.
I didn’t say it did. and jeeze talk about beating a dead horse.
I am going to ask nicely that this thread go back On-Topic and we all take a deep breath.
Thank you all for your cooperation.
On Topic: Anyone else have a crash from the wrapper script? Started getting notifications from users that Plex was down and so backed out that change and all was fine again and since. Prior to that it looked good encoding & decoding but I guess something went awry. Seems Plex made a .dmp crash file of the incident but I don’t know how to analyze that in Linux.
I have had one crash and it was last night. Logs dont say anything but a dmp was generated. I would be glad to look into the cause as well.
I’ve been messing around with docker on unraid for the past few days. I finally got decoding going with the work around but it looks like plex isn’t letting go of processes after the video has stopped..
nvidia-smi dmon still shows small amount of encoding happening while the server is idle and there are few processes sitting taking up a decent amount of vram. I let it go overnight, as I saw some mention, on the unraid fourms, saying give it 30 minutes or so, but no dice. I have to kill the docker and restart it.
When just encoding, the process dies as soon as the stream is killed but forcing nvdec seems like its just hanging out. Any ideas?
I have seen the same thing not in a docker, so there is obviously still more work needed on the decoder functionality.
No doubt that is one of many reasons why it has not been made available by default.
If this is Linux and you created a shell calling the transcoder as shown above you need to kill the child processes you start when plex kills the shell.
Something like.
trap “exit” INT TERM ERR
trap “kill 0” EXIT
./someProcessA &
wait
Wow you guys are fast.
@TeknoJunky - yeah decode needs some love still. I’m not depending on it, just experimenting with stuff at this point.
@pl_5309 Thanks for the direction on this. I’m still a linux novice but this gives me something new to play around with. 
In my case, i’m using the Kill_Stream.py with Tautulli. I configured it to kill any paused stream for more than 5 minutes, good enough for me.
@SharedPlex.tv I dont think tautulli would solve this problem as plex no longer knows about those stuck processes.
Also this behavior is not consistent for me. It sometimes happens sometimes not. I’ve got two solutions that come to mind.
- a cron job that looks at idle processes with an atime longer than x amount of minutes and kills them.
- Remove/increase the transcode buffer limit in plex and just let all jobs go to completion and they would just end that way.
in fact, it works if the transcoded were paused (that’s the trigger). But, if not, i’m not really sure. In my test, I started lots of HW transcode (ENC+DEC) and then closed my apps, browser tabs, etc, and all the Transcode thread closes.
btw for those considering a p400, I have found in my experiments that it may not have enough video ram to support more than 1 4k decode.
p400 has ~2gig ram, per above and from my own testing, 4k decode (currently) uses over a gig, so 2ndary 4k decodes fall back to cpu decode.
what bitrate was your test file?
I only rip 4k with full video and audio streams (remux) to mkv.
So full bitrate video/audio hdr through the above hack, tested movies included coco, mad max, atomic blonde, to name a few.

