Troubles getting any camera to work

Hello,

I am trying to make a camera work on my Jetson Nano rev B01, running a Jetpack image that I downloaded from this page two days ago (I do not know how to find the Jetpack version, sorry).

I have two different cameras:

  • A Raspberry Pi Camera Module V2 (CSI)
  • A LI-USB30-AR023ZWDR Camera Module from Leopard Imaging (USB 3.0)
    My goal is to use the USB Camera, and I am using the RasPi camera to try having a camera working.

The cameras seems to be recognized:

$ ls /dev/video*
/dev/video0  /dev/video1
$ v4l2-ctl --list-devices
vi-output, imx219 7-0010 (platform:54080000.vi:0):
        /dev/video0

AR023ZWDR (usb-70090000.xusb-1.3):
        /dev/video1

However I have trouble getting them to work. nvgstcapture-1.0 seems to work for the RasPi camera. I can capture images and open them, however, there is no preview. I have attached the output in the file nvgstcapture-csi.txt.

It does not work at all for the USB camera:

$ nvgstcapture-1.0 --camsrc=0 --cap-dev-node=1
** Message: 17:37:53.127: <main:4670> iterating capture loop ....
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstV4l2Src:v4l2src0: Internal data stream error.
debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
** Message: 17:37:53.180: <main:4680> Capture completed
** Message: 17:37:53.181: <main:4729> Camera application will now exit

I have also attached a dmesg log.

I should note that the USB camera is working on three other computers, on multiple OS (Windows 10, Ubuntu 18 & 20)

I have found multiple forum posts, without success. I never had a camera live preview working.

dmesg.txt (92.7 KB)
nvgstcapture-csi.txt (5.3 KB)

For your RPi v2 IMX219 connected to CSI0, for displaying to X window into GUI, you may just use :

gst-launch-1.0 -v nvarguscamerasrc ! nvvidconv ! xvimagesink

For your USB cam being on /dev/video1, you may try:

gst-launch-1.0 -v v4l2src device=/dev/video1 ! video/x-raw ! videoconvert ! xvimagesink

This might not work depending on your camera. If this doesn’t work, post the output of:

v4l2-ctl -d1 --list-formats-ext
1 Like

Thank you for helping me!
The first command for RPi works, thank you very much!

The second one for USB did not, so here is the --list-formats-ext output:

ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2
		Size: Discrete 1920x1080
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 2304x1536
			Interval: Discrete 0.045s (22.000 fps)

Also, the two cameras seems to be handled differently, e.g. I cannot get cheese to try using the RPi camera

Maybe cheese is no longer working on Jetsons (at least in R32.5).

You may try specifying a native mode such as:

gst-launch-1.0 -v v4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=1280,height=720,framerate=30/1 ! xvimagesink

# Or
gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=2 ! video/x-raw,format=YUY2,width=1280,height=720,framerate=30/1 ! xvimagesink

If it doesn’t work, you may try this binary patch.

Hi,
Thank Honey Patouceul for sharing the binary.

It is known that 3rdparty applications such as cheese do not work on Jetpack 4.5.1. Please apply the binary and give it a try.

Thank you again!

Both commands work!

No problem for cheese, I was only using it to test the cameras. Thanks for the information about 3rd party applications!

Have a nice week-end!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.