question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UVC Output as a Pipeline Node

See original GitHub issue

Start 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:open
  • Created 3 years ago
  • Reactions:5
  • Comments:28 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
Luxonis-Brandoncommented, Mar 4, 2021

We have this initially working now. Need to see if the code is externally usable now.

5reactions
Luxonis-Brandoncommented, Mar 5, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

documentation on UVC?
Hey there, Does anyone know where to find documentation on the UVC node? ... AI pipeline and output to that node, but I...
Read more >
USB Video Class Gadget Library | UVC Driver Linux
Simplify the development of UVC based gadget devices with the USB Video ... GStreamer pipeline speeding up the development time for a UVC...
Read more >
RKMedia — Firefly Wiki
Device camera input and use RKNN model to process image data. The image data is transmitted to the host computer via UVC. The...
Read more >
Calculate Level Of Detail Texture 2D node | Shader Graph
In its Unclamped mode, the node outputs the ideal 8×8 mip level, even though it doesn't exist ... This node is supported on...
Read more >
Improving your CI pipeline for Node.js
I'll use Azure DevOps Pipelines and Node.js in this example, ... so if it fails I can check the pipeline execution results and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found