Registering a network video stream as a virtual camera

我们两清 提交于 2020-08-26 11:37:06

问题


So I've tried to tackle this problem for the last couple of weeks but come to a bit of a standstill. I'm trying to registering an RTSP stream from an IP address as a virtual webcam for use in another application (could be skype or similar). What I need is for my computer to add a virtual webcam to its device list. This should preferably be done through a C# script as devices could be added dynamically through a .NET program. I have found similar questions on StackOverflow, but many of these are outdated, use Linux, or receives another stream format/protocol.

My approach so far has been using DirectShow filters and so far that has worked to a degree. Using Graphedit I can see my incoming stream by using an RTSP source filter. However, there are some problems:

  • The source filter was a trial, the full version is paid and pretty expensive
  • I have no experience with DirectShow filter programming
  • I only showed the stream through GraphEdit, there was no virtual driver registered so e.g Skype couldn't use the stream

So I guess my question boils down to:

  • Is my approach with DirectShow the only way to acheive what I'd like?
  • Is a filter the correct approach to use if Windows should list the stream as a webcam device?
  • Is vcam still the best example to look at to implement something like this?
  • Does any one know of similar, open source programs that acheive what I describe?

Anyway, I appreciate any help I can get! Thanks.


回答1:


The diagram below explains the applicability of virtual cameras:

You are trying to somehow mount a lower green or blue box so that it reads data from RTSP.

Note that more and more applications like new Skype are Media Foundation based (top right box on the diagram) and your filter based source is less and less applicable.

Creating a virtual camera which is recognized by various software assumes you are supplying a driver (red box). Even though such packages exist, I am not aware of any open source or even free which let you quickly start on this route.

DirectShow filter based sources (and you are yet to implement RTSP client there) will only be see by DirectShow based applications of the same bitness.



来源:https://stackoverflow.com/questions/55096781/registering-a-network-video-stream-as-a-virtual-camera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!