Invalid Camera device

I entered v4l2-crt -d/dev/video1

and got immediately back to -/desktop/pypro$

Does this help? Note that the pixel formats are different for each camera…while they are both exactly the same cameras.

guido@guido-Xavier:~/Desktop/pypro$ 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 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)

guido@guido-Xavier:~/Desktop/pypro$ v4l2-ctl -d/dev/video1 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘YUYV’
Name : YUYV 4:2:2
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.042s (24.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.133s (7.500 fps)
Interval: Discrete 0.200s (5.000 fps)
other Sizes…

    Index       : 1
    Type        : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name        : Motion-JPEG
            Size: Discrete 640x480
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.042s (24.000 fps)
                    Interval: Discrete 0.050s (20.000 fps)
                    Interval: Discrete 0.067s (15.000 fps)
                    Interval: Discrete 0.100s (10.000 fps)
                    Interval: Discrete 0.133s (7.500 fps)
                    Interval: Discrete 0.200s (5.000 fps)
            other Sizes….

Getting back to your suggestion I entered
gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 ! nvvidconv ! xvimagesink
and got an image. When I entered
gst-launch-1.0 -v nvarguscamerasrc sensor-id=1 ! nvvidconv ! xvimagesink
I got this
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0.GstPad:sink: caps = video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:561 Invalid camera device specified 1 specified, 0 max index
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.368793844
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

My question : why is the pipeline for cameara 1 being paused? What does the rest of this tell you?

It seems that your Jetson thinks that second camera is a different model of camera.
I have no Jetson with me now for checking, someone else may advise.

hello guido54321,

could you please take a picture of your camera modules?
it should not report different pixel format types since you’re having the exactly same cameras.
for example,

#video0
guido@guido-Xavier:~/Desktop/pypro$ v4l2-ctl -d/dev/video0 --list-formats-ext
Pixel Format: ‘RG10’
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 3264x2464
...

#video1
guido@guido-Xavier:~/Desktop/pypro$ v4l2-ctl -d/dev/video1 --list-formats-ext
Pixel Format: ‘YUYV’
Name : YUYV 4:2:2
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
..

you may also share the kernel init messages about the sensor probing,
please also review you’re having correct device tree with dual camera configuration.
thanks

HI Jerry

Thanks for your reply Here are three pictures: 1/ two Raspberry Pi cameras; 2/ the Pan Tilt board to which they are hooked 3/ how the ribbons are connected to my Xavier. As to "you may also share the kernel init messages about the sensor probing,

please also review you’re having correct device tree with dual camera configuration.
thanks”

Could you please tell me how to check the device tree and how to share the kernel init messages.

Thank you.Guido

thumb_DSCN3226_1024.jpeg

thumb_DSCN3227_1024.jpeg

thumb_DSCN3228_1024.jpeg

When I run

camSet =‘v4l2src device=/dev/video1 ! video/x-raw,width=’+str(width)+‘,height=’+str(height)+‘,framerate=24/1 ! videoconvert ! appsink’
cam=cv2.VideoCapture(‘/dev/video1’)

I get an image using a logtech camera!

When I run using a single Raspberry Pi camera

camSet=‘nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=3264, height=2464, framerate=21/1,format=NV12 ! nvvidconv flip-method=’+str(flip)+’ ! video/x-raw, width=‘+str(width)+’, height=‘+str(height)+’, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink’
cam=cv2.VideoCapture(camSet)

I get the follwing ERROR

Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:568 Failed to create CaptureSession
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1

What does this tells you?

hello guido54321,

please refer to Camera Architecture Stack.
assume your logitech camera connect to USB port, which is an USB camera.
you’re correct to enable v4l2src to access USB camera;

could you please simply your commands to access Raspberry Pi camera, which is bayer sensor.
here’s commands for your reference, it initial camera and render to display.
for example,

$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvoverlaysink -ev

Hi Jerry

Thanks for your advice. Yesterday I downloaded latest update and rebooted. The problem with the cameras was immediately solved. I now have two Raspberry Pi cameras recording an image. I still need to fine-tune the video balance to get better images. Thanks a lot for taking look at this problem.

Guido