50 USB webcams in a single computer. Is that really possible?

15

6

Theoretically an USB HD webcam working at 15 FPS consume a bandwidth nearing 18MB/s - 1280 (width) x 960(height) x 3(RGB channels) x 15(FPS) - without compression. An USB 2.0 controller have a effective throughput of 35MB/s, being able to handle 2 cameras(witch I've confirmed in practice). An USB 3.0 controller have a theoretical maximum transmission speed of 625MB/s wich is capable of handling 34 cameras(625/18 = 34.72), for convenience, lets assume it can handle a maximum of 8 cameras(not confirmed yet). Using both assumptions, it's possible to estimate that the mother board P8B75-V can handle at least 50 simultaneous webcams:

  • 3 PCIe slots (one PCIe x4 and two PCIe x1, excluding the PCIe x16 to the graphic card): Convert them to USB 3.0 using an adapter + USB 3.0 HUBS, resulting in 24 webcams
  • 2 USB 3.0 Controllers (hear and front): USB 3.0 HUBS to achieve 16 webcams
  • 3 PCI Slots: Convert each one to USB 2.0 using an adapter, resulting in 6 webcams
  • 2 USB 2.0 Controllers: 4 webcams

So, my question is:

Is that configuration really possible? Anyone has tried to overload the system with so many USB webcams?

Problems:

  • It's possible that the processor get's overloaded. Using uncompressed image capture may solve this.
  • The SO can have a lot of trouble handling so many devices.

Comentaries:

  • The CPU bus to external devices - Quick Path Interconnect (QPI) for Intel and Hyper-transport for AMD - doesn't seen to be a problem, since 50MB/s * 18MB/s = 900MB/s. That's really far from the bus data rate of 25.6GB/s for QPI and 51.2GB/s for Hyper-transport.
  • I'm implementing the software of this application using OpenCV that wraps the capture around DirectShow.

EDIT 12/11/12:

So, I've done some test's and there are some points to clarify.

The streaming of HD images at 30 FPS represents a bandwith of 106MB/s (53MB/s at 15 FPS), my math was completely wrong. This means that the HD webcams working with USB 2.0 needs to compress the file to not consume all the bandwidth. So, even if I was able to connect 50 webcams in a single PC, probably the CPU would have a lot of trouble decompressing this amount of data in real time.

The real problem comes when we see the USB 3.0 specification:

USB 3.0 specification

As we can see in the image, the USB 2.0 HUB is completely separated from the USB 3.0 HUB (SuperSpeed), witch means that USB 2.0 devices can't use the SuperSpeed bandwidth. That's a major drawback on my assumption that I could use more USB 2.0 devices with a USB 3.0 controller.

As this specification is kinda old (about 2 years), can someone confirm if there is some new implementation of the USB 3.0 specification that shares the SuperSpeed bandwidth between USB 2.0 devices?

Ian Medeiros

Posted 2012-11-01T19:21:48.337

Reputation: 251

4What do you need 50 webcams for? – Dennis – 2012-11-01T19:26:03.527

1How are the webcams powered? By their own PSU or do their draw power from the USB bus? – Hennes – 2012-11-01T19:26:17.967

@Dennis I will use it to a computer vision application. – Ian Medeiros – 2012-11-01T19:30:12.560

@Hennes The USB HUB can be connected to a energy source to power the webcams. – Ian Medeiros – 2012-11-01T19:30:46.913

2The answer: Not Practical. But incredibly awesome sounding. – nerdwaller – 2012-11-01T19:33:11.810

I know, but not all hubs have that capability and I was not sure if you consider that point. It is a question best asked before the magic blue smoke escapes. – Hennes – 2012-11-01T19:34:13.667

There are possibly some useful bandwidth-related comments by David to my queries here.

– Karan – 2012-11-01T19:34:16.990

5I've gotten 17 cameras to work for an Opencv 2 project (python wrapper). I was able to get camshift hsv detection and flann object detection working decently on all simultaneously but in nothing approaching real time and I wasn't able to display the results. – Snesticle – 2012-11-01T19:36:23.387

@Dennis Have in mind that I reduced drastically the total number of webcams for each USB 3.0 connection. The theoretical maximum number is 34 webcams for each one and I reduced it to 8 cameras. – Ian Medeiros – 2012-11-01T19:39:52.137

@Nerdwaller, can you ellaborate your comment? What make you think it's not possible? – Ian Medeiros – 2012-11-01T19:47:46.110

1I apologize, I was responding to it being "practical" (the title). Being practical or otherwise isn't correlated to possibility/impossibility. However, to pull it off you will probably need to power the camera's from something else and only have the data feeds in the computer (by computer, I mean USB3.0 hubs). – nerdwaller – 2012-11-01T19:52:38.630

@nerdwaller Edited the title. Sorry, English isn't my native language and to me "practical" is strongly related to "possible". – Ian Medeiros – 2012-11-01T20:14:51.347

No worries man! I also realize the sarcasm does not translate well across the internet or to non-native-english-speakers. Sounds like you have a sweet project. – nerdwaller – 2012-11-01T20:43:13.723

@Snesticle. Can you share some of your experiences with this setup? How did you managed to connect the cameras? What components has you used. – Ian Medeiros – 2012-11-12T14:34:54.853

Huh, this is really interesting. Did you ever find the answer to your thought experiment? – Tyler – 2013-01-04T15:46:09.087

1@TylerJFisher Sadly yes. It's not possible. It would be possible if there were usb 3.0 cameras that consumes the same amount of bandwidth of traditional usb 2.0 cameras, witch is not the case. I am promising myself to answer this question definitely for a long time, but sadly I was too busy to do it. – Ian Medeiros – 2013-01-07T18:44:45.917

Answers

6

There will never be a change in this design of an additional USB-2-Hub-Device inside USB-3 because it's the only way to provide reasonable downward compatibility. If you want to use USB-3 Speed you need to use USB-3 Webcams.

Let me give you a example for further explenation. Let's say:

Ok, we build a high speed railway. Because the railway is high speed we can put more slow trains onto it than on our slow railway. Hurray!

Technically it's the same for USB. Just because you could drive faster on the railway does not mean there is more space (bandwidth) for slow trains (USB2). The slow trains will drive slow on the fast track, making it impossible for the fast trains (USB3) to use the railway at full speed. To deal with this some engineers decided not to replace the slow railway with the faster one, but to build it right next to it. With this setup it is possible for the fast trains to drive high speed on the fast railway and the slow ones on the slow. Same for USB3 downward compatibility.

Mose

Posted 2012-11-01T19:21:48.337

Reputation: 545

Actually, a better way to provide good downward compatibility is to build a translation hub - a microcontroller programmed to do the protocol conversion, connected to USB2 devices on the downside and a USB3 controller on the upside. This would be like loading your slow trains onto the fast train (as cars/containers get loaded onto trains,ferries,planes,etc.) – David M W Powers – 2016-05-22T05:05:58.823

I was about to answer my own question, but your analogy is really good. I will edit my question (when I have time) to put together all the info I obtained during my tests and research to clarify the subject for further researches. So, the answer to my question is simple: it's not possible to plug 50 webcams in a single computer. There are no 3.0 webcams on the market yet, there are just industrial cameras for sale (very expensive), sadly. – Ian Medeiros – 2012-11-14T16:42:35.867

1

The railway analogy is flawed, although the problem remains for many hubs. It is possible to have 10 USB-2 devices uprated to USB-3 but that depends on the hub. It was the same for USB-1 devices in USB-2 hubs. Most hubs shortcut by providing only one controller which is one specific standard, but some provide separate controllers for each port so any can be any standard without affecting the others - these are more expensive. An intermediate solution is a hub that provides (for one commercial product) three USB-3 ports and four USB-4 ports. The standard specifically allows for running USB-3 and USB-2 devices to operate simultaneously, with the USB-3 devices having the advantage of the additional bandwidth.

I have been running two Logitech webcams on USB-2 for years at an appropriate rate (e.g. as I recall 15fps x 640x480), and using multiple cheap CPUs to process and ethernet to aggregate 6 cameras plus other USB devices. With USB-3 I can hopefully use a daisy chain of the above hubs to achieve this, with two USB-2 cameras (or other devices) per 3+4 hub, assuming I use a hub controller that converts between USB-3 and USB-2 rather than one that just acts as a separate USB-2 hub for the USB-2 devices.

USB3 cameras are available but expensive, and unnecessary - it is just necessary to uprate a USB2 camera to USB3 to be able to use them but I can't find a hub or converter that claims to do this (there were/are analogous devices for USB1 to USB2).

David M W Powers

Posted 2012-11-01T19:21:48.337

Reputation: 119

1Did you ever find a hub or converter that could uprate? – g491 – 2017-02-24T14:36:15.240

0

If some of you would like to use 8 or 12 webcams in one desktop, I am sure, you would like to use these webcams as a surveillance system. Many, if not all solutions discussed here I have already tried, i.e. using USB 2.0 vice 1.1, using powered USB port hub, using PCI usb...believe, me, you could only load up a desktop (I do not have an i7 system) up to 4 webcams, even then you would have to through trial and error with the ports.

SOLUTION? I used 3 desktops, cheap enough nowadays, (you don't need monitor/mouse/keyboards) except when loading up the system, then you could remotely access the 4 webcams each (I am using 3 desktops for a total of 12 webcams). I monitor them remotely in one computer with external monitors.

SOFTWARE: I recommend IP CAMERA VIEWER (free) or the PRO if you like, and the TEAMVIEWER - Free for personal use, but you have to pay for business use. BOTH OF THESE PROGRAMS ARE AWESOME. Save yourselves time researching..These programs are mature and it shows in the design.

WHAT IS NEXT? Even if you internet speed is slow, the cameras, the monitors are forgiving. ADVANTAGE OF USING 3 DESKTOPS? You could get closser to where you need your cameras to be in 3 different locations, as everyone knows, you could only have up to 5 meters with your USB cable and if lucky like me up to 8, with a USB powered HUB.

IP CCTV CAMERAS - who could use VERY VERY VERY LONG CABLES can be used with BNC to USB ADAPTERS WITH BUILT-IN GRAPHICS CARD. I ordered a 4, an 8, and a 16 CCTV CAMERAS for 1 USB, there are not here yet. I will let you know when they come it...

I was forced to use webcams as the internet service providers router where I am at does not allow or cant access port forwarding... so no IP ADDRESSING for me.

GOOD LUCK GUYS/GALS...

Antonio M Alonzo Sr.

Posted 2012-11-01T19:21:48.337

Reputation: 1

I've actually had 8 cameras and a Kinect on the same grunty towerbox, but in practice, only use 4 of the cameras (plus the Kinect) at a time for continuous recording - all can be used for snapshots. This is not for surveillance but for AudioVisual Corpus recording, and intelligent room/robot research. – David M W Powers – 2016-05-22T05:09:43.633