Camera capture image problems with JetPack 6.0 on Jetson Orin Nano


I am working on porting our camera driver on Jetson Orin Nano from JetPack 5.x to JetPack 6.0.

I have already enabled the camera with JetPack 6.0 but I have problems when I capture image with v4l2-ctl and gstreamer.

I ran the command and I got an incomplete image:

gst-launch-1.0 v4l2src device=/dev/video1 num-buffers=1 ! \
"video/x-raw, format=UYVY, width=640, height=480" ! \
jpegenc ! filesink location=image_JP60_v4l2src.jpg


Then I tried to run this command and I found it can work.

gst-launch-1.0 nvv4l2camerasrc device=/dev/video1 num-buffers=1 ! \
"video/x-raw(memory:NVMM), format=UYVY, width=640, height=480" ! \
nvvidconv ! jpegenc ! filesink location=image_JP60_nvv4l2camerasrc.jpg


I also tried use v4l2-ctl command to capture raw data from camera.

v4l2-ctl -d /dev/video1 --stream-mmap --set-fmt-video=pixelformat=UYVY,width=640,height=480 --stream-count=1 --stream-to=image_JP60_v4l2-ctl.uyvy

Then I transfer the UYVY raw image to jpg file by Gstreamer:

gst-launch-1.0 filesrc location=image_JP60_v4l2-ctl.uyvy ! videoparse format=5 width=640 height=480 framerate=1 ! videoconvert ! jpegenc ! filesink location=image_JP60_v4l2-ctl.jpg


Our camera can work perfectly whether I use v4l2src or nvv4l2camerasrc with JetPack 5.x.
However, it seems to have some problems after I updated to JetPack 6.0.

Why it can work with nvv4l2camerasrc but the image seems to lose data if I use v4l2src and v4l2-ctl?

It’s known issue. Please use nvv4l2camerasrc before the problem fix.

relative topic 299235


Hi ShaneCCC,

Thanks for your information!

I have verified the patch from here and it can work with v4l2src.

By the way, I have another question about CSI ports.
I found there are different orders for cameras. With JetPack 5.x, CAM0 is video0 and CAM1 is video1 for the orders of video devices.
However, CAM0 is video1 and CAM1 is video0 with JetPack 6. I think it is not intuitive for that.
How to modify the orders of video devices?

Here is our dts file, CAM0 is at i2c@0 and CAM1 is at i2c@1, and I don’t want to modify the orders:

					status = "okay";
					compatible = "i2c-mux-gpio";
					#address-cells = <1>;
					#size-cells = <0>;
					i2c-parent = <&cam_i2c>;
					mux-gpios = <&gpio_aon CAM_I2C_MUX GPIO_ACTIVE_HIGH>;
					i2c@0 {
						status = "okay";
						reg = <0>;
						#address-cells = <1>;
						#size-cells = <0>;

						cam_a@48 {
							reset-gpios = <&gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
							status = "okay";
					i2c@1 {
						status = "okay";
						reg = <1>;
						#address-cells = <1>;
						#size-cells = <0>;

						cam_c@48 {
							reset-gpios = <&gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
							status = "okay";

It could be the kernel different cause the different. Looks like the JP5 and JP6 kernel use different sort algorithm to list the device tree.
You can modify the video register API to assign device node instead of by system assign.