如何流视频在Socket类(或的XMLSocket)使用ActionScript?视频、Socket、ActionScript、XMLSocket

2023-09-08 13:51:06 作者:爱她就要操翻她,

如何流视频在Socket类(或的XMLSocket)使用ActionScript?

或\和

如何使用Socket类(或的XMLSocket)在AIR办呢?

推荐答案

你为什么要寻找采用Socket视频流?性能将远远比什么提供的Adobe的内置类此逊色得多。

Why are you looking to stream video using Socket? The performance would be far, far less than what's offered by Adobe's built-in classes for this.

要流音频和视频在Flash中,您需要一个FMS-一样的服务器。 的Red5 是一个开源的服务器,可这(如Maciek说)。然而,服务超过 flash.net.Socket ,然后自己进行解码,将产生可怕的表现。从本质上讲,视频流的性能可接受的方式的唯一方法是使用 flash.net.NetConnection的。这将使用 RTMP协议获取流媒体。

To stream audio and video in Flash, you'll need an FMS-alike server. Red5 is an open-source server that allows this (like Maciek said). However, serving your own live video over flash.net.Socket and then decoding it yourself would yield horrible performance. Essentially, the only way to stream video in performance-acceptable way would be to use flash.net.NetConnection. This uses the RTMP protocol for media streaming.

此外,如果它不活你正在寻找的视频流,需要看供应的视频文件,通过普通的HTTP服务器和的 FLV格式。

Also, if it's not live streaming of video you are looking for, take look at serving those video files over a normal HTTP server and the FLV format.