Lossless video codec on Xavier

Is there any support for lossless video codec in Xavier? And if so, is that for HVEC, H264, or VP9?

I’m aware the video codec SDK for desktop has lossless options, but I don’t see such discussion in multimedia api / gstream’s API.


Hi farmeng,

We support YUV444 lossless encoding in H264 encoder. Please check 01_video_encode sample in


And online document

Thank you!

I wonder if you support lossless compression from RGB directly? If I convert RGB images to YUV space for the codec, it is already lossy, right? (see ffmpeg - Lossless RGB24 to YUV444 transformation - Stack Overflow) Is there something similar to libx264rgb but runs on the GPU?

Also thank you for the pointer to the online doc. However, that does not say much about lossless, nor YUV 444. And to my understanding, taking YUV444 does not mean lossless, but additional configuration is needed for a lossless encoding of YUV444. Would appreciate some advice.


The hardware H264 encoder supports YUV444 lossless encoding. RGB is not supported. For using software encoder, please set nvpmodel -m 0 and sudo jetson_clocks to run CPU at max performance.

I see. Thanks for the instructions! I also notice there is an -elossless option in the 01_video_encode example. Will try it out.

We have a camera that outputs 3-byte/pixel YUV444. But I have noticed on the web that YUV444 may also be 4-byte. Which is 01_video_encode expecting?


Please also refer to

One pixel of YUV444 contains 1 byte Y, 1 byte U and 1 byte V.