Problem with two identical web cameras

Karol61

New Member
Hi. I have OBS Studio on a Macbook Air M1 with Mac OS Ventura I have two identical webcams added in OBS. And only one camera is always going. If I add another type of camera it works OK. Please help me.
 

AaronD

Active Member
I assume the webcams are USB?

USB is supposed to be smart enough to handle that exact situation, because each device is supposed to have a unique serial number that it reports to the host. But it's cheaper for the factory to make them all EXACTLY the same, and so the serial number ends up being the same too. That's technically a violation of the USB spec, but good luck enforcing it!

Meanwhile, some operating systems figure it out anyway, while others insist that everything does follow the spec. I don't have direct experience with Mac, but:
  1. Lubuntu 20.04 (released in April 2020) works just fine with 4 identical HDMI->USB capture cards. The cards themselves had some issues, and sometimes the order would change because they all start at the same time and they're literally indistinguishable, but I could still use them all just fine...after fixing the order...again.
  2. Ubuntu Studio 22.04 (two years later, and a slightly different team behind it) can only use 1 of the same 4 cards. Any 1 will do, but only 1. I have an internal 4-input card now, and it likes that.
  3. Windows "does it right" the first time, reading all of how the device reports itself, to find a good driver. But then it only looks at the VID:PID pair (a 16:16-bit vendor:product code, that does *not* include the serial number) to load that driver again. If you plug in two of the same device on Windows, even if they do have different serial numbers, it confuses that driver cache and only one ends up working.
  4. Linux at least uses the entire descriptor, every time, and my guess is that Mac does too, since they're both based on Unix, and Windows is not.
So, I would expect that your best possibility with two identical USB things, would be similar to #1 - working, but randomly trading places sometimes - and another likely scenario would be like #2 - only 1 of the same thing works at all, at the same time...which is exactly what you said.
 

Tangential

Member
I assume the webcams are USB?

USB is supposed to be smart enough to handle that exact situation, because each device is supposed to have a unique serial number that it reports to the host. But it's cheaper for the factory to make them all EXACTLY the same, and so the serial number ends up being the same too. That's technically a violation of the USB spec, but good luck enforcing it!

Meanwhile, some operating systems figure it out anyway, while others insist that everything does follow the spec. I don't have direct experience with Mac, but:
  1. Lubuntu 20.04 (released in April 2020) works just fine with 4 identical HDMI->USB capture cards. The cards themselves had some issues, and sometimes the order would change because they all start at the same time and they're literally indistinguishable, but I could still use them all just fine...after fixing the order...again.
  2. Ubuntu Studio 22.04 (two years later, and a slightly different team behind it) can only use 1 of the same 4 cards. Any 1 will do, but only 1. I have an internal 4-input card now, and it likes that.
  3. Windows "does it right" the first time, reading all of how the device reports itself, to find a good driver. But then it only looks at the VID:PID pair (a 16:16-bit vendor:product code, that does *not* include the serial number) to load that driver again. If you plug in two of the same device on Windows, even if they do have different serial numbers, it confuses that driver cache and only one ends up working.
  4. Linux at least uses the entire descriptor, every time, and my guess is that Mac does too, since they're both based on Unix, and Windows is not.
So, I would expect that your best possibility with two identical USB things, would be similar to #1 - working, but randomly trading places sometimes - and another likely scenario would be like #2 - only 1 of the same thing works at all, at the same time...which is exactly what you said.
Another thing to try at is making sure that each webcam is on a different USB bus. That will often solve the problem.
 
  • Like
Reactions: TFE

AaronD

Active Member
Another thing to try at is making sure that each webcam is on a different USB bus. That will often solve the problem.
Possibly. Not just different ports though, as there are often internal hubs that put several ports on the same bus controller. You really do want different controllers, if this is going to make any difference at all.
 
Buy a cheap USB capture from Amazon then connect the second camera through it to the Mac, That way the USB bus sees the capture device not the camera, hopefully identifying it differently.
 

Tangential

Member
Possibly. Not just different ports though, as there are often internal hubs that put several ports on the same bus controller. You really do want different controllers, if this is going to make any difference at all.
In the old days the ports on one side of a notebook were usually in a different bus than the other. This was true on Intel Macs. With the new apple silicon I have no idea how they are segregated. If the Mac also has thunderbolt then a USB adapter through thunderbolt would definitely be a different bus than any built in USB legacy ports.
 

AaronD

Active Member
Buy a cheap USB capture from Amazon then connect the second camera through it to the Mac, That way the USB bus sees the capture device not the camera, hopefully identifying it differently.
Three problems with that:
  1. "Web cameras" (per the title and first post) are often USB only. Can't feed a capture device.
  2. Cheap USB capture devices are often USB 2, even if they have a USB 3 connector and are sold as USB 3. (the sellers usually don't have a clue what they're selling but have to write a description anyway...) In order to cram HD video through USB 2, they have to compress it, in the capture device itself, before it even gets to the computer. That compression is usually MJPEG, which is literally a JPG still image for each frame by itself, with no knowledge of the other frames. If you've seen the "JPG fuzzies" on a still image, that's also what it does to your video. With a camera, it's not so bad, as the JPG compression algorithm is designed specifically for real-world images. But with computer-generated presentation slides, it's more noticeable.
  3. The latency is highly variable. It could be anywhere from ~150ms to ~500ms or so, **solely from shutting down the rig to power-off, and immediately starting it back up again without moving any cords at all!** If you're only recording that one signal, then this part is okay, but good luck keeping it in sync with anything else! Even if you get it right, the same setting will be drastically wrong next time. That's not an OBS problem; it's the capture device that does that, internal to the device.
One of my rigs had 4 cheap HDMI -> USB captures, and I had problems #2 and #3 in spades! I would get it close enough to live with the variation, but it still wasn't *right*. A single 4-input internal capture card fixed both problems.

Another rig still has a different cheap HDMI -> USB capture, and it also has problems #2 and #3. It's for a camera, so #2 isn't *quite* so bad, but #3 is still a deal-killer, because of the separate USB mic. The difficulty in replacing that one comes from it being a laptop with only USB available, so it has to be a USB capture device, and even the higher-end USB captures seem to have difficulty supporting Linux, which is what I've built that rig on. The cheaper ones support Linux just fine, but they have the problems as above.

I've tried 2 higher-end USB captures so far, both from AVerMedia. Anyone know of something else to try, that does work on Linux? I'm not married to AVM; it's just what I found to start with.
 

AaronD

Active Member
Elgato Camlink 4K?
I finally got an excuse for another order, and tossed that exact one in it. It works perfectly! Thank you!

Well...it works perfectly after I change the color settings and back again. Before that, it has about a second of latency. After, even with the same setting that it started with, it's down to almost instant. But I can live with that.
 
Top