简体   繁体   English

使用C#在Web服务器上捕获视频流

[英]Capture video stream on the web server with C#

I build the ASP.NET MVC application that should access client's web cam in a browser and send the video stream to my web server and there some screenshots must be taken from that stream at a specific moment. 我构建了ASP.NET MVC应用程序,该应用程序应在浏览器中访问客户端的网络摄像头并将视频流发送到我的Web服务器,并且必须在特定时刻从该流中获取一些屏幕截图。 I reviewed a lot of technologies but I can not figure out which matches. 我检查了很多技术,但无法弄清楚哪些匹配项。

The Flash is not suitable because I do not need a separate Flash media server. Flash不合适,因为我不需要单独的Flash媒体服务器。 The WebRTC seems like establishing peer-to-peer connection between clients omitting web srver (I do not see how to capture WebRTC video stream on a web server). WebRTC似乎就像在省略Web服务器的客户端之间建立对等连接(我看不到如何在Web服务器上捕获WebRTC视频流)。 IIS Media service require some streaming encoders and it is not about working directly with client's web cam. IIS媒体服务需要一些流编码器,而这与直接与客户端的网络摄像头无关。

And for Silverlight I only found examples how to use it as video player and screenshot maker, but not a broadcaster. 对于Silverlight,我仅找到了如何将其用作视频播放器和屏幕截图制作工具的示例,但没有找到广播员的示例。 But I must make screenshots on the server, not in the client. 但是我必须在服务器上而不是在客户端上截屏。

So I lost my way. 所以我迷路了。

Can anybody prompt me the right direction? 有人可以提示我正确的方向吗?

Short answer: You can capture a WebRTC video/audio on the server. 简短的答案:您可以在服务器上捕获WebRTC视频/音频。 Just provide a WebRTC client (running on the server) that communicates with the other WebRTC clients. 只需提供一个与其他WebRTC客户端进行通信的WebRTC客户端(在服务器上运行)即可。 You may want to check the open source C client by Google ( https://code.google.com/p/webrtc/ ). 您可能要检查Google的开源C客户端( https://code.google.com/p/webrtc/ )。 However, this means that you do not need ASP.NET at all. 但是,这意味着您根本不需要ASP.NET。 You can adapt the aforementioned client and copy them to a specific directory and process them with ASP.NET from there. 您可以调整上述客户端并将其复制到特定目录,然后从中使用ASP.NET处理它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM