I have the nvEncDXGIOutputDuplicationSample sample from NVIDIA’s GitHub. What I want to do seems like it should be relatively simple. I want to change the color conversion to convert to YUV420/I420 instead of NV12.
I changed this line from
NV_ENC_BUFFER_FORMAT_IYUV, and then added
case NV_ENC_BUFFER_FORMAT_IYUV: return DXGI_FORMAT_420_OPAQUE;
Unfortunately, when I try and run the code now, I get Error 0x80070057
E_INVALIDARG in CreateVideoProcessorOutputView at this line
Any ideas why? The modifications I made were so small so I can’t imagine why it would be causing a problem.