简体   繁体   English

如何使用asp.net mvc 3和Adobe Flash Media Server录制网络摄像头视频?

[英]how do you record webcam video using asp.net mvc 3 and adobe flash media server?

I want to record a video from webcam in asp.net mvc 3 application and stream it to Adobe Flash Media Server to save the file for later viewing. 我想在asp.net mvc 3应用程序中录制来自网络摄像头的视频,并将其流式传输到Adobe Flash Media Server,以保存文件以供以后查看。 I have googled for about 2 hours and have had no luck. 我已经用谷歌搜索了大约2个小时,没有运气。 I must be blind for not finding an answer. 我必须为找不到答案而盲目。 Can anyone point me in the right direction? 谁能指出我正确的方向? Any links to a decent tutorial or tips? 任何链接到体面的教程或技巧?

Thanks! 谢谢!

You're going to need to write an Actionscript application or a Flex application that attaches the webcam to a NetStream, and then publishes that stream to Flash Media Server (FMS). 您将需要编写将网络摄像头附加到NetStream上的Actionscript应用程序或Flex应用程序,然后将该流发布到Flash Media Server(FMS)。 Then compile this app into SWF and embed the SWF in your asp app's HTML. 然后将此应用编译为SWF,并将SWF嵌入到asp应用的HTML中。

The Actionscript code for doing this with or without the Flex framework is basically the same. 使用或不使用Flex框架执行此操作的Actionscript代码基本相同。 The concepts are: 这些概念是:

  • Get access to the webcam, Flash player automatically displays a security dialog asking the user for permission 要访问网络摄像头,Flash Player会自动显示一个安全对话框,询问用户权限

  • To display the camera output to the user, attach it to a Video object and add the Video to the stage. 要将摄像头输出显示给用户,请将其附加到Video对象,然后将Video添加到舞台。 In a Flex application, the Video object needs to be wrapped in a Flex container (this is only difference). 在Flex应用程序中,视频对象需要包装在Flex容器中(这只是区别)。

  • Create a NetConnection and connect it to the FMS. 创建一个NetConnection并将其连接到FMS。 You attach event listeners to the NetConnection to know when it's connected (so you can proceed), or if it fails. 您可以将事件侦听器附加到NetConnection上,以知道何时连接(以便继续),或者它是否失败。

  • After connecting, create a NetStream, attach the webcam to it, and publish to FMS. 连接后,创建一个NetStream,将网络摄像头连接到它,然后发布到FMS。

Here's an example that someone else was nice enough to write. 这是一个别人写得很好的例子

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

相关问题 如何将 Adobe Flash 媒体服务器集成到 Asp.Net 应用程序中以录制音频? - How to integrate Adobe Flash Media Server into Asp.Net application to record audio? 如何从Flash Media Server验证到asp.Net Web服务 - How to Authenticate to a asp.Net webservice from Flash Media Server 如何使用网络摄像头在ASP.NET网站中录制视频。 我想为此使用DirectShow.NET库 - How can I record a video in my ASP.NET website using a webcam. I want to use DirectShow.NET Library for this 使用ASP.NET MVC处理/接收来自WebRTC的实时视频网络摄像头流或任何基于浏览器的捕获机制到服务器 - Handling / receiving live video webcam stream from WebRTC or any browser based capturing mechanism to the server using ASP.NET MVC 如何使用ASP.NET主题为特定媒体指定样式表? - How do you specify stylesheets for spcific media using ASP.NET Themes? 如何在asp.net mvc 中显示数据库记录? - How do I display a record of database in asp.net mvc? asp.net mvc 全球化。 你怎么做呢? - asp.net mvc Globalization. How do you do it? 如何使用ASP.NET MVC异步/等待视频流? - How to do async / await video streaming with ASP.NET MVC? 使用Json的Asp.net Mvc如何编辑记录 - Asp.net Mvc using Json How to Edit the Record 如何使用viewmodels插入记录:Asp.Net Mvc - How to insert record using viewmodels : Asp.Net Mvc
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM