I have 3 USB cameras on single PC, one camera will be unused and can be ignored.I need to force two identical cameras to be mapped to constant device names (like /dev/video1 and /dev/video2 ). The cameras should not change their order (say camera 1 mounted as video1 and camera 2 as video2 after disconnect they should be in same order not camera1 --> /dev/video2, camera2 --> /dev/video1. How to make this setup work?I will feed camera output to Gstreamer. Cameras are using v4l2 and uvc driver interface. Linux distro in question is Archlinux, cameras - some Logitech webcams.
How to bind v4l2 USB cameras to the same device names even after reboot?
linux;video
I suggest you autocreate /dev symlinks using udev, using unique properties (serial number? port number?) of your USB cameras.  See this (should apply to Arch as well) tutorial about udev rules.  Or maybe this tutorial is clearer.You can get the list of properties for your devices using:sudo udevadm info --query=all --name=/dev/video1thensudo udevadm info --query=all --name=/dev/video2Find what's different and create a .rules file out of it inside /etc/udev/rules.d (you can use 99-myvideocards.rules as a filename, say); let's say you want to use the serial number, you'd get a ruleset that looks like:ATTRS{ID_SERIAL}==0123456789, SYMLINK+=myfirstvideocardATTRS{ID_SERIAL}==1234567890, SYMLINK+=mysecondvideocardAfter unplugging/replugging your devices (or after a reboot), you'll get /dev/myfirstvideocard and /dev/mysecondvideocard that always point to the same devices.