Closed justinglock40 closed 5 years ago
Take a look at this repo. I'm not sure if it is maintained now, but you can ask author.
Any news on that @justinglock40 ? Thanks!
No I was hoping that there was going to be. I found a gothic for windows, but it doesn’t have clear instructions and doesn’t seem to have support.
On Oct 18, 2018 at 17:37, <tasoss (mailto:notifications@github.com)> wrote:
Any news on that @justinglock40 (https://github.com/justinglock40) ? Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub (https://github.com/keylase/nvidia-patch/issues/9#issuecomment-431187287), or mute the thread (https://github.com/notifications/unsubscribe-auth/AWD90Yvgrdn6NuikABGoz5k9RNKZEJeVks5umQKggaJpZM4XjMwQ).
Thanks @justinglock40 I will let you know if case i find something useful.
@justinglock40 I'm also looking for that. I tried: https://github.com/sk1080/nvidia-kvm-patcher But I couldn't get past 2 streams anyway.
I've found a way to get NVDEC working in theory, compiling ffmpeg with the correct arguments. It's over my head, but someone in the plex forum got it to work. He was gonna add HDR to SHR tonemapping and put it up on GitHub but I haven't heard anything more after that.
@justinglock40 I'm also looking for that. I tried: https://github.com/sk1080/nvidia-kvm-patcher But I couldn't get past 2 streams anyway.
I've found a way to get NVDEC working in theory, compiling ffmpeg with the correct arguments. It's over my head, but someone in the plex forum got it to work. He was gonna add HDR to SHR tonemapping and put it up on GitHub but I haven't heard anything more after that.
You look at this if you're trying to convert items: https://github.com/Collisionc/sickbeard_mp4_automator
I think it needs to be compiled with the exact same settings plex originally uses except for the enabling of NVDEC.
Edit: Oh, convert? No, I’m gonna use the capability I have to transcode if needed.
What’s the link to the Plex forum that you mentioned ?
@justinglock40 @tasoss @niXta1
Let's try something. Assuming Win10 x64.
C:\WINDOWS\system32\nvcuvid.dll
using Win_1337_Apply_Patch toolC:\WINDOWS\system32\nvcuvid.dll
to any Linux box and make backup.sed -i.bk -e 's/\xff\x90\x80\x00\x00\x00\x84\xc0\x74\x08/\xff\x90\x80\x00\x00\x00\x84\xc0\x90\x90/g' nvcuvid.dll
against your library.Option 2 may also work with other driver version with similar codebase.
Also, please report back your results.
I’m not currently any windows right now
I’m guessing you will need to disable driver verification at boot also?
@niXta1 I didn't disabled anything at boot, so probably not. Maybe nvcuvid.dll is a user-space library and is not a part of actual device driver or signature is not verified for already installed files. Can't say for sure.
I just tested the option 1 but no go!! thanks for trying to get this working in Windows 10
@jaylex32 Please provide more details what went wrong. Also have you tried to reboot system?
@jaylex32 Please provide more details what went wrong. Also have you tried to reboot system?
I already had that same version installed in my pc and I just did the option 1 and then I reboot my pc then I try to transcode more than 3 movies with plex but after the second one it wont use the graphic card. can I run a different test?
@jaylex32 Thanks! I'm not familiar with Plex, but it might be internal Plex limitations applied to fit into usual NVENC limits. I run my tests with ffmpeg directly, so probably we need to consult Plex source code. Which Plex version do you use?
@jaylex32 Thanks! I'm not familiar with Plex, but it might be internal Plex limitations applied to fit into usual NVENC limits. I run my tests with ffmpeg directly, so probably we need to consult Plex source code. Which Plex version do you use?
Im using plex server 1.14.1.5488 and plex does work with a graphic card that dont have limitations like the quatro!
it seems like is working now! edit never mind it still dont work!
Nope!
Works for me with ffmpeg, so probably Plex should work also. Please make sure windows didn't restored patched .dll. I have System Restore disabled on my test VM.
Can you please do a test with Plex media server to see if we can find a fix for it? I have system restore off as well andthe patched file it's still there. Also there's not another location where theres a file nvcuvid.dll on? Thanks in advance!!
@jaylex32 I installed version 1.14.1.5488 and I have no "Use hardware acceleration when available" option in "Transcoder" settings. Probably Plex hides it if detects VM:
Hardware-Acceleration Streaming is not currently possible inside of virtual machines, as virtual machine hosts do not expose low-level video hardware to the guest operating system. While some virtual machines expose generic 3D acceleration to the guest OS as a virtual driver, this does not include support for accelerated video decoding or encoding.
(Source)
Despite my VM has real GPU, full access to it and ffmpeg works fine.
I suggest to download ffmpeg and run three transcoding sessions in order to distinguish clearly what is happening.
Sample command for ffmpeg transcoding using NVENC:
ffmpeg.exe -i Sample.avi -c:v h264_nvenc out.mp4
Or, using single ffmpeg instance, something like this:
ffmpeg -i input.avi -s 1280x720 -v:c h264_nvenc output1.mp4 -s 640x480 -v:c h264_nvenc output2.mp4 -s 320x240 -v:c h264_nvenc output3.mp4
Thank you sir will do when I get home!!
Plex works fine inside VM's, dockers, etc., problem is, you have to have Plex Pass to get the hw transcoding option. I tried to patch the .dll both ways, and neither made Plex use more than two hw encodes.
Then I tried ffmpeg directly:
ffmpeg -i input.mkv -s 320x240 -c:v h264_nvenc output1.mkv -s 640x480 -c:v h264_nvenc output2.mkv -s 320x240 -c:v h264_nvenc output3.mkv
I'm gonna restore the .dll to make sure I get the error without the pach.
P.S. You can either sign up for a 30-day trial and get plex pass or use this build: https://1drv.ms/u/s!Avyoutvw3h6c3TJfpC4bwcl7RYVj
I't will probably let you use hw transcoding
Thanks! niXta1
I didn't get any errors but I did see the filesize of the output of the two first increasing, the third only got written when using the patched .dll. I could even hot-swap it and get the same results. It is not part of the core driver.
So the problem is now that Plex somehow identifies the capabilities without testing and determains that only two streams should be encoded at a time. I would argue that Plex should just test the capability instead of guessing, but it could possibly get it wrong if any encoding happend in the background. Still, unlimited encoding could be tested, if it fails, fall back to identification and guess.
Thanks to @Snawoot 👍 for your work on getting this to work on Windows.
I know that if you use a NVIDIA Quadro P2000 it works fine with Plex without limitations but then again that video card is not nvenc lock so maybe Plex see that is for example a GTX 970 and it just locks the hw transcoding to 2!!
@jaylex32 AFAIK Plex users on Linux report success with nvidia-patch. Turns out Plex on Linux actually tests GPU real capabilities or old builds have no proactive thread limit.
Anyway it's a subject for Plex support forum then.
Hold your horses! It's working. I thought about it and why would you test the capability every time you run? You'd test/check at first start and if no hw changes after that you'd just assume it's the same. Makes sense. So I had a look around and found a few interesting reg entries and flag files.
So after you apply the patch do the following:
@niXta1 Amazing! Thank you!
You can probably just remove a single/few reg entries/files to get it to work too, but I don't have time to find out. If someone wants to save their current library (untested), remove the reg: "MachineIdentifier", "ProcessedMachineIdentifier", "AnonymousMachineIdentifier". And delete everything in %UserProfile%\AppData\Local\Plex Media Server except for media, Metadata and Plug-ins.
And remember, always do backups.
Hold your horses! It's working. I thought about it and why would you test the capability every time you run? You'd test/check at first start and if no hw changes after that you'd just assume it's the same. Makes sense. So I had a look around and found a few interesting reg entries and flag files.
So after you apply the patch do the following:
- Uninstall Plex Media Server.
- Delete the "Plex Media Server" folder in %UserProfile%\AppData\Local.
- Delete the registry entry "Plex Media Server" in Computer\HKEY_CURRENT_USER\Software\Plex, Inc.
- Reboot for good measure (I didn't).
- Install Plex Media Server.
- Profit.
With this method I will loose all my Plex data and is like starting fresh right? Thanks in advance!!
Delivered to master via #25
Closing issue since initial topic already covered.
@jaylex32 Yes, very much like fresh install. Probably someone can locate more specifically piece of data responsible for storing info about encoding capabilities, but it's a little bit out of scope.
Anyway, you may post here contents of your registry folder "Plex Media Server" and maybe someone will take a look. Don't forget to zap your private data like keys, IDs, etc on screenshot.
Thank you for everything man!!!
ok so I started fresh and did everything in the instructions and still doesnt work! now I lost my data and the mod doesnt work with plex
@jaylex32 Do ffmpeg test then and confirm if it is capable to encode more than two streams.
Seem to have a problem downloading the patch in option one, i only get a text box, do i need to replace nvcuvid.dll with that text or something ?
@Svendsen18 Right click on patch link and select "Save as...". Use resulting file with the Win_1337_Apply_Patch tool
Holy fucking shit i've just max'd my gtx 1070 out in emby for the first time ever, seems to work!
Holy fucking shit i've just max'd my gtx 1070 out in emby for the first time ever, seems to work!
Did you save the patch as a txt file or as a 1337 format file? Thanks in advance!
"Download this patch." i just right clicked on "this patch" and used save link as and threw it on the desktop, used the tool patcher on that filer, then the apply patcher needs the nvcuvid.dll file which is in under C:\WINDOWS\system32\ Reboot.
Could it be my graphics card? I have a GTX 970
couldn't say - im not very smart in this area :D
@jaylex32 It's unlikely. Very first version of nvidia-patch was developed and tested on GTX 970 (on Linux, but it doesn't matter).
Hey guys! I just did a quick check again, I might gotten tricked by a glitch in the Plex Dashboard :( I can't reproduce the 3 hw transcodings. Sorry all. I should have tried with more than 3 and for a longer time. The plex debug logs also gives a lot of information and it looks like it does test the capabilities before every stream starts. Another thing that I realized is that Plex is using an old version of ffmepeg and not nvenc but dxva2(/mf). We need to check if dxva2 follows suit with unlimited encodings.
Emby does use new ffdshow with nvenc, so that works exacly like the ffdshow nvenc tests we did.
Edit: dxva2 decoding uses: -hwaccel dxva2 Not sure if that includes mf encoding or if there's another switch to enable that?
Any chance this patch can make its way to Windows? If so that would be greatly appreciated and well received. Primarily, plex doesn't allow decode on HW in LInux only encodes, but on windows you can encode/decode on HW with plex. So unlocked transcodes there would be awesome!