Does Jetson Orin NX support two identical USB 3.0 cameras simultaneously?

I am unable to open two identical USB 3.0 cameras simultaneously on my Orin NX. Each camera works fine individually, but when I try to open both at the same time, the second camera always fails to open due to “not enough bandwidth,” even when using a very low resolution (640x480). Therefore, this should not be a bandwidth limitation. Does Orin NX not support multiple USB 3.0 cameras being opened simultaneously?

Here is some information about my cameras:

ls /dev/video* output

/dev/video0
/dev/video1
/dev/video2
/dev/video3

lsusb -t output

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
        |__ Port 1: Dev 6, If 1, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 1: Dev 6, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
        |__ Port 1: Dev 6, If 0, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 3: Dev 7, If 0, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 3: Dev 7, If 1, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 3: Dev 7, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 3: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M

First camera test command and output

ffplay -f v4l2 -input_format mjpeg -framerate 30 -video_size 1640x480 /dev/video0

libEGL warning: DRI3: failed to query the version
ffplay version 4.4.2-1ubuntu0.1 Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr --enable-nvv4l2dec --enable-libv4l2 --enable-shared --extra-libs='-L/usr/lib/aarch64-linux-gnu/tegra -lv4l2 -lnvbufsurface -lnvbufsurftransform' --extra-cflags=-I/usr/src/jetson_multimedia_api/include/ --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100

[video4linux2,v4l2 @ 0xffff20000c10] The V4L2 driver changed the video from 1640x480 to 640x480
[video4linux2,v4l2 @ 0xffff20000c10] The driver changed the time per frame from 1/30 to 1/60
Input #0, video4linux2,v4l2, from '/dev/video0':
B sq=    0B f=0/0      Duration: N/A, start: 8577.312162, bitrate: N/A
  Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 60 fps, 60 tbr, 1000k tbn, 1000k tbc
[swscaler @ 0xffff1c0b1550] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0xffff1c0b1550] No accelerated colorspace conversion found from yuv422p to rgba.

Second camera test command and error

ffplay -f v4l2 -input_format mjpeg -framerate 30 -video_size 1640x480 /dev/video2

libEGL warning: DRI3: failed to query the version
ffplay version 4.4.2-1ubuntu0.1 Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/usr --enable-nvv4l2dec --enable-libv4l2 --enable-shared --extra-libs='-L/usr/lib/aarch64-linux-gnu/tegra -lv4l2 -lnvbufsurface -lnvbufsurftransform' --extra-cflags=-I/usr/src/jetson_multimedia_api/include/ --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100

[video4linux2,v4l2 @ 0xffff44000c10] The V4L2 driver changed the video from 1640x480 to 640x480
ioctl(VIDIOC_STREAMON): No space left on device /dev/video2: No space left on device

dmesg log when running the second camera

[ 8583.662899] usb 2-1.3: Not enough bandwidth for altsetting 11
[ 8844.000869] usb 2-1.3: Not enough bandwidth for new device state.
[ 8844.000891] usb 2-1.3: Not enough bandwidth for altsetting 11

*** Please note that this reply is generated by LLM automatically ***

The issue you’re experiencing with opening two identical USB 3.0 cameras simultaneously on your Jetson Orin NX is likely due to the USB bandwidth limitation. Although you’ve mentioned that you’re using a low resolution (640x480), which should not be a bandwidth limitation, there are other factors to consider.

According to the Jetson Orin NX Series and Jetson Orin Nano Series Product Design Guide (DG-10931-001_v1.4), the Jetson Orin module has three USB 3.2 interfaces. However, the guide does not explicitly state that multiple USB 3.0 cameras can be opened simultaneously.

To understand the USB bandwidth limitation, let’s analyze the USB 3.2 interfaces on the Jetson Orin NX:

  • Each USB 3.2 interface has a bandwidth of 5 Gbps (gigabits per second).
  • The Jetson Orin NX has three USB 3.2 interfaces, which can be used simultaneously.
  • However, the total available bandwidth is shared among all devices connected to the USB 3.2 interfaces.

When you open the first camera, it likely occupies a significant portion of the available bandwidth on one of the USB 3.2 interfaces. When you try to open the second camera, it may not have enough bandwidth available on the same interface or on another interface, resulting in the error message “not enough bandwidth.”

To confirm this, you can try the following:

  1. Check the USB bandwidth usage: Use tools like usb-devices or lsusb to check the USB bandwidth usage on each interface. This can help you identify if the bandwidth is indeed the limiting factor.
  2. Use a USB bandwidth analyzer: Tools like usbtop or usbmon can help you analyze the USB bandwidth usage in real-time.
  3. Try using a USB hub: If you’re using a single USB 3.2 interface for both cameras, try using a USB hub to connect both cameras to separate interfaces. This can help distribute the bandwidth usage more evenly.
  4. Reduce the camera resolution or frame rate: If you’re using a high resolution or frame rate, try reducing it to see if it alleviates the bandwidth issue.

In comparison, the Jetson AGX Orin has a more comprehensive USB subsystem, with more USB 3.2 interfaces and a higher total available bandwidth. However, the Jetson Orin NX is still a powerful platform, and with careful management of USB bandwidth, you should be able to use multiple USB 3.0 cameras simultaneously.

To summarize:

  • The Jetson Orin NX has three USB 3.2 interfaces, but the total available bandwidth is shared among all devices connected to these interfaces.
  • The bandwidth limitation is likely the cause of the issue you’re experiencing with opening two identical USB 3.0 cameras simultaneously.
  • Try using tools to analyze the USB bandwidth usage, reduce the camera resolution or frame rate, or use a USB hub to distribute the bandwidth usage more evenly.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

1 Like

Hi,
If you use developer kit(Orin NX module + Orin Nano carrier board), the 4 USB type-A ports are connected to one USB 3.2 interface. And the USB type-C port is connected to another USB 3.2 interface. If the two cameras are connected to the type-A ports, we suggest shift one camera to the type-C port.

I also tried connecting one camera to the USB type-A and the other camera to the USB type-C, but the result was the same, still the same error.
lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
|__ Port 1: Dev 4, If 0, Class=Video, Driver=uvcvideo, 5000M
|__ Port 1: Dev 4, If 1, Class=Video, Driver=uvcvideo, 5000M
|__ Port 1: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
|__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 2: Dev 5, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
|__ Port 2: Dev 5, If 0, Class=Video, Driver=uvcvideo, 5000M
|__ Port 2: Dev 5, If 1, Class=Video, Driver=uvcvideo, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
|__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 7, If 0, Class=, Driver=, 12M
|__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 3: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M

Hi,
Seems like the second camera is enumerated as USB2 480Mbps. Does it show superspeed in dmesg for the two cameras?

HI,
In fact, both of these cameras are USB 3.0, connected to USB type-C and USB type-A respectively.

lsusb -t output

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
        |__ Port 1: Dev 3, If 0, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 1: Dev 3, If 1, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 1: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
    |__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 2: Dev 5, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
        |__ Port 2: Dev 5, If 0, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 2: Dev 5, If 1, Class=Video, Driver=uvcvideo, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 1: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 6, If 0, Class=, Driver=, 12M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 3: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M

Hi,
We try on developer kit(Orin NX module + Orin Nano carrier board). One USB3 camera is connected to type-A port and the other is connected to the type-C port. Both can be enumerated to USB3(SuperSpeed):

nvidia@tegra-ubuntu:~$ sudo dmesg
[406442.919676] fusb301 1-0025: fusb301_work_handler: int_sts[0x01]
[406442.920232] fusb301 1-0025: sts[0x21], type[0x10]
[406442.920560] fusb301 1-0025: fusb301_set_mode: mode (4)(4)
[406442.920889] fusb301 1-0025: fusb_update_state: a
[406443.528540] fusb301 1-0025: fusb301_set_mode: mode (1)(1)
[406443.528873] fusb301 1-0025: fusb_update_state: b
[406443.677553] fusb301 1-0025: fusb301_work_handler: int_sts[0x01]
[406443.678107] fusb301 1-0025: sts[0x21], type[0x10]
[406443.678890] fusb301 1-0025: fusb301_set_dfp_power: host current(1)
[406443.678892] fusb301 1-0025: fusb_update_state: 7
[406444.479068] usb 1-1: new high-speed USB device number 6 using tegra-xusb
[406444.634925] hub 1-1:1.0: USB hub found
[406444.635342] hub 1-1:1.0: 2 ports detected
[406444.755489] usb 2-2: new SuperSpeed USB device number 3 using tegra-xusb
[406444.784520] hub 2-2:1.0: USB hub found
[406444.785215] hub 2-2:1.0: 2 ports detected
[406444.927055] usb 1-1.2: new full-speed USB device number 7 using tegra-xusb
[406445.091966] hid-generic 0003:07CA:513B.0004: No inputs registered, leaving
[406445.092082] hid-generic 0003:07CA:513B.0004: hidraw0: USB HID v1.11 Device [AVerMedia Technologies, Inc. Live Streamer CAM 513] on usb-3610000.usb-1.2/input2
[406445.111484] usb 2-2.1: new SuperSpeed USB device number 4 using tegra-xusb
[406445.144475] input: AVerMedia Information Inc. Live Streamer CAM 513 as /devices/platform/bus@0/3610000.usb/usb2/2-2/2-2.1/2-2.1:1.2/0003:07CA:513A.0005/input/input11
[406445.203511] input: AVerMedia Information Inc. Live Streamer CAM 513 Consumer
 Control as /devices/platform/bus@0/3610000.usb/usb2/2-2/2-2.1/2-2.1:1.2/0003:07CA:513A.0005/input/input12
[406445.204163] hid-generic 0003:07CA:513A.0005: input,hidraw1: USB HID v1.01 De
vice [AVerMedia Information Inc. Live Streamer CAM 513] on usb-3610000.usb-2.1/input2
[406445.239667] usb 2-2.1: Found UVC 1.10 device Live Streamer CAM 513 (07ca:513a)
[406445.252059] input: Live Streamer CAM 513 as /devices/platform/bus@0/3610000.usb/usb2/2-2/2-2.1/2-2.1:1.0/input/input13
[406445.252205] usbcore: registered new interface driver uvcvideo
[406491.565883] usb 2-1.1: new SuperSpeed USB device number 5 using tegra-xusb
[406491.597510] usb 2-1.1: Found UVC 1.00 device Logitech BRIO (046d:085e)
[406491.626892] input: Logitech BRIO as /devices/platform/bus@0/3610000.usb/usb2/2-1/2-1.1/2-1.1:1.0/input/input14
[406491.664114] usb 2-1.1: current rate 16000 is different from the runtime rate 24000
[406491.682735] usb 2-1.1: current rate 16000 is different from the runtime rate 32000
[406491.702082] usb 2-1.1: current rate 16000 is different from the runtime rate 48000
[406491.755969] input: Logitech BRIO Consumer Control as /devices/platform/bus@0/3610000.usb/usb2/2-1/2-1.1/2-1.1:1.5/0003:046D:085E.0006/input/input15
[406491.814086] hid-generic 0003:046D:085E.0006: input,hidraw2: USB HID v1.11 Device [Logitech BRIO] on usb-3610000.usb-1.1/input5
[406492.004146] usb 2-1.1: current rate 16000 is different from the runtime rate 48000
[406492.034514] usb 2-1.1: current rate 16000 is different from the runtime rate 48000
[406492.065399] usb 2-1.1: current rate 16000 is different from the runtime rate 48000
nvidia@tegra-ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 10000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 10000M
        |__ Port 1: Dev 5, If 0, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 1: Dev 5, If 1, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 1: Dev 5, If 2, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 1: Dev 5, If 3, Class=Audio, Driver=snd-usb-audio, 5000M
        |__ Port 1: Dev 5, If 4, Class=Audio, Driver=snd-usb-audio, 5000M
        |__ Port 1: Dev 5, If 5, Class=Human Interface Device, Driver=usbhid, 5000M
    |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/2p, 5000M
        |__ Port 1: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 5000M
        |__ Port 1: Dev 4, If 0, Class=Video, Driver=uvcvideo, 5000M
        |__ Port 1: Dev 4, If 1, Class=Video, Driver=uvcvideo, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 1: Dev 6, If 0, Class=Hub, Driver=hub/2p, 480M
        |__ Port 2: Dev 7, If 1, Class=Audio, Driver=snd-usb-audio, 12M
        |__ Port 2: Dev 7, If 2, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 7, If 0, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Wireless, Driver=rtk_btusb, 12M
    |__ Port 3: Dev 3, If 1, Class=Wireless, Driver=rtk_btusb, 12M

Can run the command to launch the two cameras simultaneously:

gst-launch-1.0 -v v4l2src device=/dev/video3 ! video/x-raw,width=1920,height=1080,format=YUY2,framerate=30/1 ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0 v4l2src device=/dev/video1 ! video/x-raw,width=1920,height=1080,format=UYVY,framerate=30/1 ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0

If you have the developer kit, please give it a try and see if the cameras works the same as ours.