I am trying to use a Quadro P6000 on CentOS 7 using driver version 390.59 and video codec SDK 8.2.16 to encode HEVC video. If I have intra refresh disabled it works fine. As soon as I enable intra refresh (NV_ENC_CONFIG_HEVC::enableIntraRefresh = true), it fails with error code 8 (NV_ENC_ERR_INVALID_PARAM) on the encoder initialization call on line 273 in NvEncoder.cpp.
I have verified that intra refresh is supported in HEVC on the card by checking the capabilities. I have also tried changing other parameters to see if maybe I have some invalid combination of parameters. I have not been able to get it to work. Also, using the exact same parameters, including enabling intra refresh, with H264 works just fine.
Does anyone have any idea what I may be doing wrong or how to further toubleshoot this?
Thanks for the reply. I’m new to video codecs. Is interlaced encoding the same as intra refresh?
Assuming the answer is yes, why would the NV_ENC_CONFIG_HEVC struct even have the enableIntraRefresh field? Why would calling NvEncoderCudaInstance.GetCapabilityValue(NV_ENC_CODEC_HEVC_GUID, NV_ENC_CAPS_SUPPORT_INTRA_REFRESH) return 1?
EDIT: Assuming the answer is no, my original question still applies.
Interlaced is completely different from intra refresh. Interlaced content is where a single frame has 2 fields of data. HEVC spec doesn’t support field/interlaced encoding. H.264 spec does support it.
However, intra refresh is an error resiliency feature used in streaming scenarios. Let’s say during a game streaming session, a frame gets corrupted due to errors introduced when the frame is getting transmitted. You can send an IDR frame, but sending an IDR across a low bandwidth transmission medium may not be possible. With intra refresh, you send waves of intra MBs across multiple frames and hence help client recover from error scenarios.
Could you let us know what exactly you are trying to achieve, we can then help you better. Why are you trying to use intra refresh? What is your use-case?
Also, which drivers are you using, and which GPU are you working on?
Ryan, thank you for your reply and explanations. That matches what I thought but the original reply caused me to doubt my understanding.
I am attempting to generate a low latency real time stream over low bandwidth links as you described. I am attempting to enable intra refresh for the reasons you outlined. Unfortunately I keep getting the error listed in my original post when using HEVC (intra refresh works fine for H264).
As mentioned in my original post, I’m using a Quadro P6000 with driver version 390.59 and video codec version 8.2.16 on CentOS 7. Eventually this will need to work on other GPUs and driver versions, but I need to get intra refresh working first.
Can you post the code where you are setting up various NVENC structures? If you have modified the sample app from the SDK, please post the code or send it to me via a PM.
The first run succeeds while the second run reports this error:
CreateEncoder : m_nvenc.nvEncInitializeEncoder(m_hEncoder, &m_initializeParams) returned error 8 at ../../NvCodec/NvEncoder/NvEncoder.cpp:273
Thanks for taking the time to look at this. Hopefully this will allow you to reproduce the problem as well or to tell me that I am doing something incorrectly.