NvEnc Alpha Channel Encoding capability not supported on 3090?


I’m trying to get Alpha Channel Encoding working using HEVC in NvEnc. I have a GeForce RTX 3090. I tried querying the capability on my system and found that it was not supported. From this, I have a few questions:

Do the RTX3090 cards not support alpha encoding for HEVC?

Or is this an issue with other params in my HEVC encoder?

For params in my encoder, I’m currently using

  • NV_ENC_BUFFER_FORMAT_ABGR for the buffer format
  • chromaFormatIDC = 3 (444) for chroma subsampling
  • pixelBitDepthMinus8 = 0 (8 bit) for bit depth
  • enableWeightedPrediction = 0
  • output bitsream is in CPU memory

Reviewing NVENC Video Encoder API Programming Guide :: NVIDIA Video Codec SDK Documentation , I was under the impression that I had satisfied all of the constraints, but perhaps not. Could anyone give me some feedback as to whether Alpha Channel encoding works on the 3090s or whether this is an issue with my params? Thank you very muc for your time,

Hello @Alex_Giorgio and welcome to the NVIDIA developer forums!

The RTX3090 should be supported for your use case, you can check capabilities in our Support Matrix.

How did you query the capabilities?

But one thing that jumps out here is that you specify the input chroma subsampling with YUV444 while the docs state:

Alpha encoding is not supported in the following scenarios:

2. Input image is YUV 444.

It might be as simple as switching this to 420?

Thank you Markus for the warm welcome :)

I queried the capabilities using nvEncGetEncodeCaps with NV_ENC_CAPS_SUPPORT_ALPHA_LAYER_ENCODING as the caps param.

I can test that in the next day or two to see if setting to 420 will cause the alpha channel to work. I believe my thought process was that the input buffer format would need to be YUV, rather than RGB, in addition to setting the chroma subsampling to 444 for that condition to be true. However, I see that the actual chroma subsampling setting in the NV_ENC_CONFIG_HEVC sturct in nvEncodeApi.h is called yuv444, so this is likely the cause.

Thanks for the helpful feedback!