如何模拟网络摄像头设备 [英] How to simulate a webcam device

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

问题描述

我正在做一个项目,我需要从现有框架中合成视频,然后将其完全像网络摄像头设备一样格式化,并使其可用于外部计算机. 换句话说,此USB输出应看起来完全像是由网络摄像头生成的. 有人可以提供有关任何现有库或任何方法的一些提示吗? 通过USB创建网络摄像头"输出的目标系统是UBUNTU.

I am working on a project which I need to synthesize a video from existing frames and then format it exactly like a webcam device and make it available to external computers. In other words, this USB output should look exactly as if it was generated by a webcam. Can someone provide some hints about any existing library or any methodology to do this? The target system to create "webcam" output via USB is UBUNTU.

谢谢

推荐答案

网络摄像头通常是通过库或操作系统访问的,而不是通过低级USB设备访问的.在python中,读取网络摄像头框架的一种方法是 https://github.com/gebart/python-v4l2capture或使用我的跨平台分支(包括Windows): https://github.com/TimSC/libvideolive

Web cams are usually accessed through a library or the operating system rather than as low level USB devices. In python, one option to read webcam frame is https://github.com/gebart/python-v4l2capture or use my cross platform fork (including windows): https://github.com/TimSC/libvideolive

如果要创建其他计算机可以访问的视频流,则需要模拟网络摄像机或IP摄像机.通过创建自定义媒体源,可以在Windows上模拟网络摄像头. https://msdn.microsoft .com/en-us/library/windows/desktop/ms700134%28v = vs.85%29.aspx 在linux上,您需要将数据流式传输到v4l2loopback http://live555.com/

If you want to create a video stream that is accessible to other computers, you either need to emulate a webcam or an IP camera. A webcam can be emulated on windows by creating a custom media source. https://msdn.microsoft.com/en-us/library/windows/desktop/ms700134%28v=vs.85%29.aspx On linux, you need to stream data to v4l2loopback https://github.com/umlaeute/v4l2loopback. To emulate an IP camera, a good starting point is to base it on the tools available at http://live555.com/

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

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