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: 10

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:
Top