--- title: Accidental NVENC Discoveries category: Blog tags: ["NVIDIA", "NVENC", "H264", "H265", 'WordPress Archive'] ---

While testing new updates to the VES testing suite, I discovered some weird behavior in NVENC. Here's a list of them, maybe NVIDIA can shed some light on it:

G-Sync affects NVENC Encoding Speed

For unknown reasons G-Sync affects the rate of encoding provided by NVENC, no matter how you submit frames to it. So in case you're hitting "Encoding Overloaded" in OBS Studio for no actual reason, try disabling G-Sync globally.

Constant Quality is a lie?

The "Constant Quality" encoding method often used for archival and also often mistaken for an alternative to x264 CRF has a default bitrate limit. For H.264/AVC the maximum bitrate it will pick is 135mbit/s, while for H.265/HEVC it will pick is 25mbit/s. You can affect these limits by explicitly setting the maxBitRate ("-maxrate" in FFmpeg) and vbvBufferSize ("-bufsize" in FFmpeg) to a higher value.

Please note that doing this means that you will need a more modern decoder to view or edit the footage. I still recommend to go with the highest possible maximum bitrate in order to get the best out of your footage.

H.265/HEVC struggles representing Foliage

Even with the above maximum bitrate fix applied, the HEVC NVENC encoder has a weird affinity to just murder foliage for no actual reason. It seems that there is a noise pattern detection method that freaks out once the foliage gets too large, and fails to adapt to the fact that the foliage now has even more detail than before.