How many webcams can I connect at one time?

Hi,

I want to connect multiple USB Logitech webcams.

How many webcams can I connect at one time?

I’m using Deepstream now and when I use two webcam with 1920x1080 (30fps), It’s available.

But when I connect more than 3 webcams, It failed.

And when I decrease resolution 480x270 (10fps), I could connect 4 webcams.

How can I connect more webcams?

Thanks.

Hi,
You may try the patch

Besides, there are two type C ports on Xavier and you may consider to shift the cameras from the type A port to type C ports.

HI,

I am using two USB hubs and connect webcam to them.

I am going to use 16 webcams.

Is it possible?

Thanks.

Hi,
There is EP limit on both Xavier and TX2:
[url]https://devtalk.nvidia.com/default/topic/1057013/jetson-tx2/usb3-xhci-driver-device-count-limitation/post/5359521/#5359521[/url]

You may try with your webcams and see how many can be enumerated.
Also bandwidth is limited. You may run in MJPEG format to save bandwidth.

Hi,

How can I get the MJPEG from webcam?

My code is below.

gst-launch-1.0 \
v4l2src device=/dev/video0 ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_0 \
v4l2src device=/dev/video1 ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_1 \
v4l2src device=/dev/video2 ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_2 \
v4l2src device=/dev/video3 ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_3 \
nvstreammux name=m width=480 height=270 batch-size=64 batched-push-timeout=40000 live-source=1 ! \
nvmultistreamtiler rows=2 columns=2 width=1920 height=1080 ! nvdsosd ! nvegltransform ! nveglglessink sync=0

How can I change to MJPEG format in this command line?

Thanks.

Hi,
You may refer to this post

We would suggest you program C code to run DeepStream SDK.

Hi,

I change to MJPEG format.

From,

gst-launch-1.0 \
v4l2src device=/dev/video0 ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_0 \
v4l2src device=/dev/video1 ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_1 \
v4l2src device=/dev/video2 ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_2 \
v4l2src device=/dev/video3 ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_3 \
nvstreammux name=m width=480 height=270 batch-size=64 batched-push-timeout=40000 live-source=1 ! \
nvmultistreamtiler rows=2 columns=2 width=1920 height=1080 ! nvdsosd ! nvegltransform ! nveglglessink sync=0

To,

gst-launch-1.0 \
v4l2src device=/dev/video0 ! image/jpeg ! jpegdec ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_0 \
v4l2src device=/dev/video1 ! image/jpeg ! jpegdec ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_1 \
v4l2src device=/dev/video2 ! image/jpeg ! jpegdec ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_2 \
v4l2src device=/dev/video3 ! image/jpeg ! jpegdec ! videoconvert ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA, width=480, height=270, framerate=10/1" !  m.sink_3 \
nvstreammux name=m width=480 height=270 batch-size=64 batched-push-timeout=40000 live-source=1 ! \
nvmultistreamtiler rows=2 columns=2 width=1920 height=1080 ! nvdsosd ! nvegltransform ! nveglglessink sync=0

But, it cause same error even though it was possible before.

There is no way to use multiple webcams?

Thanks.

Hi,
we have verified four USB camera cases:
[url]https://devtalk.nvidia.com/default/topic/1058334/deepstream-sdk/deepstream4-jetson-nano-multiple-webcams-issue/post/5390583/#5390583[/url]
You may refer to it and check why it fails in your setting.