wpilibsuite / WPILibPi

WPILib Raspberry Pi images designed for FRC (formerly FRCVision)
Other
87 stars 40 forks source link

Streaming multiple of the same camera model/vendor #118

Closed maxwellpettit closed 5 years ago

maxwellpettit commented 5 years ago

We are using multiple Microsoft LifeCam 3000's connected to the Pi and want to make sure that we can identify each camera. Normally, we configure the camera source as "/dev/video0", "/dev/video1", etc.

However, if we plug the cameras in different ports or plug them into the Pi in a different order, the output streams will not be the same. Since they are all the same model of camera, we cannot tell them apart via model/vendor ID.

Is there a way to configure these cameras or assign a camera ID at a firmware level to ensure that we load each camera in the same order? I have not been able to find any information about this.

Is the only solution to this to ensure each camera is plugged in the proper port/order?

PeterJohnson commented 5 years ago

Use the /dev/v4l/by-path alternate device path (this is available in the 2019.2.1 and later versions via the web dashboard, but you can do it manually in 2019.1.1). This device path is based on the physical port the camera is plugged into and so works with multiple cameras from the same vendor.

maxwellpettit commented 5 years ago

This device path is based on the physical port the camera is plugged into

This is what I meant when I asked:

Is the only solution to this to ensure each camera is plugged in the proper port/order?

So in this case, the answer is yes, we have to rely on the port that the camera is plugged into.

Thanks, Max