Page 1 of 1

Video Source keeps changeing after boot

Posted: Sun Jul 27, 2014 7:04 pm
by soiski71
Hi,

I have 3 cameras on Kodicom 4400 videocapture card and one USB camera. When rebooting the Ubuntu 14.04 I sometimes get different video sources (Video0-1-2-3) for these cameras. Typically it is the USB camera that keeps changeing to 0 or 2. This ofcourse messes up zoneminder monitor source setup.

I read from ubuntu forums that it is possible to use instead of typical /dev/video0 setup the longer path /dev/v4l/by-path/ setup.

But when trying to input the longer filenames ( pci-0000:00:02.1-usb-0:2:1.0-video-index0 ) it just flashes everything to red in log and all cameras fails.

Has anyone had similiar issue and more importtantly to been able to fix it.

Thanks !

Re: Video Source keeps changeing after boot

Posted: Fri Aug 15, 2014 3:18 pm
by knight-of-ni
This is a classic Linux problem that can occur with any hadrware device that shows up under /dev
Fortunately, udev was created to solve that problem.

You need to create a custom udev rule that identifies your device based on something unique and maps it to the same /dev/videoX that you specify in the rule. On Ubuntu, you put the rules here: /etc/udev/rules.d