使用 Flex 进行网络摄像头录制是否严格需要媒体服务器(FMS、Red5、Wowza 等)?
我正在尝试实现一个 Flex 应用程序,该应用程序能够从网络摄像头录制视频,然后将其上传到服务器。
我只找到了需要运行 Red5、Flash Media Server 和 Wowza 等媒体服务器以及到服务器的开放 rtmp 流的教程和示例。
但是,我想知道是否可以在本地录制视频,然后通过简单的 HTTP 请求将其提交到服务器。
有没有教程展示如何做到这一点? 我在 Flex 开发方面确实是个新手,并且希望有一个逐步的过程:P
I'm trying to implement a flex app that will be able to record a video from a webcam and then upload it to a server.
I've only found tutorials and examples that require a media server running such as Red5, Flash Media Server and Wowza and an open rtmp stream to the server.
However, I want to know if it's possible to record a video locally and then submit it to the server with a simple HTTP request.
Is there a tutorial somewhere that shows how to do this? I'm really new in flex development and would love to have a step by step procedure :P
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有机会:)
haxevideo 是一种 FMS/Red5 类型的服务器,开发于 Haxe。 与这些的不同之处在于它非常轻量级并且不需要任何类型的安装。
因此,您可以将其与您的应用程序一起重新分发,这样您就可以在本地将音频和视频录制到 FLV 文件中。
不确定您还记得 Screenweaver,但最新版本是使用 Haxe 开发的,称为 SWHX。 在 SWHX 之上,您确实构建了一个名为 HippoHX 的包装器,HippoHX 会为您完成所有设置。 如果您下载它,其中有一个示例可以完全满足您的需要(记录到本地文件)。
录制完文件后,剩下的唯一部分就是上传到服务器,但这没什么大不了的。
尝试一下,如果您发现任何问题,请给我发送电子邮件或加入(相当)邮件列表以寻求帮助。
有什么事情请告诉我,
干杯!
胡安
There's a chance : )
haxevideo is a FMS/Red5 sort of server developed in Haxe. The difference with those is that is very lightweight and it doesn't need any kind of installation.
So what you can do is redistribute it alongside your app so you can indeed record audio and video locally to an FLV file.
Not sure you remember Screenweaver, but the latest version was developed using Haxe and it's called SWHX. On top of SWHX yours truly has built a wrapper called HippoHX and HippoHX does all the setup for you. If you download it, there's a sample that does exactly what you need (record to a local file).
Once you've recorded the file the only bit left would be uploading to the server, but that's no big deal.
Give it a go and if you find any problems fire me an email or join the (rather quite) mailing list for help.
Anything let me know,
Cheers!
Juan
你对这个运气不太好。 您将需要某种流媒体服务器。 Flex 不具备将视频录制到用户本地驱动器或任何与此相关的驱动器的功能。
Your out of luck with this one. Your going to need a streaming server of some sort. Flex doesn't have the capabilities to record video to the users local drive or any drive for that matter.
要将 FLV 编码为 ByteArray,请首先实例化 ByteArrayFlvEncoder。 其余部分与上一个版本类似,但现在您可以在更新元数据中的持续时间属性后调用 updateDurationMetadata() 。 最后,调用kill()来准备对象进行垃圾回收:
要将
FLV 直接编码到本地文件(在 AIR 中),请使用 File 引用实例化 FileStreamFlvEncoder,然后打开公开的 FileStream,然后在完成后将其关闭:
有关更多详细信息,请使用以下参考链接:
http://www.zeropointnine.com/博客/更新的 flv-encoder-alchem/
To encode an FLV to a ByteArray, start by instantiating ByteArrayFlvEncoder. The rest is similar to the last version, but you can now call updateDurationMetadata() when you’re done to update the duration property in the metadata. Finally, call kill() to prepare the object for garbage collection: ?
And
To encode an FLV directly to a local file (in AIR), instantiate FileStreamFlvEncoder with a File reference, and open up the exposed FileStream, and then close it when you’re all done: ?
For More Detail Use Below Reference Link:
http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/