[SDK 9.0] NVENC Samples - Is it possible to encode losslessly?

Hi guys,

So I’m trying to make some tests with the new 9.0 NVENC SDK and I’m having a hard time figuring out if it is possible to encode and decode losslessly a yuv 4:2:0 video with the samples provided by Nvidia, more precisely:

  • AppEncCuda
  • AppDec

I’ve tried multiple combinations of the parameters in the encoder (lossless preset, the different modes of hevc, different rate control techniques…) with no luck, getting a lossy process every single time. Have any of you been able to encode/decode losslessly a yuv 4:2:0 file with the samples provided by Nvidia?

Thanks in advance!!

Same question :)

Hi ptphucbk,

I managed to encode/decode losslessly. With lossless preset, and setting -constqp to 0 will render you a lossless result.

Hope this helps you!!

Hi Dread13,

Thanks for your comment, so if I use the command line with ffmpeg, how can I set -constqp to 0 ?

I saw only -rc constqp and -cq is already set to 0 by default.



Sorry, the command I sent you was for the Nvidia NVENC SDK. I do not know the right command to code losslessly in ffmpeg, though it must be possible.


Ah I see, tested it and it works. Thank you very much. Have a great day :)