Camera's in Linux switch filename on boot

0

1

I've got a few camera's for use in Zoneminder. But they tend to switch places upon boot. One tiem camera a will get /dev/video0, the other time it will be /dev/video1.

Is there a way to set these filenames, to make them permanent?

skerit

Posted 2012-10-07T15:51:21.490

Reputation: 746

Answers

1

Yes, it is possible, with the help of udev rules. See /etc/udev/rules.d (in Debian based distros).

Basically, you can bind the device to a name using vendor and other information available on the device via USB interface. $ lsusb and $ usb-devices help you determining the correct information about your devices. And udev documentation helps with the actual rule syntax.

por

Posted 2012-10-07T15:51:21.490

Reputation: 271

2

If you have a small number of known cameras, the best approach for writing a udev rule is probably to use the serial numbers to distinguish them (as this will work even if they are the same model).

I have found this reference really good for getting started with udev.

jam

Posted 2012-10-07T15:51:21.490

Reputation: 629