Jetson xavier with multiple gmsl camera

hi everyone,
I’m trying to capture up to 8 gmsl camera image on one jetson xavier at the same time,
for one single camera, I can use multimedia api sample 12_camera_v4l2_cuda, the latency is acceptable,
but when it comes to 8 cameras the latency grows enormously.
is there any I can do to improve the performance.

Try boost the system by below command.

sudo nvpmodel -m 0
sudo jetson_clocks

thanks Shane,
I’m already in MAXN mode, but it’s not enough yet, I wonder is there any solution from the aspect of software.
I’m currently using multithread to capture the image, each thread does almost the same thing as camera_v4l2_cuda does.
And here is how I measure the latency, I use a camera stream to display a stopwatch, as the stopwatch is running, I take a picture of the real stopwatch and camera’s display, then I calculate the difference between the reading of real stopwatch and camera’s display. The difference is ove 300ms when 8 cameras are connected, and around 100ms when a single camera is connected.

What’s the resolution? What if without cuda?

the resolution is 1080P, how to do it without cuda?(I’m using camera_v4l2_cuda)

Try others sample code. Maybe like argus_camera

I tried 09_camera_jpeg_capture and 10_camera_recording but it didn’t work.
I got the “No cameras available” error, I’m not so familiar with Libargus, is there any documents I can use.

OK, looks like your camera is YUV instead of Bayer raw camera.
What your command for camera_v4l2_cuda?

yes, it’s YUV, the command is

camera_v4l2_cuda -d /dev/video0 -s 1920x1080 -f YUYV 

Could you try v4l2-ctl if any frame rate drop by increase cameras.

v4l2-ctl --set-fmt-video=width=1920,height=1080 --set-ctrl bypass_mode=0 --stream-mmap  -d /dev/video0 

8 cameras are running, the frame rate didn’t drop

Could you comment cuda_postprocess() from the sample code to try.

it’s all good even if I keep cuda_postprocess(),
when I run 8 camera_v4l2_cuda at the same time, the latency is almost the same as I run one single camera, which is around 150ms.
As for my own code, the latency is 300-400ms for 8 cameras, in my code, I remove cuda_postprocess() and add some undistortion process(using opencv, takes about 10ms) after the image is captured, and I put the while loop of start_capture() in a new thread for each camera.

Please have try the command from below link.

I might find the problem, in camera_v4l2_cuda the function NvBufferTransform does only color space conversion,
however, in my code, NvBufferTransform does color space conversion plus resize, the image is resized by a factor of 1/2. when I keep the size of image unchanged, the result is almost the same as camera_v4l2_cuda.
It’s pretty weird that the latency is doubled when the size of image is changed.