Merge pull request #71 from Snawoot/issue_53_bis

Issue 53 bis
pull/72/head
Vladislav Yarmak 5 years ago committed by GitHub
commit 1854cd1623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "win/NvencSessionLimitBump"]
path = win/NvencSessionLimitBump
url = https://github.com/jantenhove/NvencSessionLimitBump.git

@ -0,0 +1 @@
Subproject commit 390c2b1a825c339198e488ff9a692cc9491061ed

@ -38,9 +38,18 @@ E.g, for 64bit Windows 10 running driver version 417.35 use `win10_x64/417.35/nv
* Genesis in [related issue](https://github.com/keylase/nvidia-patch/issues/9)
### D3D encoding sessions
### D3D11 and 32-bit apps encoding sessions
[Related issue](https://github.com/keylase/nvidia-patch/issues/53). Summary: this patch permanently removes limit only for CUDA NVENC sessions in 64bit apps. But once usage limit was exceeded, it persists for all apps until system reboot. So, for example, you may once open 10 sessions with 64bit version of `ffmpeg` and limit will get raised to 10 for all rest types of apps until reboot. You may follow these steps to achieve this automatically and have all limits raised (assuming patch above already applied):
[Related issue](https://github.com/keylase/nvidia-patch/issues/53). Summary: this patch permanently removes limit only for CUDA NVENC sessions in 64bit apps. But once usage limit was exceeded, it persists for all kinds of apps until system reboot. So, for example, you may once open 10 sessions with 64bit version of `ffmpeg` and limit will get raised to 10 for all rest types of apps until reboot. You may follow these steps to achieve this automatically and have all limits raised (assuming patch above already applied):
#### Method 1 (recommended)
1. Download and run [latest release](https://github.com/jantenhove/NvencSessionLimitBump/releases) of [NvencSessionLimitBump](https://github.com/jantenhove/NvencSessionLimitBump).
2. (Optional) Add it to autostart programs.
By default this application raises limit to 32 encoding sessions. Credits to @jantenhove.
#### Method 2 (alternative)
1. Download 64bit FFmpeg for Windows: https://ffmpeg.zeranoe.com/builds/
2. Unpack it somewhere.
@ -48,8 +57,6 @@ E.g, for 64bit Windows 10 running driver version 417.35 use `win10_x64/417.35/nv
4. Edit `ffmpeg_null_10streams.cmd` and set executable path to real location of your unpacked ffmpeg.
5. (Optional) Add `ffmpeg_null_10streams.cmd` to autostart programs.
Also this script is useful to check if patch applied correctly and limit was raised. Use it when nothing works and you are in doubt.
### Plex Media Server
**Bonus**: you may use [this AutoIt script](silent_bump.au3) from @wazerstar for silent startup of console applications bumping sessions.
PMS for Windows currently uses dxva2 and MF for decoding and encoding, so it uses NVENC indirectly and patch probably will not work with it immediately. It is possible [D3D recipe](#d3d-encoding-sessions) will work, but it wasn't tested at this moment.
Also you may use these methods to check if patch applied correctly and limit was raised. Use them when nothing works and you are in doubt.

@ -0,0 +1,8 @@
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile_x64=ffmpegNull10StreamsSilent.exe
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <WinAPIFiles.au3>
$ffmpegCMD = ("-y -f lavfi -i nullsrc=s=256x256:d=5 -c:v h264_nvenc -f null - -c:v h264_nvenc -f null - -c:v h264_nvenc -f null - -c:v h264_nvenc -f null - -c:v h264_nvenc -f null - -c:v h264_nvenc -f null - -c:v h264_nvenc -f null - -c:v h264_nvenc -f null - -c:v h264_nvenc -f null - -c:v h264_nvenc -f null -")
run(@scriptdir & "\" & "ffmpeg.exe" & " " & $ffmpegCMD,@ScriptDir, @SW_HIDE, $STDERR_CHILD+$STDOUT_CHILD)
Loading…
Cancel
Save