如何使用 Flex/ActionScript 3 通过 Socket 传输实时视频? [英] How to transmit live video over a Socket using Flex / ActionScript 3?

查看:18
本文介绍了如何使用 Flex/ActionScript 3 通过 Socket 传输实时视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求类似于这个旧的2009年的问题.我只是重新发布,因为 OP 已经有 2 年的历史了,现在问题已经解决了.

My Requirements are similar to this old question of 2009. I am just re-posting since OP is kind of 2 years old and the question is closed now.

如何使用 Flex/ActionScript 3.0 通过 Socket 传输实时视频流?

我正在开发一个适用于 P2P 架构的应用程序,因此我无法使用 FMS 进行实时媒体流传输.我已经阅读了 NetConnection 和 NetStream 类,但无法开始使用它们,因为所有示例都使用 FMS.我该怎么做?

I am developing an application which works on P2P architecture so I cant use FMS for live media streaming. I have read about NetConnection and NetStream classes but cant start using them since all the examples are using FMS. How I do this ?

其次,我还需要一个合适的库/工具/技术来编码(和解码)视频帧,然后再显示 &传输.为此,我已阅读 X264 编解码器,但将其与 Flex 一起使用似乎太复杂了.还有其他选择吗?

Secondly, I also need a suitable library / tool / technique to encode (& than decode) video frames before displaying & transmitting. For this I have read X264 codec but using this with Flex seems too complicated. Any other alternatives ?

任何教程/博客都会有很大帮助...

Any tutorial / blog will be of great help...

推荐答案

可以直接向远程机器发送数据;然而,那台机器需要监听,除非你使用 Air,否则那台机器需要一个套接字策略文件.显然无法在没有策略文件的情况下将多台机器直接相互连接,迫使您拥有一个中央服务器,并阻止在浏览器中直接实现 p2p 聊天/视频/(w/e)应用程序.

You can send data directly to a remote machine; yet, that machine would need to be listening, and unless you are using Air, that machine would need a socket policy file. Obviously not being able to connect multiple machines directly to each other without a policy file, forces you to have a central server, and prevents straight forward implementations of in browser p2p chat/video/(w/e) applications.

所以你必须有一个中央服务器;但是,您不必为此付费.

So you have to have a central server; however, you don't have to pay for one.

我知道我在某处读到过这个,所以我搜索了谷歌并找到了下面的链接.

I knew I had read about this somewhere, so I searched google and came up with the links below.

http://haxe.org/doc/flash/peer2peer

https://github.com/OpenRTMFP/Cumulus

您只需要一个开发人员密钥,Adobe 在以下位置免费赠送:

All you need is a developer key, that Adobe gives away for free at:

https://www.adobe.com/cfusion/entitlement/index.cfm?e=stratus

综上所述,您需要了解一些 C++,才能充分利用这一点.

With the above being said, you will need to know some c++, in order to take proper advantage of this.

如果您想学习如何做一些基本的事情来帮助您入门,并且您真的只是对为本地网络开发一些东西感兴趣,那么这些文章会告诉您如何将 RTMFP 作为多播组进行:

If you want to learn how to do something basic to get you started, and you are really just interested in developing something for your local network, then these articles tell you how to do RTMFP as a multicast Group:

http://www.flashrealtime.com/videotutorial-remote-device-controller/

http://www.flashrealtime.com/local-flash-peer-to-peer-communication-over-lan-without-cirrus/

您可以利用上述信息做很多事情;然而,我会从小处着手.

There is a ton of stuff that you can do with the information above; yet, I would start small.

这篇关于如何使用 Flex/ActionScript 3 通过 Socket 传输实时视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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