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

发布于 2024-12-20 12:28:37 字数 511 浏览 4 评论 0原文

我的要求类似于这个2009年的老问题。我只是重新发帖,因为 OP 已经有 2 岁了,问题现在已经结束了。

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

我正在开发一个在 P2P 架构上工作的应用程序,因此我无法使用 FMS 进行实时媒体流。我已阅读有关 NetConnection 和 NetStream 类的内容,但无法开始使用它们,因为所有示例都使用 FMS。我该怎么做?

其次,我还需要一个合适的库/工具/技术来在显示和显示视频帧之前对视频帧进行编码(而不是解码)。传输。为此,我阅读了 X264 编解码器,但将其与 Flex 一起使用似乎太复杂了。还有其他选择吗?

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

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.

How can I transmit live video Stream over a Socket using Flex / ActionScript 3.0 ?

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 ?

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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瞎闹 2024-12-27 12:28:37

可以直接发送数据到远程机器;然而,该机器需要监听,并且除非您使用 Air,否则该机器需要套接字策略文件。显然,如果没有策略文件,就无法将多台计算机直接相互连接,这会迫使您拥有中央服务器,并阻止直接实现浏览器中的 p2p 聊天/视频/(w/e)应用程序。

所以你必须有一个中央服务器;但是,您无需付费。

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

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

https://github.com/OpenRTMFP/Cumulus

您所需要的只是一个开发者密钥,Adobe 免费提供该密钥:

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

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

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

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

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

[编辑:最后两个链接的内容,因为该网站删除了这些页面,目前可以使用 waybackmachine 找到这2011 年初左右的快照]

您可以利用上面的信息做很多事情;然而,我会从小事做起。

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

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

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

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

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/

[EDIT: the content for the last two links, as the site removed those pages, can currently be found using the waybackmachine and the snapshots around early 2011]

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

绅刃 2024-12-27 12:28:37

无论如何,您都需要一个媒体服务器(FMS 或 SmartFox 或其他),并且双方都连接到该服务器。它还将处理编码。我认为如果中间没有媒体服务器,你就无法做到这一点......

You will need anyway a media server, either FMS or SmartFox or else and have both parties connecting to the server. It will also be dealing with the encoding. I don't think you can do that without a media server in between...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文