udev and a rule similar to this:
ENV{SUBSYSTEM}=="video4linux", ENV{ID_TYPE}=="video", ENV{ID_SERIAL_SHORT}=="0582C6D0", SYMLINK+="video-ibm2", GROUP="video"
ENV{SUBSYSTEM}=="video4linux", ENV{ID_TYPE}=="video", ENV{ID_SERIAL_SHORT}=="A6D77E9F", SYMLINK+="video-pr1", GROUP="video"
ENV{SUBSYSTEM}=="video4linux", ENV{ID_TYPE}=="video", ENV{ID_SERIAL_SHORT}=="9EAC29D0", SYMLINK+="video-pr2", GROUP="video"

I don't know if that rule still works,I last used it 8 years ago.  But something similar should still work.  And at least the logitech cams do seem to have a serial number.

 udevadm info /dev/video0  will dump the info.  If you want to be avoid udev, you could use the SN  from the info command and create another device in /dev with the name you want and the same major/minor number (using the mknod command) (major/minor is in the info command).  Say start at /dev/video20 or something similar.

udev is the clean way to do it, but udev is more difficult to debug if it does not work, and I have been burned by udev changing semantics enough to do it the crude but easier to debug way.


On Tue, Mar 22, 2022 at 12:33 PM Steve Underwood <coppice12@gmail.com> wrote:
Hi,

The Linux UVC driver for USB video cameras names devices according to
the product name it gets from the USB device itself. This is fine if you
have different models of camera, as each gets a different name. However,
if you have, say, 3 Logitech C920 cameras, the device list in video
applications shows you have many devices called "HD Pro Webcam C920",
and you can't tell which is which. I looked in the driver source code to
see if there is a way to tag the cameras with unique names, but there
doesn't seem to be. Does anyone know if I missed something?

Regards,

Steve
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure