Visionworks Framesource device:///nvcamera?index=1 doesn't work in dual camera

Hello,
I have a two CSI-2 cameras connected in my Jetson Nano. All the stuff works perfect when I use gst-launch. For instance:

FILE=$1
FILE_LEFT="${FILE}_left.mp4"
FILE_RIGHT="${FILE}_right.mp4"

gst-launch-1.0 \
nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)30/1' ! omxh264enc ! qtmux ! filesink location=$FILE_LEFT -e \
nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)30/1' ! omxh264enc ! qtmux ! filesink location=$FILE_RIGHT -e

But now, I’m trying to execute the nvgstcamera_capture example using the second camera. I change the input to device:///nvcamera?index=1, but stills selecting the first camera.

I review the v4l2-ctl and I saw the following:

For camera 0

v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'RG10'
	Name        : 10-bit Bayer RGRG/GBGB
		Size: Discrete 3264x2464
			Interval: Discrete 0.048s (21.000 fps)
		Size: Discrete 3264x1848
			Interval: Discrete 0.036s (28.000 fps)
		Size: Discrete 1920x1080
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1640x1232
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.017s (60.000 fps)

For camera 1

 v4l2-ctl -d /dev/video1 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'RG10'
	Name        : 10-bit Bayer RGRG/GBGB
		Size: Discrete 3264x2464
			Interval: Discrete 0.048s (21.000 fps)
		Size: Discrete 3264x1848
			Interval: Discrete 0.036s (28.000 fps)
		Size: Discrete 1920x1080
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1640x1232
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.017s (60.000 fps)

We can see that the cameras have the same index, but when I use gst-launch and nvarguscamerasrc, I don’t have this problem.

There are any way to solve that?

Thanks, Adrià

Hi,
Please refer to
Cannot access second csi camera with Visionworks demos - #5 by DaneLLL

We have developed VPI. Most functions in VisionWroks are implemented Please also take a look at the document:
VPI - Vision Programming Interface: Installation

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