Preset GUIDs for NvEncodeAPI


I’m working on a project, which was using an older video codec SDK, namely v9.1. I upgraded it to v11.1.5 and got some warnings, because the preset GUIDs were deprecated. I went through the header file and found the new ones, but when I tried using them and placed the new GUID in place of the old one I got some errors. In fact the NvEncGetEncodePresetConfig function returnd error code 12 , which corresponds to NV_ENC_ERR_UNSUPPORTED_PARAM. I tried using NvEncGetEncodePresetConfigEx, which actually worked, but then I encountered another problem. Initialising the encoder with NvEncInitializeEncoder failed, presumably because of the new GUID provided in the NV_ENC_INITIALIZE_PARAMS struct.

For more context I am trying to encode a H264 video and I have a NVIDIA GeForce RTX 3060 Ti GPU. I replaced the GUIDs according to the table given in the preset migration guide. I also tried the steps listed in the video codec sdk (which I cannot link, since I’m allowed only one link) with the same result. Strangely, I can see all the GUIDs applicable to my GPU for H264 encoding by calling NvEncGetEncodePresetGUIDs , including the new ones.

I’m looking to solve the issue, but I cannot think of further steps, so I would like to know if someone has encountered the same problem or if this is a known bug in this SDK version. Any help would be appreciated.


Did you figure it out?
I am facing the same issue and so far have not been able to find what is causing it.


No I wasn’t able to, I just went back to the old version instead.

Thank you for your quick reply!

After hours of tinkering I finally managed to get it to work by setting these two parameters :
rcParams.multiPass = NV_ENC_MULTI_PASS_DISABLED;
rcParams.lowDelayKeyFrameScale = 0;

Hopefully this will help anyone in the same situation.

Great, thanks for letting me know!