如何写在Linux中的虚拟网络摄像头? [英] How to write on a virtual webcam in Linux?

查看:662
本文介绍了如何写在Linux中的虚拟网络摄像头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要捕捉真正的网络摄像头的视频,是 OpenCV的应用滤镜和写入过滤视频上的虚拟摄像头,流于Web。

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.

我没有问题与第一个2分,但我不知道我怎么可以在一个虚拟的网络摄像头写的。

I don't have problem with the first 2 points, but I don't know how I can write on a virtual webcam.

这是可能的吗?

我该怎么办呢?

我使用 OpenCV的 C ++ 的Debian
谢谢

I use openCv with C++ on Debian. Thanks

推荐答案

好吧,其实这是可能的。一个快速和肮脏的方式做到这一点是使用 WebcamStudio
这将创建一个新的视频设备(例如,/设备/视频2)其他程序看作为一个正常的视频设备,并可以从桌面上的输入,所以你只要将它设置为捕捉屏幕的一部分的OpenCV的输出显示那里。

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.

有一个更好更技术性的方法是使用 V4L2环回模块。这样,你可以简单地管道的OpenCV的输出这被视为是由其他程序的正常视频设备模块。请参阅自述在这个页面的底部:
https://github.com/umlaeute/v4l2loopback
和维基:
<一href=\"https://github.com/umlaeute/v4l2loopback/wiki\">https://github.com/umlaeute/v4l2loopback/wiki
了解更多信息。

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.

希望帮助。

这篇关于如何写在Linux中的虚拟网络摄像头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆