How to write on a virtual webcam in Linux?

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


Well, actually this is possible. A quick and dirty way to do this is to use WebcamStudio. That will create a new video device (eg, /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 normal video device by other programs. See the readme at the bottom of this page: https://github.com/umlaeute/v4l2loopback and the wiki: https://github.com/umlaeute/v4l2loopback/wiki for more information.

Hope that help.

链接地址: http://www.djcxy.com/p/81088.html

上一篇: 使用libusb:libusb在笔式驱动器上读/写

下一篇: 如何在Linux上的虚拟摄像头上写字?