NVEnc Feedback thread (2014)

Status
Not open for further replies.

Xphome

Member
Re: 0.60 test build 6

KingCobra said:
Code:
23:41:51: Successfully loaded ObsNvenc.dll
23:41:51: ObsNvenc initialized successfully
23:41:51: CUDA loaded successfully
23:41:51: 1 CUDA capable devices found
23:41:51: [ GPU #0 - < GeForce GTX 670 > has Compute SM 3.0, NVENC Available ]
23:41:51: NVENC internal init finished successfully
23:41:51: nvEncOpenEncodeSessionEx failed - invalid license key?
23:41:51: Couldn't initialize encoder
Do you have a license or are you using the DLL BtbN provided? Otherwise it won't work.
 

Joe33345

Member
Re: 0.60 test build 6

Everybody that needs the DLL go back to Page 2 on this Thread and scroll to the bottom. A user has provided the DLL needed :-)
 

KingCobra

New Member
Re: 0.60 test build 6

Xphome said:
Do you have a license or are you using the DLL BtbN provided? Otherwise it won't work.
i try to use dlls from 2nd page and dll from archive with test build, both dont work on 32 and 64 bits
 

ExitSign

Member
Re: 0.60 test build 5

BtbN said:
The newest test build contains support for Nvidia NVENC.
In order to use it you either need to set the environment variable NVENC_KEY with a valid nvenc license key in standard GUID/CLSID format, or download a precompiled binary with a license key already built in.

You can download them here:
64bit OBS: https://btbn.de/files/64bit/ObsNvenc.dll
32bit OBS: https://btbn.de/files/32bit/ObsNvenc.dll

Just place it in the same dir as OBS.exe, replacing the already existing one. It's not a plugin, so it doesn't go into the plugins dir.

Keep in mind that this feature is still quite new and experimental, but works fine in general. Any kind of feedback about this is highly encouraged!

You need a Kepler GPU(series 600 or better) to be able to use this.


It doesn't work!

I just pulled the latest code from github, compiled. Copied the dll over. but nothing. Always greyed out.

Are there any logs from the init/startup process available? I don't see anything in the normal log file directory.

edit: Same when I use your latest test build binaries (not compile it myself) + the linked dll

edit2: just checked with the guys on IRC. Probably the licensed 64 bit version of NvEnc (from BtBn) is broken.

Everything seems to work on 32 bit, but on 64 bit it complains about license.

Here is the log (I forced the checkbox ON in the code):

00:40:14: Successfully loaded ObsNvenc.dll
00:40:14: ObsNvenc initialized successfully
00:40:14: CUDA loaded successfully
00:40:14: >> cuInit(0) - failed with error code 0x3e7
00:40:14: Couldn't initialize encoder
00:40:14: Number of times waited to send: 0, Waited for a total of 0 bytes
00:40:14: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
00:40:14: Number of bytes sent: 0
00:40:14: =====Stream End: 2014-01-09, 00:40:14=================================================
 

Furyliciouz

New Member
Re: 0.60 test build 6

Hi,

so I tried NVENC out and stream on twitch wont load at all. Is that on purpose, on twitch's end or did i do something wrong?

Code:
23:37:35: Open Broadcaster Software v0.60b test build 6 - 64bit ( ^ω^)
23:37:35: -------------------------------
23:37:35: CPU Name: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
23:37:35: CPU Speed: 3392MHz
23:37:35: Physical Memory:  8025MB Total, 5446MB Free
23:37:35: stepping id: 9, model 58, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
23:37:35: monitor 1: pos={0, 0}, size={1920, 1080}
23:37:35: monitor 2: pos={-1920, 0}, size={1920, 1080}
23:37:35: Windows Version: 6.2 Build 9200 
23:37:35: Aero is Enabled
23:37:35: -------------------------------
23:37:35: OBS Modules:
23:37:35: Base Address     Module
23:37:35: 0000000068890000 OBS.exe
23:37:35: 0000000009950000 OBSApi.dll
23:37:35: 000000000E670000 DShowPlugin.dll
23:37:35: 000000000D380000 GraphicsCapture.dll
23:37:35: 000000000D580000 NoiseGate.dll
23:37:35: 000000000D360000 PSVPlugin.dll
23:37:35: ------------------------------------------
23:37:35: Adapter 1
23:37:35:   Video Adapter: NVIDIA GeForce GTX 660 Ti
23:37:35:   Video Adapter Dedicated Video Memory: 2086469632
23:37:35:   Video Adapter Shared System Memory: 2147807232
23:37:35:   Video Adapter Output 1: pos={0, 0}, size={1920, 1080}, attached=true
23:37:35:   Video Adapter Output 2: pos={-1920, 0}, size={1920, 1080}, attached=true
23:37:35: ------------------------------------------
23:37:35: Adapter 2
23:37:35:   Video Adapter: Intel(R) HD Graphics 4000
23:37:35:   Video Adapter Dedicated Video Memory: 100663296
23:37:35:   Video Adapter Shared System Memory: 1778384896
23:37:35: =====Stream Start: 2014-01-08, 23:37:35===============================================
23:37:35:   Multithreaded optimizations: On
23:37:35:   Base resolution: 852x480
23:37:35:   Output resolution: 852x480
23:37:35: ------------------------------------------
23:37:35: Loading up D3D10 on NVIDIA GeForce GTX 660 Ti (Adapter 1)...
23:37:35: ------------------------------------------
23:37:35: Audio Format: 44100hz
23:37:35: Playback device Default
23:37:35: ------------------------------------------
23:37:35: Using desktop audio input: Speakers (Realtek High Definition Audio)
23:37:35: ------------------------------------------
23:37:35: Using auxilary audio input: CABLE Output (VB-Audio Virtual Cable)
23:37:35: ------------------------------------------
23:37:35: Audio Encoding: AAC
23:37:35:     bitrate: 128
23:37:35: Using graphics capture
23:37:35: Using Window Capture
23:37:35: Using Window Capture
23:37:35: Using bitmap image
23:37:35: Scene buffering time set to 700
23:37:35: Successfully loaded ObsNvenc.dll
23:37:35: ObsNvenc initialized successfully
23:37:35: CUDA loaded successfully
23:37:35: 1 CUDA capable devices found
23:37:35: [ GPU #0 - < GeForce GTX 660 Ti > has Compute SM 3.0, NVENC Available ]
23:37:35: NVENC internal init finished successfully
23:37:35: NVENC supports 7 h264 presets
23:37:35: ------------------------------------------
23:37:35: Video Encoding: NVENC
23:37:35:     fps: 60
23:37:35:     width: 852, height: 480
23:37:35:     preset: llhq
23:37:35:     profile: high
23:37:35:     level: autoselect
23:37:35:     keyint: 120
23:37:35:     CBR: yes
23:37:35:     CFR: no
23:37:35:     max bitrate: 1000
23:37:35:     buffer size: 1000
23:37:35: ------------------------------------------
23:37:35: MMDeviceAudioSource: Frequency for device 'Speakers (Realtek High Definition Audio)' is 384000, samples per sec is 48000
23:37:35: MMDeviceAudioSource: Frequency for device 'CABLE Output (VB-Audio Virtual Cable)' is 352800, samples per sec is 44100
23:37:35: SharedTexCapture hooked
23:37:37: Using RTMP service: Twitch / Justin.tv
23:37:37:   Server selection: rtmp://live-ams.justin.tv/app
23:37:37:   Interface: Realtek PCI GBE Family Controller (ethernet, 100 mbps)
23:37:37: Completed handshake with rtmp://live-ams.justin.tv/app in 488 ms.
23:37:38: SO_SNDBUF was at 65536
23:37:38: SO_SNDBUF is now 65536
23:37:39: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 131072 (buffer: 0 / 144384)
23:37:43: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 262144 (buffer: 0 / 144384)
23:42:56: Total frames encoded: 19204, total frames duplicated: 4 (0.02%)
23:42:56: Total frames rendered: 19212, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
23:42:56: RTMPPublisher::SocketLoop: Graceful loop exit
23:42:56: Average send payload: 2254 bytes, average send interval: 22 ms
23:42:56: Number of times waited to send: 0, Waited for a total of 0 bytes
23:42:56: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
23:42:56: Number of bytes sent: 31854538
23:42:56: Encoder closed
23:42:56: NVENC deinitialized
23:42:56: 
23:42:56: Profiler time results:
23:42:56: 
23:42:56: ==============================================================
23:42:56: video thread frame - [100%] [avg time: 0.9 ms] [children: 54.6%] [unaccounted: 45.4%]
23:42:56: | scene->Preprocess - [47.2%] [avg time: 0.425 ms]
23:42:56: | GPU download and conversion - [7.33%] [avg time: 0.066 ms] [children: 5.33%] [unaccounted: 2%]
23:42:56: | | flush - [2.78%] [avg time: 0.025 ms]
23:42:56: | | CopyResource - [2.22%] [avg time: 0.02 ms]
23:42:56: | | conversion to 4:2:0 - [0.333%] [avg time: 0.003 ms]
23:42:56: Convert444Threads - [100%] [avg time: 0.2 ms] [children: 99%] [unaccounted: 1%]
23:42:56: | Convert444toNV12 - [99%] [avg time: 0.198 ms]
23:42:56: encoder thread frame - [100%] [avg time: 4.177 ms]
23:42:56: ==============================================================
23:42:56: 
23:42:56: 
23:42:56: Profiler CPU results:
23:42:56: 
23:42:56: ==============================================================
23:42:56: video thread frame - [cpu time: avg 0.394 ms, total 7578.13 ms] [avg calls per frame: 1]
23:42:56: | scene->Preprocess - [cpu time: avg 0.006 ms, total 125 ms] [avg calls per frame: 1]
23:42:56: | GPU download and conversion - [cpu time: avg 0.094 ms, total 1812.5 ms] [avg calls per frame: 1]
23:42:56: | | flush - [cpu time: avg 0.037 ms, total 718.75 ms] [avg calls per frame: 1]
23:42:56: | | CopyResource - [cpu time: avg 0.03 ms, total 593.75 ms] [avg calls per frame: 1]
23:42:56: | | conversion to 4:2:0 - [cpu time: avg 0.008 ms, total 171.875 ms] [avg calls per frame: 1]
23:42:56: Convert444Threads - [cpu time: avg 0.304 ms, total 11687.5 ms] [avg calls per frame: 2]
23:42:56: | Convert444toNV12 - [cpu time: avg 0.304 ms, total 11687.5 ms] [avg calls per frame: 2]
23:42:56: encoder thread frame - [cpu time: avg 0.002 ms, total 46.875 ms] [avg calls per frame: 1]
23:42:56: ==============================================================
23:42:56: 
23:42:56: =====Stream End: 2014-01-08, 23:42:56=================================================

Any help is appreciated :)

Edit: Bold part is new, should have written that from the start.. silly me
Edit2: Past Broadcast but it got recorded...
 

Floatingthru

Community Helper
Re: 0.60 test build 6

Furyliciouz everything looks like its working just fine. If you can't load your own stream then its an issue with twitch I suppose. Especially if there is a vod of the stream afterwards.
 

xiuide

Member
Re: 0.60 test build 6

I've got NvEnc working fine, but like others have reported there is a sever lack of quality associated with it at this moment. I am really looking forward to seeing what it can do though.

As an aside, It didn't like trying to encode 1080p@60 on my GTX 660 (non ti) which makes me a sad camper :(
 

BtbN

Member
Re: 0.60 test build 6

All possible options are now exported and imported via two xconfig files in %appdata%\OBS , so everyone who likes can try to finetune the encoding quality.
The last_nvenc_config.xconfig file allways contains the options used on the last init. The nvenc_config.xconfig can be used to override some/all options. It uses the same format. Omitting an option in nvenc_config just leaves it unchanged from the preset default.
 

xiuide

Member
Re: 0.60 test build 6

http://pastebin.com/1DgVxk4s

there ya go, all shiny and loggy like

The highest I can go resolution wise seems to be 720p anything past that and I get the can't keep up error. Tried several framerates on that as well.
 

rakunvar

Member
Re: 0.60 test build 6

I'm like pretty Newb to the Nvenc lol so I'm going through all the settings and reading about them in the NVENC_RefManual. I have however been playing with Shadowplay and learning about it a lot lately.

I came across enableEncodeAsync and enablePTD and the Manual is saying:
The client should set NV_ENC_INITIALIZE_PARAMS::enablePTD to 1 for allowing the
HW encoder to take Picture-type decision. Set it to 0 if client wants to decide picture
type for encoded output.

Note: NV_ENC_INITIALIZE_PARAMS::enableEncodeAsync == 0 and
NV_ENC_INITIALIZE_PARAMS:: enablePTD == 1 are not a compatible combination.

In the stock setting PTD is set @ 1, should I put it to 0 or am I just over-reading into things atm lol?
 

BtbN

Member
Re: 0.60 test build 6

enablePTD and enableEncodeAsync are the only two settings i ignore when reading back the configure file.

enablePTD controls wether nvenc automaticaly decides the picture type(I/P/B), and async mode is a diffrent mode of operation which i simply decided not to use.

PTD has to be on, and asyncMode has to be off, otherwise the whole code wouldn't work at all.
I haven't read anything about this beeing not a compatible combination. It works fine, so i assume that information is outdated.
 

rakunvar

Member
Re: 0.60 test build 6

Alright :) Will do, thanks for the assitance and the work put into this ^^ Just figured I should ask was all.
 

Floatingthru

Community Helper
Re: 0.60 test build 6

xiuide said:
http://pastebin.com/1DgVxk4s

there ya go, all shiny and loggy like

The highest I can go resolution wise seems to be 720p anything past that and I get the can't keep up error. Tried several framerates on that as well.

Yeah, so the preset llhq (low latency high quality) is really only meant for 720p as it is really taxing on the chip for whatever reason. If you want to do 1080p@60fps go to advanced settings in obs, tick and enable custom x264 encoder settings, then enter "hq" without the quotes in the field. This will change the preset of nvenc to one that will be able to handle the encoding. Since most people won't look at the github commits ill post the other presets here.

"hp" = high performance
"hq" = high quality
"bd" = bluray disk
"ll" = low latency
"llhp" = low latency high performance
"llhq" = low latency high quality (current default preset if you enter no custom settings)
"default" = default

Feel free to mess around with them all if you would like. Preset "hq" is good for 1080p@60fps up to around 50000 bitrate.
Higher the bitrate the more the encoder will chug and start to duplicate frames, so keep that in mind while testing.
 

Grue

New Member
Re: 0.60 test build 6

Ok so this option rateControlMode : 2 to which of these parameters corresponds?

NV_ENC_PARAMS_RC_CONSTQP Constant QP mode
NV_ENC_PARAMS_RC_VBR Variable bitrate mode
NV_ENC_PARAMS_RC_CBR Constant bitrate mode
NV_ENC_PARAMS_RC_VBR_MINQP Variable bitrate mode with MinQP
NV_ENC_PARAMS_RC_TWOPASS_CBR Constant bitrate mode using two pass encoding

From what I read NV_ENC_PARAMS_RC_TWOPASS_CBR is best quality and CLOUD_GAMING_720p30 is the highest quality preset...
 
Status
Not open for further replies.
Top