Video Source keeps changeing after boot

Forum for questions and support relating to the 1.26.x releases only.
Locked
soiski71
Posts: 7
Joined: Thu May 01, 2014 3:27 pm

Video Source keeps changeing after boot

Post 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 !
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Video Source keeps changeing after boot

Post 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
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
Locked