NVENC streaming Preset and Multipass Mode - what settings are correct for streaming?

Hi!

I want to ask about these two settings:
- Preset
- Multipass mode
I use NVENC and Preset P5: Slow (Good Quality) and for Multipass I use Single Pass.
What are the correct settings for streaming? Is there anything we should be guided by when choosing these options?
Is it a big diference betwenn P5 Slow Good Quality and P7 Slowest Best Quality when it comes to computer load (usage) during the stream?

My PC specs:
  • CPU: i5 9600k no OC yet
  • GPU: Zotac RTX3060 AMP White 12GB
  • Mobo: Gigabyte B360HD3
  • RAM: Crucial Ballistix Sport LT 16GB (2x8GB) DDR4 2666MHz CL16 White
  • PSU: 500W
  • Keyboard: HyperX Alloy
  • Headphones: HyperX Stinger
  • Mouse: Logitech G502X Plus White
  • Microphone: Elgateo Wave 1
  • Recording/Streaming software: OBS Open Broadcaster Sofware
  • Editing sofware: DaVinci Resolve 18 free version
  • Xbox Series S
  • Monitor 1: LG 24GN650-B - gaming
  • Monitor 2: Benq XL2411Z - chat
 

Attachments

  • Przechwytywanie.PNG
    Przechwytywanie.PNG
    5.3 KB · Views: 3,059

sandrix

Member
P5-P7 are close in performance. The difference in quality between them is also not significant and is only a few percent (depending on the content). Up to 2K resolution (Inclusive) you can use P7.
scale_2400


Multi pass mode

In 1-pass rate control modes, the encoder will estimate the required QP for the macroblock and immediately encode the macroblock.

In 2-pass rate control modes, NVENC estimates the complexity of the frame to be encoded and determines bit distribution across the frame in the first pass. In the second pass, NVENC encodes macroblocks in the frame using the distribution determined in the first pass. 2-pass rate control modes can distribute the bits more optimally within the frame and can reach closer to the target bitrate, especially for CBR encoding.
  • none
    1pass mode. (fast)
  • 2pass-quarter
    Runs first pass in quater resolution, which results in larger motion vectors being caught and fed as hints to second pass.
  • 2pass-full
    Runs first pass in full resolution, slower but generating better statistics for the second pass.
I would recommend using 2pass-quarter. This is the best option.

 

AaronD

Active Member
I would recommend using 2pass-quarter. This is the best option.
Not all cards support that. For the ones that don't, OBS waits for the last moment to give you a cryptic error popup. The log has the complete error message, which tells you the real problem, but the popup cuts off the useful part.

2pass-full often works in that case, as it says in the log but not the popup.
 

sandrix

Member
Not all cards support that. For the ones that don't, OBS waits for the last moment to give you a cryptic error popup. The log has the complete error message, which tells you the real problem, but the popup cuts off the useful part.

2pass-full often works in that case, as it says in the log but not the popup.

From my article
NVENC Error: init_encoder_h264: nv.nvEncinitializeEncoder(enc->session, &enc->params) failed: 8 (NV_ENC_ERR_INVALID_PARAM) in OBS Studio

Usually the error occurs after installing/updating OBS 28.1 and above.
The error is due to the fact that the presets for the NVENC encoder have been updated and after installing OBS, the Quarter Resolution multi-pass encoding mode is automatically set, which is not supported on video cards based on the Maxwell and Kepler architecture.
NVIDIA specifically compiled a migration table.
 

sandrix

Member
Better, but not always. StreamFX needs to be properly configured depending on the content. You should understand exactly which parameter is responsible for what, how it affects the quality, otherwise it can only get worse.
The encoder settings in OBS offer far fewer options, but they are sufficient in most cases. Everything else will take too long.

You can send your log file if in doubt about the current settings.
 
@sandrix I have uploaded my logfile from my last stream.

Can you recommend any tutorials/guides for StreamFX to get better quality? I like tweaks like that. Maybe I will not change anything but I would like to get know a little more about it. :)
 

Attachments

  • 2023-02-03 23-52-46.txt
    22.6 KB · Views: 275

sandrix

Member
Basic information at the link above. There is a website, but it doesn't work for me:

You can check out my guides and articles if you want, but you'll need the built-in translator in chrome)

Your log file does not contain recording, broadcasting sessions.
 
Thanks for informations. I dont speak russian so it will be fun to read it but anyway thank you! :D

I have attached the wrong file I'm sorry. Also right now I have opened to many times OBS and I do not have logfiles while I was streaming. I will write to you @sandrix with logfile after I streamed. Thanks for help.
 
Hey @sandrix

I have not streamed yet but I have record my gameplay. The difference between my streaming settings and recording are not big. The only difference is "Rate Control" for streaming I use "CBR with 5000 bitrate" and for recording I use "CQP with 22 CQ Level" I wonder if the qualiy of CQ 22 is good enough. I think the 20 i totaly minimum fo recording.

The rest settings are the same. I have attached my logfile. Also here under this link is the a short rendered video in DaVinci Resolve of my last gameplay - https://drive.google.com/drive/folders/1y0rXDw8gPcrmfPO4APhgo4GejBbpDuvK?usp=sharing

If you have any suggest what to change I have open mind! :)
 

Attachments

  • 2023-02-06 23-10-02 - recording.txt
    26.3 KB · Views: 127

AaronD

Active Member
I have not streamed yet but I have record my gameplay. The difference between my streaming settings and recording are not big. The only difference is...
If there's any difference at all, then you're encoding twice: once for the recording and once for the stream. There's also an option to use the stream encoder for recording, which allows you to only encode once and send that result to both places. So even if the settings are all the same, but you don't have that option on, you're still encoding twice.

Depending on your hardware, that could make the difference between two mediocre results, or one really good result that is copied to both places.
 
@AaronD
I do not use the same profile for streaming and recording. I have two seperates profile for each task. One profile for recording and second for streaming. That's easier for me and it sutibale better for my personal use.

That is why I said that my streaming settings are almost the same and the only difference is bitrate plus for streaming I use CBR not CQP.

Also You have asked about my hardware so here it is:
GPU: Zotac RTX3060 AMP White 12
Mobo: Gigabyte B360HD3
RAM: Crucial Ballistix Sport LT 16GB (2x8GB) DDR4 2666MHz CL16 Whi
PSU: 50
Keyboard: HyperX All
Headphones: HyperX Sting
Mouse: Logitech G502X Plus Whi
Microphone: Elgateo Wave
Recording/Streaming software: OBS - Open Broadcaster Sofwa
Editing sofware: DaVinci Resolve 18 free version
SSD1 500GB: OS + OBS
M2 PCIE 1TB: GAMES + DaVinci Resolve + I use this drive for recording
HDD 7200RPM 1TB: I keep here all my other stuff + all my rendered files as my backup
 

sandrix

Member
Your settings look good except for the bitrate. It looks like you can't use more, that's not good. Use this to find the optimal server and speed.

Anyway, to make it clearer, here are my settings (twitch) for dynamic content.
1675835214274.png

1675835240978.png
 
Thanks for help. I can use more bitrate. My connection is like 40/40 Mbps so I can easly increase bitrate. I thought that non partnered on Twtich can't use higher bitrate than 6000.

Also thanks for your settings. I compared it to my settings and it looks similar the difference is preset but I will stay at P6. I have watched EposVox on youtube and he tested all presets. The P6 became the more suitable with the highest score.
 

Archaic

New Member
@sandrix can I ask you where is this image from? I think I need to read the source. I have ended here multiple times in my searches... haha
i'd love to know too, because the entire point of NVENC is that it basically doesn't effect your in game FPS hardly at all. Theres no way this data is real lol
 

rockbottom

Active Member
The chart has nothing to do with the rendering of a game or video. The chart shows the throughput of the NVENC encoder using the different presets & multi-pass modes. I get similar performance to what the chart shows so the numbers are solid.
 
Last edited:

ILIG GAMER

New Member
P5-P7 are close in performance. The difference in quality between them is also not significant and is only a few percent (depending on the content). Up to 2K resolution (Inclusive) you can use P7.
scale_2400
Hi man, Can I ask how did you get this picture? I mean I'm wondering if it is a test or something that I can get as well for different sources

would appreciate the help!
 

sandrix

Member
Hi man, Can I ask how did you get this picture? I mean I'm wondering if it is a test or something that I can get as well for different sources

would appreciate the help!
you need ffmpeg for this
 

Xaymar

Active Member
you need ffmpeg for this
I would not rely on the performance numbers there, as they include the overhead of uploading raw frames to the GPU. This is equivalent to a game loading resources all the time, so it does not show the actual performance impact on the game or encoder if there happened to be actual rendering happening.
 
Top