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

mearemlg

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


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.

Forgive me for my ignorance, but this graph almost seems backwards.
I thought that P1 was the lowest quality encoding, and P7 was the highest.
Why would the fps increase as the effort on the gpu for encoding also increases?
 

Attachments

  • image.png
    image.png
    9 KB · Views: 123

AaronD

Active Member
I thought that P1 was the lowest quality encoding, and P7 was the highest.
It is.

Why would the fps increase as the effort on the gpu for encoding also increases?
The size of the bars is not performance in the sense of a higher reading being better. It's measuring indirectly. Running flat-out in all cases, higher FPS means it's doing less work for each frame, which results in lower quality.

Specifically, less-efficient allocation of the available bitrate, so you start to notice what detail was dropped. For an extreme example that probably goes farther than the setting does, it may naively waste a bunch of bits to describe a big black patch of shadow, so that a face becomes blurry for lack of bits. If it had been smarter (higher setting, more work per frame), then it would have used those bits to describe the face better and let the shadow become blurry, which you don't notice. Same content, same bitrate, different quality.

If you can't max out everything and still keep up, that's the tradeoff.

Other things to keep in mind:
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.
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.
 
Last edited:

ILIG GAMER

New 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.
View attachment 91471
View attachment 91472
Hi there Sandrix!

1stly, thanks for all of your amazing knowledge

I have some questions:
1. how are you using 8200 Kbps ? ( because in Twitch broadcasting Guidelines, they say use 6000 as max! - I'm wondering isn't 6000 the max? - or the max is actually 8200 or even higher? - what is the highest Bitrate possible to use in Twitch? )

2. doesn't p7 preset cause you problems (like lags or something)? based on this post in obs forum ( where they talk about a problem from Nvidia CUDA cores that happen when using p7, psycho visual tunning and look ahead options - though it is for years ago and I'm waiting for some answers over there yet! )

3. and why exactly are you rescaling your output?

[Extra Question] : I wonder, does rescaling output, put more pressure on the system or choosing 720p as base (canvas) resolution, even though my display is 1080p ? ( I know that anyway I have rescaled my screen, but the 1st one: records 1080p and then rescale (I suppose, Correct me if I'm mistaken) and the 2nd one: has the display rescaled already and so records at 720p from the beginning )
 

sandrix

Member
Hi there Sandrix!

1stly, thanks for all of your amazing knowledge

I have some questions:
1. how are you using 8200 Kbps ? ( because in Twitch broadcasting Guidelines, they say use 6000 as max! - I'm wondering isn't 6000 the max? - or the max is actually 8200 or even higher? - what is the highest Bitrate possible to use in Twitch? )

2. doesn't p7 preset cause you problems (like lags or something)? based on this post in obs forum ( where they talk about a problem from Nvidia CUDA cores that happen when using p7, psycho visual tunning and look ahead options - though it is for years ago and I'm waiting for some answers over there yet! )

3. and why exactly are you rescaling your output?

[Extra Question] : I wonder, does rescaling output, put more pressure on the system or choosing 720p as base (canvas) resolution, even though my display is 1080p ? ( I know that anyway I have rescaled my screen, but the 1st one: records 1080p and then rescale (I suppose, Correct me if I'm mistaken) and the 2nd one: has the display rescaled already and so records at 720p from the beginning )
1. Maximum bitrate on twitch is 8500 kbps including audio bitrate. It's even written in the Amazon IVS documentation.
That is, you can set 8200 for video and 160 kbps for audio. But I usually always recommend specifying 8000, since someone might want to specify an audio bitrate of 320 kbps.

This bitrate is best used by affiliate streamers or partners. Otherwise, you should use nvidia enhanced broadcasting

2. P7 preset does not cause any problems. This is an old topic, it is irrelevant. Overall, it doesn't matter much. The difference in VMAF is negligible. The main thing is not lower than P4.

3. Reducing the output resolution allows you to save bitrate, which improves picture quality. This is relevant for streaming dynamic games with good graphics. Reducing the resolution reduces the load on the encoder. Reducing the resolution is only relevant for twitch and kick.
 

qhobbes

Active Member

sandrix

Member
@sandrix that documentation is clearly for Amazon Interactive Video Service which has a prerequisite of having an AWS account which you need to create at https://portal.aws.amazon.com/billing/signup (might be able to stream with free CloudFront option. No mention of data transfer in limit). Not mention of twitch there.

twitch broadcasting guidelines at https://help.twitch.tv/s/article/broadcast-guidelines clearly show a max of 6000. Where is it posted on twitch.tv about this 8000 bitrate?
Instead of arguing...Start a stream with a bitrate of 8200 and see for yourself. Next, start the stream with a bitrate of 8600 and your broadcast will stop working, error #1000. This has been possible since 2016! I have been using a bitrate of 8000 kbps for 4 years. 6000 kbps, this is only a RECOMMENDATION! Amazon IVS documentation relates directly to twitch.
 

ILIG GAMER

New Member
1. Maximum bitrate on twitch is 8500 kbps including audio bitrate. It's even written in the Amazon IVS documentation.
That is, you can set 8200 for video and 160 kbps for audio. But I usually always recommend specifying 8000, since someone might want to specify an audio bitrate of 320 kbps.

This bitrate is best used by affiliate streamers or partners. Otherwise, you should use nvidia enhanced broadcasting

2. P7 preset does not cause any problems. This is an old topic, it is irrelevant. Overall, it doesn't matter much. The difference in VMAF is negligible. The main thing is not lower than P4.

3. Reducing the output resolution allows you to save bitrate, which improves picture quality. This is relevant for streaming dynamic games with good graphics. Reducing the resolution reduces the load on the encoder. Reducing the resolution is only relevant for twitch and kick.
Hi, again Sandrix!

Thanks for all this amazing Knowledge!

I did some research to get to understand of some stuff, now I have some questions. I would love it , if you were able to answer them as well ( Thanks anyway )
1. is Amazon IVS a 3rd party service ( I mean can we use it for twitch and... ) or it's just for Amazon Web service?

2. by " Nvidia Enhanced Broadcasting " , are you referring to this option through OBS : Settings/ Stream/ Multitrack Video/ Enable Enhanced Broadcasting? ( I'm using the stream Key option right now because of some issues )
[ Note: I wanted to take and put screenshots for the sake of clarity, but for some reason that I don't know about, I can't capture screenshots while on OBS window ]

3. for streaming at 8000Kbps, in Settings/ Stream/ Advanced options -> should I check the box for the option: " ignore stream service recommendation " ?

4. Is there anyway that I record the same Highest-Quality video source that I'm sending to twitch ( for live stream ) without putting further more pressure on my system?

This bitrate is best used by affiliate streamers or partners. Otherwise, you should use nvidia enhanced broadcasting
5. Is this because the "Enhanced Broadcasting" limit that doesn't support more than 6000Kbps ? ( I read its overview, the one for "Twitch Enhanced Broadcasting" )
 

AaronD

Active Member
4. Is there anyway that I record the same Highest-Quality video source that I'm sending to twitch ( for live stream ) without putting further more pressure on my system?
For the Recording, don't choose a specific encoder, but "(Use stream encoder)" instead. That siphons off the streaming data and dumps it to the file also. One encoding feeds both destinations, instead of a separate one for each.

Of course, that also means that you must have the exact same content with the exact same quality. If you want any difference at all, then you need a separate encoder.

It's generally considered a trade-off or compromise to have them both the same, because the stream has some requirements that don't work as well for a recording. Constant bitrate vs. constant quality, for example.
 
Last edited:

sandrix

Member
Hi, again Sandrix!

Thanks for all this amazing Knowledge!

I did some research to get to understand of some stuff, now I have some questions. I would love it , if you were able to answer them as well ( Thanks anyway )
1. is Amazon IVS a 3rd party service ( I mean can we use it for twitch and... ) or it's just for Amazon Web service?

2. by " Nvidia Enhanced Broadcasting " , are you referring to this option through OBS : Settings/ Stream/ Multitrack Video/ Enable Enhanced Broadcasting? ( I'm using the stream Key option right now because of some issues )
[ Note: I wanted to take and put screenshots for the sake of clarity, but for some reason that I don't know about, I can't capture screenshots while on OBS window ]

3. for streaming at 8000Kbps, in Settings/ Stream/ Advanced options -> should I check the box for the option: " ignore stream service recommendation " ?

4. Is there anyway that I record the same Highest-Quality video source that I'm sending to twitch ( for live stream ) without putting further more pressure on my system?


5. Is this because the "Enhanced Broadcasting" limit that doesn't support more than 6000Kbps ? ( I read its overview, the one for "Twitch Enhanced Broadcasting" )
1. Amazon IVS (Interactive Video Service) is a video hosting and real-time streaming service developed by Amazon Web Services (AWS). Twitch, as a subsidiary of Amazon, uses Amazon IVS as the foundational technology for its streams. Twitch leverages Amazon IVS infrastructure to streaming.

2. Yes. This option is useful for new streamers for whom Twitch does not provide transcoding. For affiliate streamers and partners, the option is frankly useless.

3. In advanced settings mode this does not matter. In simple mode is a must if you need 8000 bitrate.

4. In the recording settings, you can select "Use stream encoder". Recording will be carried out with the same settings as for broadcasting. No, in any case, this will require additional resources, but for hardware encoders this is not a problem.

5. This is related to this
1734012315175.jpeg

Viewers don't have a choice of additional resolutions if you're a new streamer. Therefore, you need to become at least an affiliate streamer so that Amazon (Twitch) servers provide transcoding (additional permissions), or you use enhanced broadcasting. With EB, transcoding will be performed using the resources of your video card.
 
Top