Libargus and multimedia api 10-bit encode

I have a camera module that supports 10-bit modes connected via MIPI and I want to try to use the H265 MAIN10 profile for recording with the Nvidia Multimedia API.

I have tried modifying the 10_camera_recording example in the Nvidia Multimedia API. The camera is set to a mode with both 10-bit input and output that I have confirmed via


If I modify the native buffer format to NV12_10LE

nativeBuffers[i] = DmaBuffer::create(STREAM_SIZE, NvBufferColorFormat_NV12_10LE,
                    DO_CPU_PROCESS ? NvBufferLayout_Pitch : NvBufferLayout_BlockLinear);

Then I also changed the encoder to use the main10 profile

ret = m_VideoEncoder->setProfile(V4L2_MPEG_VIDEO_H265_PROFILE_MAIN10);

and the pixel format for the encoder to a 10-bit one

ret = m_VideoEncoder->setOutputPlaneFormat(V4L2_PIX_FMT_P010M, STREAM_SIZE.width(),

Unfortunately when I do this I get the following error and no output is written

[ERROR] (NvV4l2ElementPlane.cpp:178) <enc0> Capture Plane:Error while DQing buffer: Broken pipe

If I change the encoder to 10-bit but leave the buffers as NV12 it doesn’t crash but the video that is written isn’t correct as the buffers/planes seem to be misaligned.

It seems to me that there should be a way to hook up 10-bit output from libargus from a 10-bit camera module to the encoder in 10-bit mode. Am I using the right pixel formats or will I need to do some extra conversion using the nvvidconv block? I was hoping to be able to avoid having to do that.

Thanks for the help!

Which Jetpack release do you use? If you use 4.6.2, please execute

$ gst-inspect-1.0 nvarguscamerasrc

And check if 10-bit format is listed.

Thanks for the reply, I’m using Jetson 4.5.1 because that’s what is installed on our deployed system.

The 10-bit format is added to nvarguscamerasrc plugin in later release. You would need to upgrade if it is required in your use-case.

Hi, sorry if there was any confusion but I wish to use the libargus C++ API directly as well as the Nvidia Multimedia API. I don’t intend to use gstreamer or any gstreamer plugins.

Can I achieve 10-bit capture and encoding using these APIs?

It is possible but there is no existing sample. You would need to refer to source code of nvarguscamerasrc and apply the code to your application. The gstreamer plugins are based on jetson_multimedia_api also.