OAK as a webcam¶
OAK devices can be used as webcams as well. This feature hasn’t been mainlined yet, so you have to checkout to a custom branch to use this feature.
# Skip cloning if you already have depthai-python repo git clone https://github.com/luxonis/depthai-python.git cd depthai-python # Navigate to the custom branch git checkout gen2_uvc python3 examples/install_requirements.py python3 examples/rgb_uvc.py
Now you can open up your favourite meeting app, like Zoom or Slack, and select Luxonis Device: UVC Video Contr in the webcam selection menu.
On some apps, Luxonis Device: UVC doesn’t work¶
We have noticed that on some apps, like Discord or Google Meet, Luxonis Device: UVC won’t work. The current workaround is to use OBS
to proxy the stream and use the virtual camera inside the OBS. I am running Linux so I had to install
sudo apt install v4l2loopback-dkms
for the virtual camera to work (this is also mentioned in install instructions).
This video will show you how to do just that.
POE models as webcams¶
Since UVC stands for
USB Video Class, using UVC pipeline on OAK POE models won’t work. One solution is to stream video to the host,
and capture the
cv2.imshow window inside the OBS:
Inside depthai-python repo, run
python3 examples/ColorCamera/rgb_video.py. This will open a new window where 1080P video stream will be shown.
Inside OBS, under Sources menu, click
+, Add new source
Click on Window Capture (Xcomposite) option. Then select
You can then click on Start Video Camera inside OBS (just like in the video above), to use the video from OAK POE model as a webcam source.
We’re always happy to help with code or other questions you might have.