/dev video devices keep changing upon reboot

Forum for questions and support relating to the 1.24.x releases only.
Locked
mdods
Posts: 1
Joined: Wed Feb 09, 2011 11:21 am

/dev video devices keep changing upon reboot

Post by mdods »

I have four cameras operating on a SUSE 11.3 system with kernel 2.6.37-4.
3 x USB 2.0
1 x capture card (using a camera on the composite port)

Every time the system is rebooted the video device listing changes. ie the composite camera may change from video0 to video2 for example. The USB cameras also change but are less noticeable.

/dev
crw-rw-rw-+ 1 root video 81, 0 2011-02-09 07:33 video0
crw-rw-rw-+ 1 root video 81, 1 2011-02-09 07:33 video1
crw-rw-rw-+ 1 root video 81, 2 2011-02-09 07:33 video2
crw-rw-rw-+ 1 root video 81, 3 2011-02-09 22:08 video3

This wouldn't be too much of an issue except that the capture card uses different source settings than the USB cameras and often breaks two seemingly random cameras upon each boot and I have to keep changing the camera source settings in ZM.

Any ideas how to fix the camera type to the device upon reboot?
Michael
hudibras
Posts: 17
Joined: Wed Dec 17, 2008 2:06 am

Re: /dev video devices keep changing upon reboot

Post by hudibras »

mdods wrote:I have four cameras operating on a SUSE 11.3 system with kernel 2.6.37-4.
3 x USB 2.0
1 x capture card (using a camera on the composite port)

Every time the system is rebooted the video device listing changes. ie the composite camera may change from video0 to video2 for example. The USB cameras also change but are less noticeable.

/dev
crw-rw-rw-+ 1 root video 81, 0 2011-02-09 07:33 video0
crw-rw-rw-+ 1 root video 81, 1 2011-02-09 07:33 video1
crw-rw-rw-+ 1 root video 81, 2 2011-02-09 07:33 video2
crw-rw-rw-+ 1 root video 81, 3 2011-02-09 22:08 video3

This wouldn't be too much of an issue except that the capture card uses different source settings than the USB cameras and often breaks two seemingly random cameras upon each boot and I have to keep changing the camera source settings in ZM.

Any ideas how to fix the camera type to the device upon reboot?
Can you stop the USB to initialize, and init after reboot. They are not same brand logitech f.ex. They have different startup time that differs from reboot to next reboot, that are very small differences.
Prevent OS initialize USB camera, and make a script to init them afterwards.

Max
dly
Posts: 2
Joined: Fri Feb 04, 2011 1:01 am

Post by dly »

I think you want to set up persistent naming. Have a look at the man page for udev and http://reactivated.net/writing_udev_rules.html#builtin.

This is what my /etc/udev/rules.d/10-local.rules looks like:

Code: Select all

# Persistent name for the Logitech USB web camera.
KERNEL=="video[0-9]*",ATTRS{idVendor}=="046d",ATTRS{idProduct}=="08cc",ATTRS{serial}=="27A775AB",SYMLINK+="usbwebcam"

# Persistent names for the DVR card inputs.
KERNEL=="video[0-9]*",ATTRS{vendor}=="0x109e",ATTRS{device}=="0x036e",ATTRS{subsystem_device}=="0x1460",SYMLINK+="camera1"
KERNEL=="video[0-9]*",ATTRS{vendor}=="0x109e",ATTRS{device}=="0x036e",ATTRS{subsystem_device}=="0x1461",SYMLINK+="camera2"
KERNEL=="video[0-9]*",ATTRS{vendor}=="0x109e",ATTRS{device}=="0x036e",ATTRS{subsystem_device}=="0x1462",SYMLINK+="camera3"
KERNEL=="video[0-9]*",ATTRS{vendor}=="0x109e",ATTRS{device}=="0x036e",ATTRS{subsystem_device}=="0x1463",SYMLINK+="camera4"
After booting /dev/usbwebcam will always point to my webcam, and /dev/camera[1-4] will always point to the same input on my DVR card. The /dev/videoX files they point to may be different after each reboot.
Locked