I had been trying to run 4 cameras at 640*480 resolution with output format YUV/MPEG simultaneously on TK1 for sometime and found that two cameras are working but the remaining two are not, does the board support running 4 cameras in one shot?
I’m connecting all the 4 cameras through an external USB-3.0 hub.
The board is running UBUNTU 14.04 and I tried with v4l2.
I have tried with opencv, gstreamer and v4l2 codes. On connecting more than 2 cameras to the USB-3.0 hub, i am getting this error “libv4l2: no space left on device”. I have checked 2 of 4 combinations and it is working.
I used external power USB-3.0 hub for connecting 4 cameras, 1 keyboad and 1 mouse.I think so bandwidth is not sufficient to run multiple cameras, So Is there any solution to run multiple cameras in one shot ?
The Jetson TK1 is capable of running USB 3.0, but must be configured to do so. Does your Jetson have USB 3.0 configured correctly?
The way the most USB camera drivers work is that they reserve the maximum amount of bandwidth that the camera can deliver. For example, even though the camera resolution may be set by the user for 640x480 @ 30 fps, if the camera is more capable, say 1920x1080 @ 30 fps, the USB driver will allocate the maximum frame rate bandwidth. This usually takes into account any compression being used also. You have to examine the different raw modes that the camera provides, it could very well be that there is a relatively large frame uncompressed high frame rate which reserves a large chunk of USB bandwidth for the camera.
Another couple of notes, you probably have to turn USB autosuspend off to have the cams work correctly. You may be able to save a wee bit of bandwidth by placing the keyboard and mouse into the USB 2.0 port. My guess is that it may be difficult to get another two cameras on the USB 3.0 port, but you’d have to do some maths to figure it out. Also note that the maximum USB 3.0 speeds are theoretical, and may not be delivered out in the wilds.
Thank you Kangalow, giving a valuable information,I agreed your context.
I have tried with my camera, I can able to set 30fps for 640480 resolution with uncompressed format (YUYV) but I can’t able to set same fps for 640480 resolution with compressed format (MJPEG) default it is taking 120fps.
I don’t know what bandwidth is required by each camera, but even at low resolution you may be better off with USB3. If your cameras are USB2, then a USB3 HUB may still be of benefit. There is a “transaction translator” associated with ports downgrading to USB2 compatibility such that the port between the HUB and the Jetson would still run at USB3 speeds. No individual camera would benefit, but I suspect having several devices on a USB2 HUB would bottleneck badly.
To measure current settings of USB use the tree view of lsusb: “lsusb -t”. If it is 480M speed, then it is USB2; if it is 5000M speed, then it is USB3.
Note that the JTK1 does not have USB3 enabled by default on the full-sized connector. There is a simple edit to enable this as USB3. In file “/boot/extlinux/extlinux.conf” you will find this kernel parameter:
usb_port_owner_info=0
…to switch the full-sized USB port to USB3 change the “0” to “2”:
usb_port_owner_info=2
If your cameras consume enough bandwidth then even USB3 won’t be enough. A single camera designed for USB3 could in fact consume most available bandwidth if it is high enough resolution or frame rate.