Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Support for Windows #9

Closed
justinglock40 opened this issue Oct 17, 2018 · 142 comments
Closed

[Question] Support for Windows #9

justinglock40 opened this issue Oct 17, 2018 · 142 comments

Comments

@justinglock40
Copy link

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!

@Snawoot
Copy link
Collaborator

Snawoot commented Oct 17, 2018

Take a look at this repo. I'm not sure if it is maintained now, but you can ask author.

@tasoss
Copy link

tasoss commented Oct 18, 2018

Any news on that @justinglock40 ?
Thanks!

@justinglock40
Copy link
Author

justinglock40 commented Oct 19, 2018 via email

@tasoss
Copy link

tasoss commented Oct 19, 2018

Thanks @justinglock40
I will let you know if case i find something useful.

@niXta1
Copy link
Contributor

niXta1 commented Nov 24, 2018

@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
Copy link
Author

@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

@niXta1
Copy link
Contributor

niXta1 commented Nov 25, 2018

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.

@justinglock40
Copy link
Author

justinglock40 commented Nov 25, 2018

What’s the link to the Plex forum that you mentioned ?

@niXta1
Copy link
Contributor

niXta1 commented Nov 26, 2018

@Snawoot
Copy link
Collaborator

Snawoot commented Jan 7, 2019

@justinglock40 @tasoss @niXta1

Let's try something. Assuming Win10 x64.

Option 1

  1. Download Nvidia driver 417.35.
  2. Download latest Win_1337_Apply_Patch tool
  3. Download this patch.
  4. Apply patch to C:\WINDOWS\system32\nvcuvid.dll using Win_1337_Apply_Patch tool
  5. Reboot

Option 2

  1. Get your C:\WINDOWS\system32\nvcuvid.dll to any Linux box and make backup.
  2. Run command 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.
  3. Place modified file back to your windows installation.
  4. Reboot

Option 2 may also work with other driver version with similar codebase.

@Snawoot
Copy link
Collaborator

Snawoot commented Jan 7, 2019

Also, please report back your results.

@justinglock40
Copy link
Author

I’m not currently any windows right now

@niXta1
Copy link
Contributor

niXta1 commented Jan 7, 2019

I’m guessing you will need to disable driver verification at boot also?

@Snawoot
Copy link
Collaborator

Snawoot commented Jan 7, 2019

@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.

@jaylex32
Copy link

jaylex32 commented Jan 7, 2019

I just tested the option 1 but no go!! thanks for trying to get this working in Windows 10

@Snawoot
Copy link
Collaborator

Snawoot commented Jan 7, 2019

@jaylex32 Please provide more details what went wrong. Also have you tried to reboot system?

@jaylex32
Copy link

jaylex32 commented Jan 7, 2019

@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?

@Snawoot
Copy link
Collaborator

Snawoot commented Jan 7, 2019

@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
Copy link

jaylex32 commented Jan 7, 2019

@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!

@jaylex32
Copy link

jaylex32 commented Jan 7, 2019

plex test
it seems like is working now!
edit never mind it still dont work!

@justinglock40
Copy link
Author

Nope!

@niXta1
Copy link
Contributor

niXta1 commented Mar 14, 2019

My main server is on Linux. ... ...

@jaylex32 I used latest version with no dependencies.

What happens if you try several instances with ffmpeg?

@matthew1972
Copy link

matthew1972 commented Mar 14, 2019

I have got it working on plex !!! I used a auto patch from one of you guys that gave me 5 streams then I got the 3d bump and man I have a small beast !!!! im using a 1050 3g and a i5 7500 …. and I am getting 32 streams …...I messed with it 4ever and got it working ….. I had to open cmd and drag and drop the 3d bump exe in there and it worked ….
thing is its not the apply patch tool and all that ….super simple auto patch as easy as dwnld it click run then you have 5 streams ….then add the 3d bump ….now from what I can tell it decodes encodes and the 3d is running also !!! I don't no it just works !!!

@jaylex32
Copy link

I have got it working on plex !!! I used a auto patch from one of you guys that gave me 5 streams then I got the 3d bump and man I have a small beast !!!! im using a 1050 3g and a i5 7500 …. and I am getting 32 streams …...I messed with it 4ever and got it working ….. I had to open cmd and drag and drop the 3d bump exe in there and it worked ….
thing is its not the apply patch tool and all that ….super simple auto patch as easy as dwnld it click run then you have 5 streams ….then add the 3d bump ….now from what I can tell it decodes encodes and the 3d is running also !!! I don't no it just works !!!

What 3d bump? I'm lost!

@matthew1972
Copy link

I have got it working on plex !!! I used a auto patch from one of you guys that gave me 5 streams then I got the 3d bump and man I have a small beast !!!! im using a 1050 3g and a i5 7500 …. and I am getting 32 streams …...I messed with it 4ever and got it working ….. I had to open cmd and drag and drop the 3d bump exe in there and it worked ….
thing is its not the apply patch tool and all that ….super simple auto patch as easy as dwnld it click run then you have 5 streams ….then add the 3d bump ….now from what I can tell it decodes encodes and the 3d is running also !!! I don't no it just works !!!

What 3d bump? I'm lost!

https://github.com/jantenhove/NvencSessionLimitBump

@latguy1
Copy link

latguy1 commented Mar 31, 2019

Any chance that the limit bump patch can be clarified? I'm not clear on why its necessary. I haven't tried the original patch but from what I read is that it did enable more transcodes. What is the additional patch for? To enable even more transcoding streams?

@Snawoot
Copy link
Collaborator

Snawoot commented Mar 31, 2019

@latguy1 it's for special cases with 32bit and D3D apps.

See related notes on main page: https://github.com/keylase/nvidia-patch/tree/master/win#d3d11-and-32-bit-apps-encoding-sessions

@latguy1
Copy link

latguy1 commented Mar 31, 2019

Ah I got it - so if someone is using the server for something other than plex / nas and/or for some reason installed Plex 32bit. Thanks!

@jaylex32
Copy link

I didn't mention this before but I fixed the issue with Plex that it was not working with this mod. After I ran the limit bump.exe it did fix the issue so thats the fix for Plex and It will be awesome if you guys can merge all This fixes into one.. thanks

@jaylex32
Copy link

Ah I got it - so if someone is using the server for something other than plex / nas and/or for some reason installed Plex 32bit. Thanks!

Plex is running in 32 bit as far as im aware!

@niXta1
Copy link
Contributor

niXta1 commented Mar 31, 2019

Plex is running in 32 bit as far as im aware!

@jaylex32 yes it is (on Windows). Plex and the transcoder.

@ghost
Copy link

ghost commented Apr 11, 2019

Working great here with Plex!!. Windows 10 / Quadro P400 with the latest drivers/patch & NvencSessionLimitBump added on startup (Which also works great). Ive had 7 1080p > 720p 4mbps HW transcodes so far testing this out with plenty of room left for a few more I believe. Just brilliant!!!

Really pleased with this patch!! Thank you to everyone involved in removing this terrible limit (keylase, Snawoot, jantenhove, Testers & everyone involved)!! Awesome!! Thank you!!

@bikeboy24
Copy link

For anyone still trying to get this to work in Windows 64bit, you need to use the NvencSessionLimitBump exe.

@cleverchimp
Copy link

NvencSessionLimitBump exe. doesn't work on windows server 2012 R2, maybe because I have not installed the Nvidia Video Codec SDK (still figuring how).

@Snawoot
Copy link
Collaborator

Snawoot commented May 16, 2019

@cleverchimp NvencSessionLimitBump.exe is a self-contained binary which doesn't requires Video Codec SDK. SDK is a thing needed only at build time. Which error did you get on startup?

@cleverchimp
Copy link

cleverchimp commented May 16, 2019

I was under impression that the SDK need to be installed because I saw the notes below (need to install Visual Studio 2017 for the Cuda Toolkit) :

Dependencies

Nvidia Cuda Toolkit needs to installed: https://developer.nvidia.com/cuda-downloads Nvidia Video Codec SDK needs to be installed: https://developer.nvidia.com/nvidia-video-codec-sdk#Download

A nice command line parser is used for... parsing the arguments. File is include in the code, original can be found here: https://github.com/vietjtnguyen/argagg

When I run NvencSessionLimitBump.exe, it just open up cmd session and it closed after a few secs. It doesn't seems to show me any errors so I tested it to run 4 streams on Plex and only 2 shows HW like before the patch

@Snawoot
Copy link
Collaborator

Snawoot commented May 16, 2019

@cleverchimp try running .exe via cmd.exe to see command output

@cleverchimp
Copy link

@cleverchimp try running .exe via cmd.exe to see command output

Tried that and it does seems to do the trick, it stated "bumb succeeded". Try running 4 streams again and all shows HW on Plex dashboard, CPU is about 10% now, do I need to run this every time the server need a restart? Thanks!

@Snawoot
Copy link
Collaborator

Snawoot commented May 16, 2019

@cleverchimp
Yes, you need to run it on every system start. You may just add it to autostart. Optionally, you may use AutoIt script from wazerstar to hide console window on startup or use something like RunAsService.

@cleverchimp
Copy link

Thanks again, will add to autostart.

@slappymcphee
Copy link

I have tried to get this working on my Windows 10 Plex server with my 1060 without success. Been fiddling with it for hours.

Wondering if I can get some advice

Picked up a 1060 6gb nvidia card for transcoding sessions

running Windows 10 LTSB

installed the Windows NVidia latest driver 430.64 and then the associated patch per the instructions at https://github.com/keylase/nvidia-patch/tree/master/win

then went with method 1 per that page to enable 32 sessions

didn't get any errors during the entire process and received successful message that 32 sessions seceded

doesn't appear that the GPU is being called by Plex at all still and it is still using my i5-6600K as when I test with one of my 4k smart tvs with 4k files the CPU is still spiking and when looking at performance in task manager the GPU isn't showing

thanks in advance!

@cleverchimp
Copy link

I have tried to get this working on my Windows 10 Plex server with my 1060 without success. Been fiddling with it for hours.

Wondering if I can get some advice

Picked up a 1060 6gb nvidia card for transcoding sessions

running Windows 10 LTSB

installed the Windows NVidia latest driver 430.64 and then the associated patch per the instructions at https://github.com/keylase/nvidia-patch/tree/master/win

then went with method 1 per that page to enable 32 sessions

didn't get any errors during the entire process and received successful message that 32 sessions seceded

doesn't appear that the GPU is being called by Plex at all still and it is still using my i5-6600K as when I test with one of my 4k smart tvs with 4k files the CPU is still spiking and when looking at performance in task manager the GPU isn't showing

thanks in advance!

Your issues might be because Plex prefer quicksync over nvenc. In my case I'm using Proliant Gen8 server with Xeon 1240V2, it has Matrox 2D graphics. I installed P400 and disabled the onboard graphics. I would start there....if its still not working, try to install NvencSessionLimitBump.exe dependencies.

"Dependencies

Nvidia Cuda Toolkit needs to installed: https://developer.nvidia.com/cuda-downloads Nvidia Video Codec SDK needs to be installed: https://developer.nvidia.com/nvidia-video-codec-sdk#Download"

@slappymcphee
Copy link

I have to wonder if there is a minimum windows build version? I am on LTSB 1607.

@jaylex32
Copy link

with the new Plex version do we still need the Nvidia patch and the limit bump?

@cleverchimp
Copy link

cleverchimp commented Sep 18, 2019 via email

@jaylex32
Copy link

jaylex32 commented Sep 18, 2019 via email

@cleverchimp
Copy link

cleverchimp commented Sep 18, 2019 via email

@Snawoot
Copy link
Collaborator

Snawoot commented Sep 18, 2019

@jaylex32 It's worth testing, but unfortunately I don't have Plex Pass (and Plex at all). One should check Plex Transcoder process in the Task Manager. If it is now 64bit application, then there is a good chance NvencSessionLimitBump is not needed for Plex anymore.

@jaylex32
Copy link

jaylex32 commented Jan 22, 2020

@jaylex32 It's worth testing, but unfortunately I don't have Plex Pass (and Plex at all). One should check Plex Transcoder process in the Task Manager. If it is now 64bit application, then there is a good chance NvencSessionLimitBump is not needed for Plex anymore.
nevermind I got it thanks!
I notice that the patches change for windows, how do you patch the .1337 since now the name change from ncuvid.1337 to 2 different .1337 files?

@Snawoot
Copy link
Collaborator

Snawoot commented Jan 22, 2020

Hello, @jaylex32!

Take a look at this guide on main page of Windows version of patch. It also contains almost up-to-date video walkthrough about entire process.

I'm locking conversation in this issue in favor of separate well-categorised issues focused on specific questions and problems users have.

Repository owner locked as resolved and limited conversation to collaborators Jan 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests