RPi Vision Image Multi Camera Server 2nd Camera Issue

Team 2515 setup a RPi v3 with the Vision image 2020.2.1 to use for multi camera streaming.

We have two MS LifeCam 3000s connected. The first camera on video0 works fine without issues, both cameras were tested independently at video0 and work fine.

When a second camera is added to the vision settings the first camera continues to function, however the second camera throws multiple errors.

RPi1: Connecting to USB camera on /dev/v4l/by-path/platform-3f980000.usb-usb-0:1.1.2:1.0-video-index1
ERROR: ioctl VIDIOC_G_FMT failed at UsbCameraImpl.cpp:864: Invalid argument (UsbUtil.cpp:156)
ERROR: RPi1: could not read current video mode (UsbCameraImpl.cpp:865)

We have tried both the built-in multi-camera server and the Python multi-camera server with the same result.

Has anyone seen this and found a solution?

frcvision_log.txt (10.6 KB)

It looks like both might be mapped to the same camera? Could you try using /dev/video0 and /dev/video1 as a test (yes I know they can get swapped)? Seeing the contents of /boot/frc.json would be helpful too, plus the output of ls -l /dev/video*

They appear to be mapped to different video devices, I have tried using video0 and video1 as well as the by path and by id options, the same errors result.

crw-rw---- 1 root video 81, 3 Jan 19 18:09 /dev/video0
crw-rw---- 1 root video 81, 4 Jan 19 18:09 /dev/video1
crw-rw---- 1 root video 81, 0 Jan 19 18:09 /dev/video10
crw-rw---- 1 root video 81, 1 Jan 19 18:09 /dev/video11
crw-rw---- 1 root video 81, 2 Jan 19 18:09 /dev/video12
crw-rw---- 1 root video 81, 5 Jan 19 18:09 /dev/video2
crw-rw---- 1 root video 81, 6 Jan 19 18:09 /dev/video3
By ID
lrwxrwxrwx 1 root root 12 Jan 19 18:09 usb-Microsoft_Microsoft®_LifeCam_HD-3000-video-index0 → …/…/video0
lrwxrwxrwx 1 root root 12 Jan 19 18:09 usb-Microsoft_Microsoft®_LifeCam_HD-3000-video-index1 → …/…/video1
By Path
lrwxrwxrwx 1 root root 12 Jan 19 18:09 platform-3f980000.usb-usb-0:1.3:1.0-video-index0 → …/…/video0
lrwxrwxrwx 1 root root 12 Jan 19 18:09 platform-3f980000.usb-usb-0:1.3:1.0-video-index1 → …/…/video1
lrwxrwxrwx 1 root root 12 Jan 19 18:09 platform-3f980000.usb-usb-0:1.1.2:1.0-video-index0 → …/…/video2
lrwxrwxrwx 1 root root 12 Jan 19 18:09 platform-3f980000.usb-usb-0:1.1.2:1.0-video-index1 → …/…/video3

The By Path mappings are really strange. What happens if you try to use /dev/video2 for the second camera?

I found that if I use /dev/video0 and /dev/video2 I can get both camera streams to work.

Thanks for the advice.

Okay, if that works, then you can use the by-path names that correspond to video0 and video2 to lock their ordering.

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