I've been using the default /dev/video[0-n] source path for a while but the path to device mapping will switch randomly every time the server is reboot. A solution is to use the /dev/v4l/by-path source. This path disambiguates the device you're referring to by encoding the pci port information in the filename. I figured it should work because /dev/v4l/by-path is just a symlink to /dev/video[0-n]. For example:
/usr/bin$ ls -al /dev/v4l/by-path/
lrwxrwxrwx 1 root video 12 2011-07-17 10:29 pci-0000:00:1d.7-usb-0:4:1.0-video-index0 -> ../../video0
lrwxrwxrwx 1 root video 12 2011-07-17 10:29 pci-0000:04:08.0-video-index0 -> ../../video1
But if I stick it into zm, it will not work. The links show up red, and on the console, it would give this error:
Bogus argument '/dev/v4l/by-path/pci-0000:04:09.0-video-index0' found failure
Any ideas?
Using /dev/v4l/by-path
Re: Using /dev/v4l/by-path
Try using udev to assign the card a specific /dev/video* on every boot.