Issues with OBS confusing 10 USB cameras

In my studio I have 10 cameras labeled General UVC.

I checked with apple they said that there's no way you could label those 10 different UVC cameras anything different than what the operating system lets you label them as.

These cameras are sq-11s and I don't know how to change the name on those.

The problem when you have 10 cameras is the same name is that OBS will never remember which one is which and will never keep one stored because the operating system always shuffles them around.

I don't know what to do in this case. It's like I got a plan 30 minutes in advance just to make sure I have the right cameras on the segments.

If Apple lets you rename cameras on their OS then that would have been good and should keep OBS from losing the cameras if I'm right.
But Apple doesn't let you rename cameras. So I don't know what to do to make sure all the cameras stay in the formed spots.

Every time I shut the computer off and turn it back on, the operating system mixes up all those 10 UVC cameras which causes OBS to lose the link with the camera.

If Apple won't sell this problem then it's up to OBS to find some way to name these cameras.

Is it better strategy to label them as camera 1l 1R 2L 2R 3L 3r for the most cameras I'll use and rotate between them or should I leave them as fixed cameras?

OBS remembers its names for its cameras but the corresponding USB camera does not stay constantly connected with it. I have to set up my computer many minutes in advance before I actually want to stream.
 

AaronD

Active Member
There's this for Windows:
But it appears that it's *only* for Windows.

That said, I'm not convinced that even that would survive a reboot. If all of the cameras report the same, including the serial number that is supposed to be different but is cheaper to make the same, then it's just a race to see who gets configured first, and everything else follows that order, including any renaming you may have done. I suppose it's *possible* to use the USB tree as the unique identifier, but I don't think any OS does that.

As far as OBS is concerned, there's no way at all to tell which is supposed to be which. It's definitely an OS problem. Sort that, and OBS will follow.

What you might do, given the above, is to not have the cameras start with the computer, but *sequence* them on *after* the computer. So for 10 cameras, you'd have a 12-step sequence to power-on, with enough delay between each step to be sure that it's finished before starting the next:
  1. Computer
  2. Cam 1
  3. Cam 2
  4. Cam 3
  5. Cam 4
  6. Cam 5
  7. Cam 6
  8. Cam 7
  9. Cam 8
  10. Cam 9
  11. Cam 10
  12. OBS
See if that gets you a reliable order. If it does, then you can look for a power sequencer, or modify a USB hub that has a power switch for each port. Replace the switch with a relay that is powered from the previous port + a timer. (*) The first relay has an extra-long timer because the computer takes that long to finish booting, or you have a separate way to turn the first one on.



(*) The timer could be as simple as an R-C lowpass and a transistor, though I'd probably replace the transistor with a comparator IC, both to make a sharp cut-on by adding some positive feedback, and to allow an adjustable threshold.

Or if you'd rather do it digitally, a many-pin, otherwise "braindead" 5V microcontroller could do it too. Power it from the first port, and have it run an internal counter. Each pin becomes active when the counter exceeds its own threshold. If you use a pre-biased PNP transistor (search term) for each channel, then you don't need any other parts. When the microcontroller's pin goes low, the transistor allows power to its USB port, just like the switch that it replaced.
 
Sounds easier just to allow for an extra 15 minutes before you broadcast to set up all the cameras. I got more time than technical know-how or money.

.)

By the way I made Apple aware of this problem about multiple cameras having the same name causing issues with obs. If there was some way you could differentiate him in the OS then that would solve everything. Even numbering them would be nice.
 

Tangential

Member
In my studio I have 10 cameras labeled General UVC.

I checked with apple they said that there's no way you could label those 10 different UVC cameras anything different than what the operating system lets you label them as.

These cameras are sq-11s and I don't know how to change the name on those.

The problem when you have 10 cameras is the same name is that OBS will never remember which one is which and will never keep one stored because the operating system always shuffles them around.

I don't know what to do in this case. It's like I got a plan 30 minutes in advance just to make sure I have the right cameras on the segments.

If Apple lets you rename cameras on their OS then that would have been good and should keep OBS from losing the cameras if I'm right.
But Apple doesn't let you rename cameras. So I don't know what to do to make sure all the cameras stay in the formed spots.

Every time I shut the computer off and turn it back on, the operating system mixes up all those 10 UVC cameras which causes OBS to lose the link with the camera.

If Apple won't sell this problem then it's up to OBS to find some way to name these cameras.

Is it better strategy to label them as camera 1l 1R 2L 2R 3L 3r for the most cameras I'll use and rotate between them or should I leave them as fixed cameras?

OBS remembers its names for its cameras but the corresponding USB camera does not stay constantly connected with it. I have to set up my computer many minutes in advance before I actually want to stream.
I’m super impressed you’re even able to get 10 USB identical webcams to work.

What type of Mac are you using?

I’ve got 2 thoughts.

First, you must be using several hubs to accomplish this. Have you tried just unplugging the hubs before booting and the plugging the hubs in after boot and login (and doing it the exact same way each time.) Leave the cameras on the hubs and plug each hub into the same usb port on the Mac each time.

Another approach would be to use symlinked device names that don’t change. You write a script using the output of
system_profiler SPUSBDataType
And see if there is a unique identifier (like serial number) for each camera. If there is uniqueness then based on that the script would relink the symlinked device names to the proper real device.
 
Last edited:

AaronD

Active Member
Sounds easier just to allow for an extra 15 minutes before you broadcast to set up all the cameras. I got more time than technical know-how or money.
You're trading off time and effort once for time always. But yes, it also works to sequence them manually...if you always get it right.
 
I’m super impressed you’re even able to get 10 USB identical webcams to work.

What type of Mac are you using?

I’ve got 2 thoughts.

First, you must be using several hubs to accomplish this. Have you tried just unplugging the hubs before booting and the plugging the hubs in after boot and login (and doing it the exact same way each time.) Leave the cameras on the hubs and plug each hub into the same usb port on the Mac each time.

Another approach would be to use symlinked device names that don’t change. You write a script using the output of
system_profiler SPUSBDataType
And see if there is a unique identifier (like serial number) for each camera. If there is uniqueness then based on that the script would relink the symlinked device names to the proper real device.
That's interesting just unplugging and replugging in the Thunderbolt adapters.

Let me try that and see if that works.

(Tries it)

No that doesn't work. It's like every single time I shut off the computer OBS loses track of which input is which unless there's only one of them like the HDMI input.

OBS is relying on the USB names being different and apple by definition won't let you name it anything different. And if it sees multiple identical copies which is probably more likely than 10 unique cameras from 10 unique manufacturers. OBS is just frozen as to which camera is which as soon as you turn off the computer.

(Rereads it sees unplug USB hubs). Now I realize I have three Thunderbolts hubs that split off into multiple USB 3.0 ports.
 
That's interesting just unplugging and replugging in the Thunderbolt adapters.

Let me try that and see if that works.

(Tries it)

No that doesn't work. It's like every single time I shut off the computer OBS loses track of which input is which unless there's only one of them like the HDMI input.

OBS is relying on the USB names being different and apple by definition won't let you name it anything different. And if it sees multiple identical copies which is probably more likely than 10 unique cameras from 10 unique manufacturers. OBS is just frozen as to which camera is which as soon as you turn off the computer.

(Rereads it sees unplug USB hubs). Now I realize I have three Thunderbolts hubs that split off into multiple USB 3.0 ports.
I have a Mac Mini 2018 Intel i3
 
Does anyone know how Thunderbolt ports play into this. I have four Thunderbolt ports three them are plugged into Thunderbolt docks. Each dock is externally powered. Each stock contains three USB 3.0 A female connectors.

The easiest way to clear it is if Apple goes back in and adds Auto numbering to identical USB devices which was present in os's as late as OS 10.13. I noticed by OS 12 I have this problem.

It's that just the problem with my cameras but a problem with my microphones too I have two different staging areas with two different microphones and there's no way I could tell which is which even when hooked up to one because my room could hear both but doesn't know which one to activate first.

The only one that stays in memory is the HDMI one and that is plugged into its own Thunderbolt port with an unpowered thunderbolt (possibly USB 3.1 C) to HDMI plus USB adapter.

Anyone know the proper procedure of using OBS when everything is plugged into Thunderbolt ports?

Also I don't know if the only reason OBS recognizes the HDMI input is because it's unique or because it's directly plugged into the Mac.

And I tried unplugging the power of the Thunderbolt parts and replug them back in I tried unplugging the Thunderbolt ports at the Mac and and nothing coming in.

And as one of the weird observation there is one pair of USB cameras that are connected by the second Thunderbolt Port converted to USB 3.0 A adapter. But it's advertised as a USB 3.1 C to USB 3.0 adapter. Maybe to turn it to USB 3A directly without power I need a special Thunderbolt to USB 3A.
 

Steve-WR

New Member
There's this for Windows:
But it appears that it's *only* for Windows.

That said, I'm not convinced that even that would survive a reboot. If all of the cameras report the same, including the serial number that is supposed to be different but is cheaper to make the same, then it's just a race to see who gets configured first, and everything else follows that order, including any renaming you may have done. I suppose it's *possible* to use the USB tree as the unique identifier, but I don't think any OS does that.

As far as OBS is concerned, there's no way at all to tell which is supposed to be which. It's definitely an OS problem. Sort that, and OBS will follow.

What you might do, given the above, is to not have the cameras start with the computer, but *sequence* them on *after* the computer. So for 10 cameras, you'd have a 12-step sequence to power-on, with enough delay between each step to be sure that it's finished before starting the next:
  1. Computer
  2. Cam 1
  3. Cam 2
  4. Cam 3
  5. Cam 4
  6. Cam 5
  7. Cam 6
  8. Cam 7
  9. Cam 8
  10. Cam 9
  11. Cam 10
  12. OBS
See if that gets you a reliable order. If it does, then you can look for a power sequencer, or modify a USB hub that has a power switch for each port. Replace the switch with a relay that is powered from the previous port + a timer. (*) The first relay has an extra-long timer because the computer takes that long to finish booting, or you have a separate way to turn the first one on.



(*) The timer could be as simple as an R-C lowpass and a transistor, though I'd probably replace the transistor with a comparator IC, both to make a sharp cut-on by adding some positive feedback, and to allow an adjustable threshold.

Or if you'd rather do it digitally, a many-pin, otherwise "braindead" 5V microcontroller could do it too. Power it from the first port, and have it run an internal counter. Each pin becomes active when the counter exceeds its own threshold. If you use a pre-biased PNP transistor (search term) for each channel, then you don't need any other parts. When the microcontroller's pin goes low, the transistor allows power to its USB port, just like the switch that it replaced.
I found CamRename worked OK IF you keep the cameras connected to the same USB port....

If i understand things right, USB devices only provide Vendor and Device IDs - nothing like a unique serial number so all CamRename can do is change the "friendly name" when it sees it has been connected to a USB Port. So ensuring each camera is connected (or reconnected) to the same port should mean OBS 'connects' everything up as expected.

I hope this helps....

Stev

I only use a couple of cameras but
 

AaronD

Active Member
If i understand things right, USB devices only provide Vendor and Device IDs - nothing like a unique serial number...
Download link at the top right, unzip, then page 263 of usb_20.pdf. That's the tail end of the first descriptor that gets sent from device to host, when the host has no idea what this thing even is yet. Back up to page 261 to start that section.

The serial number is an index to a string that can be asked for by that index later, whereas the vendor and product codes are each self-contained 16-bit numbers. The index can be the same across devices, to point to the same string, but the contents of that string should be unique...except it's cheaper to make them all *exactly* the same including that.
 

Steve-WR

New Member
Download link at the top right, unzip, then page 263 of usb_20.pdf. That's the tail end of the first descriptor that gets sent from device to host, when the host has no idea what this thing even is yet. Back up to page 261 to start that section.

The serial number is an index to a string that can be asked for by that index later, whereas the vendor and product codes are each self-contained 16-bit numbers. The index can be the same across devices, to point to the same string, but the contents of that string should be unique...except it's cheaper to make them all *exactly* the same including that.
Aaron, thank you for taking the time to expand my understanding of this...
So, assuming I do get it, are you saying that the serial numbers may well be duplicated across all devices? If so, you'd think any saving would be very small...
 

AaronD

Active Member
Aaron, thank you for taking the time to expand my understanding of this...
So, assuming I do get it, are you saying that the serial numbers may well be duplicated across all devices? If so, you'd think any saving would be very small...
If there's only one thing different between devices, it's kind of a big deal for mass manufacturing. It's amazing how much a tiny intentional difference can cost, when everything else is identical. There are ways to do that, of course, but it has repercussions in several different places:
  • Tools have to move or change, and be right every time, instead of being "stuck how they're supposed to be"
  • Quality control (if there is any) needs to know which one it's checking, and so there has to be a mechanism for that, which has several points of failure all by itself
  • Etc.
If you already have that, then one more incremental difference is barely anything. But if you're right on the edge of not being any different at all, it's a big deal.

---

Programmable chips, that are manufactured blank and programmed later, usually do have a unique serial number on the chip itself than can be read by the program. If the program is written to use it, then the same program on the same part number of chip CAN have a unique serial number on USB, because it incorporates the chip's serial number that it's running on. I've read the code of a couple of different libraries that do exactly that.

For one-off prototypes or low volume runs, that's what you do, but there's a crossover point between that and mass manufacturing, where it becomes cheaper to design your own custom chip that only has that exact one function, and dispense with the programming. That's when they become 100% identical to save cost.
 
Last edited:

Steve-WR

New Member
I hear you....

Makes me wonder if there is an app out there that would allow a broader extraction of data that would include a unique ID per device.... for those that have multiple cameras, this could make life much easier...
 

AaronD

Active Member
I hear you....

Makes me wonder if there is an app out there that would allow a broader extraction of data that would include a unique ID per device.... for those that have multiple cameras, this could make life much easier...
It's kinda hard to extract something that's not there. (entirely 100% identical, despite the official spec) I think the USB connection tree, or a somehow-enforced startup order would be the only reliable ways to do it...if the operating system would cooperate; see the last paragraph in this post.

USB is supposed to be smarter than that, using the serial number to track multiple of the same device as they move between ports or start up in a different order, but you can scroll up here to see how *that* goes! :-/

Adding to that mess some more, is Windoze's caching of vendor and product ID's, so it doesn't even look at the rest of the descriptors anymore. That's fine if you only have one of each thing that works from the factory, but for multiples and for prototypes that don't work yet, it quickly becomes a nightmare! Mac and Linux don't do THAT, thankfully!
 
I found CamRename worked OK IF you keep the cameras connected to the same USB port....

If i understand things right, USB devices only provide Vendor and Device IDs - nothing like a unique serial number so all CamRename can do is change the "friendly name" when it sees it has been connected to a USB Port. So ensuring each camera is connected (or reconnected) to the same port should mean OBS 'connects' everything up as expected.

I hope this helps....

Stev

I only use a couple of cameras but
A couple questions about CamRename.

1. Does it work for Mac?

2. Will this keep it for as long as the physical USB link remains intact? (Meaning in the cameras don't get unplugged and replugged into anything. They remain where they are.)
3. Will it work in between shutdowns and power ups?
 
In my studio I have 10 cameras labeled General UVC.

I checked with apple they said that there's no way you could label those 10 different UVC cameras anything different than what the operating system lets you label them as.

These cameras are sq-11s and I don't know how to change the name on those.

The problem when you have 10 cameras is the same name is that OBS will never remember which one is which and will never keep one stored because the operating system always shuffles them around.

I don't know what to do in this case. It's like I got a plan 30 minutes in advance just to make sure I have the right cameras on the segments.

If Apple lets you rename cameras on their OS then that would have been good and should keep OBS from losing the cameras if I'm right.
But Apple doesn't let you rename cameras. So I don't know what to do to make sure all the cameras stay in the formed spots.

Every time I shut the computer off and turn it back on, the operating system mixes up all those 10 UVC cameras which causes OBS to lose the link with the camera.

If Apple won't sell this problem then it's up to OBS to find some way to name these cameras.

Is it better strategy to label them as camera 1l 1R 2L 2R 3L 3r for the most cameras I'll use and rotate between them or should I leave them as fixed cameras?

OBS remembers its names for its cameras but the corresponding USB camera does not stay constantly connected with it. I have to set up my computer many minutes in advance before I actually want to stream.
I don't know if this would work, what if you buy a few different cheap captures and connect the cameras through them? The computer should pick up the capture cards but not the camera directly, the that way you can identify which camera number is plugged into the respective cards. Otherwise it looks like a case for the camera manufacturer to enable renaming.
 

AaronD

Active Member
...cheap captures...
Those have enough problems that it's usually not worth trying. Cheap parts that barely work in the first place, if at all, deceptive marketing and product design, etc.

One of the common points of deception is to put a USB 2 chip behind a USB 3 connector, so that you'll only ever get the USB 2 data rate. And then they make a big deal about how much better USB 3 is than USB 2, and make sure to show the USB 3 connector in the pictures. Except you'll never actually *get* USB 3 because the chip behind that connector is USB 2 only.

You can't cram HD video through USB 2 without compressing it, hard! So that's exactly what happens. The cheap USB 2 capture card with a USB 3 connector and corresponding hype, wrecks the picture quality IN THE CARD just to shove it through the USB 2 that it actually is.

And there's also the problem of randomly variable latency for each cheap card, possibly as a result of the in-card compression being weird. I used to have 4 of them in the same rig, and they were always out of sync with *each other*, not just the separate soundtrack, by different amounts and directions each time. Good luck chasing *that* with delay filters!

Expect to spend about $100 per channel for name brand USB captures. Don't even look at the cheap stuff. That's coming from a cheapskate with a pile of cards that are almost unusable.

And even if you do get an actual USB 3 capture, each USB controller (not port) is usually good for just one of them. Back to the data rate problem again. You can't just plug a bunch of them directly into the ports on the computer and expect it to work, because most computers have internal hubs that bring all of those ports back to a single controller. No difference at all between that and an external hub. It's the *controller* that matters, not the ports. If you happen to have two controllers, then you can have two USB captures, IF you figure out which ports go to which controller and make sure that you actually DO have them on separate controllers.

Much better, if you can, to use internal PCIe cards with multiple inputs each, if the cards play well with each other (not all do), or if you can find a single card that has a TON of inputs. And there's a pitfall with that too. The cheap ones of those are often sold for security systems that don't actually need to see more than one at a time. So they only have one converter, which is the expensive part, and a quick-and-dirty switch to select which one input goes to that converter. You probably don't want that either. If you use an internal PCIe card, make sure that it has a dedicated converter for each input, so that you can see all of its inputs simultaneously.
 
Well my cameras are in sync with each other cuz they're all hooked up to my Macintosh.

I think I found a way to get around the maximum 9 cameras in Mac OS, and that is to use a different stereoscopic pair.

Problem is the stereoscopic pair now has the exception to the rule where most of the left eye cameras are 180° rotated, the one on the non-SQ 11 is not not rotated or correctly oriented, however you want to view it.

If there was a way you could designate a camera as 180° rotated in the OBS level then I could use that exception rotated 180°, then the OBS templates will rotate another 180 degrees, and it would be upright after that double rotation.

It's also handy to have the left eyes upside down so that if I'm trying to identify the camera when I'm doing the OBS setup that I know whether I'm dealing with a left eye or a right eye. If I could rotate that one left eye that's upright back into upside down then I know I'm dealing with the left camera if it's artificially rotated 180° by the OBS as a camera itself and not as a template on the scene.
 

AaronD

Active Member
If there was a way you could designate a camera as 180° rotated in the OBS level then I could use that exception rotated 180°
For non-Mac, Right-click -> Transform -> Rotate 180deg, or something like that.
I use that on a Linux rig because the USB PTZ camera is upside-down for some reason. Maybe they meant for it to hang from the ceiling? But everything else is right-side-up, like the brand badge and the PTZ directions on the repurposed TV remote...go figure. Or maybe the guy that designed the circuit board and/or its mount didn't understand the optics that they were putting in it. Anyway, that fixed it.

For Mac, maybe you can get a two-button USB mouse? I've heard that those work the same way. Or maybe there's another way to get the contextual menu. I'm not really a Mac guy, so I'm only qualified for generalities here, of which there are still a lot!
 
Top