Page 1 of 1

Using /dev/v4l/by-path

Posted: Mon Aug 22, 2011 11:23 pm
by akirarat
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?

Re: Using /dev/v4l/by-path

Posted: Tue Aug 23, 2011 1:50 am
by Go3Team
Try using udev to assign the card a specific /dev/video* on every boot.