NVEnc interface cannot get preset config in Graphics Driver 320.00

I used NVenc_2.0_pkg with Quadro K4000. At graphics driver version 311.15, nvenc is able to reach 170 FPS, but I updated Driver version to 320.00, nvenc performance downgraded to 120 FPS with the same 1080p yuv stream. After debugging, NVEnc interface cannot get preset config, or interface m_pEncodeAPI->nvEncGetEncodePresetConfig returned NV_ENC_ERR_INVALID_VERSION.


Im also getting this same problem with R320.00

From the nvEncoder sample: The NVENC error at src\CNVEncoder.cpp:1282 code=15
(NVENC indicates that an invalid struct version was used by the client) “nvStatus”

Invalid struct version? how can we fix this problem?

Thanks sharing. I didnot fix this problem either.

You probably need to rebuild of all the code files, some might still point to the previous driver installation.

I have found sample problem with R320.00 and tesla k20c,who had fix this problem?

I came across this thread debugging a similar issue, so I will post my fix.

Before Fix:
GPU Nvidia M2000M Diver Version 388.XX, NvEncodeAPI Version 8.1, Cuda Version 9.1, FFMPEG V-4.0

I had this issue trying to do

ret = avcodec_open2(c, codec, NULL);

with ffmpeg.

It returned Invalid Version as well (NV_ENC_ERR_INVALID_VERSION).

I updated my GPU driver to 391.59 and it now passes that line without a version issue.