Problems with calling "nvEncInitializeEncoder".

Hi,

I met some problems of using “nvEncInitializeEncoder”. If I only provide NV_ENC_INITIALIZE_PARAMS with |version|, |encodeWidth| and |encodeHeight|, then “nvEncInitializeEncoder” failed with error code NV_ENC_ERR_INVALID_VERSION. However if I also provide version for |encodeConfig| , then “nvEncInitializeEncoder” will fail with error NV_ENC_ERR_INVALID_PARAM.

Can someone help me with this issue?

I am using linux system and the SDK version is 9.0.20. The minimum driver version in readme.txt is 418.30 and my driver version is 418.67. My gpu is GeForce GTX 1060 6GB.

Thanks!

Hi.
All the fields in the structures passed to the encode API are supposed to be initialized correctly.
Please look into samples provided along with the SDK for reference.

Thanks.

As you said, the reason is that I didn’t initialize all parameters correctly. Thanks!

Hi, can you please take a look of my another question? Thanks!

Hello,

I am facing a similar problem:
“nvEncInitializeEncoder” always fails with “NV_ENC_ERR_INVALID_PARAM”.
I also checked the SDK samples, and to the best of my knowledge everything should be correct.

Actually this code worked in the past with Quadro K1200 on Windows7.
Now I have new computer with Quadro P2000 on Windows10 (driver v27.21.14.5148) and facing this error.

I there any kind of debug logging available to figure out WHICH of the parameters is invalid?
Or were there any changes in the driver so that the initialize parameters must be adapted?
I am struggling for days now…

Thanks in advance for you help,
kind regards,
Robert

Hello,

I am facing a similar problem:
“nvEncInitializeEncoder” always fails with “NV_ENC_ERR_INVALID_PARAM”.

Actually this code worked in the past with Quadro K1200 on Windows7.
Now I have new computer with Quadro P2000 on Windows10 (driver v27.21.14.5148) and facing this error.

I there any kind of debug logging available to figure out WHICH of the parameters is invalid?
Or were there any changes in the driver so that the initialize parameters must be adapted?

I reviewed the API programming guide again, and to the best of my knowledge everything should be correct:
https://docs.nvidia.com/video-technologies/video-codec-sdk/nvenc-video-encoder-api-prog-guide/index.html#initializing-the-hardware-encoder-session

I also re-installed the old K1200 back into the new computer, but same result…

I am struggling for days now and running out of ideas… is there anything else I could try?

Thanks in advance for you help,
kind regards,
Robert