I want to capture a video from a real webcam, apply filters with openCv and write the filtered video on a virtual webcam, to stream it on web.
I don't have problem with the first 2 points, but I don't know how I can write on a virtual webcam.
It's possible?
How can I do it?
I use openCv with C++ on Debian. Thanks
Open your terminal ( Ctrl + Alt + T ). Type cheese . if cheese is already installed then it will prompt cheese with webcam on. Now you can use your webcam.
In this video we're setting up a virtual camera in OBS on Linux. You can use this to send your OBS output to applications like Skype, Zoom, Discord, Teams, and Jitsi.
Well, actually this is possible. A quick and dirty way to do this is to use WebcamStudio. That will create a new video device (e.g., /device/video2) that other programs see as a normal video device and can take its input from desktop, so you just set it up to capture a part of the screen that OpenCV's output is shown there.
A better but more technical way is to use the V4L2 loop back module. This way you can simply pipe the output of OpenCV to the module which is seen as a regular video device by the other programs. See the readme at the bottom of this page: https://github.com/umlaeute/v4l2loopback and the wiki page: https://github.com/umlaeute/v4l2loopback/wiki for more information.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With