UVC Output as a Pipeline Node
See original GitHub issueStart with the why
:
In some cases it may be desirable to feed UVC (USB Video Class, e.g. a webcam) output to have compatibility with existing software stacks/etc. To provide instant integration
sort of compatibility, particularly if working with closed-source tools (or hard to modify tools) which already work with UVC-compatible inputs.
This becomes increasingly powerful when the UVC Output is a node in the pipeline. As instead of the whole video feed being output as a UVC video stream, any video stream in the pipeline can be output. Take for using an object detector to guide digital PTZ (https://github.com/luxonis/depthai/issues/135), and then outputting this pan/tilt/zoomed stream directly out UVC.
This way, the UVC output would appear to a computer as if someone is actually just moving a camera around.
Move to the how
:
An initial way to support this is to keep XLINK as is (i.e. used for control and high-speed data sending back/forth), and use one of the total (3) high speed endpoints to be a UVC endpoint. This would allow 1 UVC output.
A longer-term solution may be to develop XLINK support over the USB control endpoint (working at the message level: host request -> device reply), which would then not consume a high bandwidth pipe (i.e. would not consume 1 of the dedicated endpoints) for control. Internal notes here.
In this case, instantiating 3x UVC outputs may be possible.
To start with though, it would be easiest to support 1x UVC output so likely this will be the approach.
Move to the what
:
Implement a UVC output node in the Gen2 Pipeline Builder (https://github.com/luxonis/depthai/issues/136). This will allow any node which produces video to be output over USB Video Class to a USB host.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:28 (3 by maintainers)
We have this initially working now. Need to see if the code is externally usable now.
This should work on Linux, but may have issues on other OSes: https://github.com/luxonis/depthai-python/blob/gen2_uvc/examples/19_uvc_video.py
python3 -m pip install depthai==0.0.2.1+e70becfe1c1908c6148f842006b9986ebab39cab --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-snapshot-local