identify pi camera from other usb cameras - Raspberry Pi Forums
i'm using motion record timelapse images, stream live video , create video on fly using 2 usb cameras , pi camera, cameras don't come same /dev/video'n' devices. pi camera video0 , video1.
usb cameras have symlinks in /dev/v4l/by-id include camera's serial number , unique , reproducable, pi camera not appear have such symlink anywhere, cannot reliably pick up.
before start banging head on udev rules wall (always messy experience!) there other way can reliably identify pi camera v4l2 device?
(it seem bit naughty pi camera software hooks v4l2 device doesn't set symlinks in /dev/v4l)
usb cameras have symlinks in /dev/v4l/by-id include camera's serial number , unique , reproducable, pi camera not appear have such symlink anywhere, cannot reliably pick up.
before start banging head on udev rules wall (always messy experience!) there other way can reliably identify pi camera v4l2 device?
(it seem bit naughty pi camera software hooks v4l2 device doesn't set symlinks in /dev/v4l)
you don't whether you're using official driver or uv4l2. can comment official one.
v4l2 framework allocates device first available dev/videon node when enumerated. there mechanism within v4l2 request preferred value, isn't set (it dozen lines of patch in official driver - set last parameter when calling video_register_device). otherwise add delay init scripts delay loading bcm2835_v4l2 module usb device should enumerate first.
pi camera isn't usb device, there no root node link under /dev/v4l/by-id in way usb or pci does. it'll in framework creates symlinks, pass (possibly part of media controller, not mandatory).
if open /dev/videon device, can use vidioc_querycap query capabilities. includes driver name come "bm2835 mmal" official driver.
v4l2 framework allocates device first available dev/videon node when enumerated. there mechanism within v4l2 request preferred value, isn't set (it dozen lines of patch in official driver - set last parameter when calling video_register_device). otherwise add delay init scripts delay loading bcm2835_v4l2 module usb device should enumerate first.
pi camera isn't usb device, there no root node link under /dev/v4l/by-id in way usb or pci does. it'll in framework creates symlinks, pass (possibly part of media controller, not mandatory).
if open /dev/videon device, can use vidioc_querycap query capabilities. includes driver name come "bm2835 mmal" official driver.
raspberrypi
Comments
Post a Comment