Using /dev/v4l/by-path

Forum for questions and support relating to the 1.24.x releases only.
Locked
akirarat
Posts: 1
Joined: Mon Aug 22, 2011 11:16 pm

Using /dev/v4l/by-path

Post 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?
Go3Team
Posts: 10
Joined: Thu Jun 30, 2011 2:30 pm

Re: Using /dev/v4l/by-path

Post by Go3Team »

Try using udev to assign the card a specific /dev/video* on every boot.
Locked