After updating driver to 398.36 on one of our test machines(gtx 970, maxwell), nvidia encoding is failed in nvEncOpenEncodeSessionEx with NV_ENC_ERR_UNSUPPORTED_DEVICE.
Following code is what I am using for opening nvidia encoding session… Any idea?
I found the reason…
Now I am using triple monitors and two of them were connecting to mother board, not nvidia card.
I could resolve it with connecting those monitors to nvidia card.
But here is question… Why it causes this plen when some of monitors are connected to mother board?
Which device type are you using here? Is it DX or CUDA?
For a moment, assuming that you are using DX device here, it seems that you may be passing a device created on a non-NVIDIA adapter to nvEncOpenEncodeSessionEx. If the device is not created a proper adapter then nvEncOpenEncodeSessionEx API is expected to fail.
What we think/guess could be happening here is when you are connecting all your displays to NVIDIA card, then the adapter being enumerated is NVIDIA’s and device is created on NV GPU and hence nvEncOpenEncodeSessionEx started to pass.
Yes I am using DX device…
If so, there is no way to create the device on Nvidia adapter by force no matter what monitors are connected to mother board and graphics card together?
I’m also using NvOptimusEnablement api just in case.
GPU in use: TITAN RTX
unknown file: Failure
C++ exception with description "NvEncoder : m_nvenc.nvEncOpenEncodeSessionEx(&encodeSessionExParams, &hEncoder) returned error 2 .