How We Can Make Multiple USB Camera Modules More Identifiable: Solution To Duplicate Device Names and /dev/video Problems
Using Multiple Camera Modules in Linux and Windows Can Be Convenient and Problematic At the Same Time
Bandwidth aside, there are many situations where using more than 2 camera modules with your hardware of choice is required, like when you are trying to build a DIY camera cluster, or a raspberry pi powered multi-camera surveillance system, or a multi-view live streaming set, etc. The plug-and-play characteristic of a UVC-compliant camera makes integration easy for many projects and machine vision applications.
But flexibility comes with a cost, when many cameras are connected to one computer, no matter which system the host is running, there appear to be many pitfalls:
- Every camera module has its own firmware, yet for all units of the same model/batch, information like vendor name, model ID, and even serial number stays identical due to the camera manufacturer’s naming conventions.
- Having the same device names makes it extremely difficult to tell which camera is which, especially when multiple modules are connected.
- In Ubuntu or any other Linux distros, a single USB camera is listed as multiple /dev/video devices, and its order changes each time you replug one of the cameras.
- Debugging becomes impossible when one of the cameras fails.
We are going to need a one-and-done solution.
Linux: Multiple USB Cameras Will Mess up your /dev/video Entries, and It’s Unavoidable
In Ubuntu, when you hook up 2 or more UVC-compliant camera modules and enter the lsusb command, you get something like this:
All USB cameras have the same name.
If you check them with ls /dev/video* -lh, there are dozens of video device entries ( note that each /dev/video device supports one or several video formats):
And if you go check the manufacturing information, you will find that the MODEL_ID, SERIAL_SHORT & VENDOR_ID of these video devices are all the same as well.
This makes it really inconvenient for developers to programmatically identify and access a certain or all the camera modules.
Duplicate Device Names With Multiple Webcams in Windows
Using multiple USB cameras in windows has some downsides too, the names of the camera modules shown in Device Manager make no difference as to what you find in other systems. Applications need the device name for API calls, and to differentiate between different camera modules, you either have to manually replug them to see which one disconnects, or alter the system Registry to change their names. And whenever you take the same cameras to another computer, the “duplicate name” problem still exists.
You need to find a way to change the camera modules’ device names so that no matter how many modules are connected, no matter which computer you are on, they can be more recognizable to the developers.
The Need: Making Multiple USB Cameras More Distinguishable For Developers
So, all things considered, we need a solution that:
- Makes multiple USB cameras (webcams/board cameras/etc.) on one computer (Ubuntu/Windows/etc.) easier to manage, without doing any changes to the system.
- Gives users full control over any of the cameras they own.
- Helps developers build multi-camera projects faster without having to deal with these naming issues.
Luckily, Arducam has figured it all out for you.
The Fix: A Software That Permanently Changes Device Names and Serial Numbers of USB Camera Modules
Our Windows software is created to fix the above issues, which bothers many developers when they try to use multiple external cameras with Windows/Linux/macOS computers.
It offers you the chance to change both the device name and the serial number of a UVC-compliant camera module with just a few clicks. Once the modification is made, it will be permanent through all operating systems until you use this software to rewrite them again.
Here’s the step-by-step guide: