|
Flash Media Server Resources |
Core server architectureClient-server architectureAdobe Flash Media Server applications have a client-server architecture. The client code is written in ActionScript (1, 2, or 3) and runs in Adobe Flash Player 6+, Adobe AIR 1+, or Adobe Flash Lite 3+. The server code is written in Server-Side ActionScript, which is like ActionScript 1.0. The server and the client communicate over a persistent connection using Real-Time Messaging Protocol (RTMP). RTMP is a reliable TCP/IP protocol for streaming and data services. In a typical scenario, a web server delivers the client over HTTP. The client creates a socket connection to Flash Media Server over RTMP. The connection allows data to stream between client and server in real time. Flash Media Server installs with Apache web server by default. You can serve HTTP content from this web server. Alternatively, you can choose to exclude Apache from the Flash Media Server installation and serve SWF and HTML content from any external web server. View full size graphic ![]() Flash Media Server applications consist of client and server
components that work together.
View full size graphic ![]()
Real-time media serverFlash Media Streaming Server provides two streaming services: live and vod (video on demand). Streaming services are prebuilt server-side applications. Each streaming service offers prebuilt sample clients as well as a client SDK that developers can use to write their own clients. Real-time collaboration application serverFlash Media Interactive Server and Flash Media Development Server include the same streaming services as Flash Media Streaming Server. In addition, they provide an SDK that lets developers write both the client-side and the server-side components of media applications to create interactive, two-way applications. These server editions also offer a plug‑in SDK. This SDK lets developers write C++ plug‑ins to extend the core functionality of the server. Built-in Apache HTTP ServerAll versions of Flash Media Server 3.5 include of Apache 2.2 HTTP Server. If you install and enable Apache, you can deliver client SWF files, container HTML files, and all media assets from the same server. Content delivered by HTTP is progressively downloaded and cached by the client. (Content streamed through RTMP is not cached.) By default, Flash Media Server 3.5 proxies HTTP requests from port 80 to port 8134, as shown in the following diagram: ![]()
You can configure proxying in the fms.ini file. For more information, see “Configuring the web server” in Adobe Flash Media Server Configuration and Administration Guide. Hosting multiple applicationsFlash Media Interactive Server and Flash Media Development Server can host an unlimited number of applications. Flash Media Streaming Server can host an unlimited number of instances of the live and vod services. Note: Flash Media Streaming Server is restricted to
running services provided by Adobe.
For example, Flash Media Interactive Server could host a web conferencing application, a video blogging application, a video chat application, and a multiplayer game. The server can also host the live and vod services. You can create multiple instances of each of these applications. Instances allow groups of people access to the same application without having the groups interact with each other. For example, you could create a video chat application with rooms for different topics. To create an application, create a folder on the server with the name of the application. To connect to the server, write code in the client that calls the NetConnection.connect() method and passes it the name of the application. The server has a root applications folder located at RootInstall/applications, by default. To create an application, create a subfolder in the root applications folder. For example, RootInstall/applications/mySampleApp creates an application called “mySampleApp”. To connect to mySampleApp, call myNetConnection.connect("rtmp://serverName/mySampleApp") from the client. To create instances of an application, create subfolders within the folder of the application. For example, RootInstall/applications/mySampleApp/instance1 creates an instance of the mySampleApp application. To connect to this instance, call myNetConnection.connect("rtmp://serverName.mySampleApp/instance1") from the client. For more information, see “Connecting to the server” in Adobe Flash Media Server Developer Guide. The server administrator can change the location of the root applications folder. The server administrator can also divide the server into multiple adaptors and virtual hosts, and each virtual host can have its own applications folder. For more information, see Configuring the server. RTMP (Real-Time Messaging Protocol)All server editions communicate with Flash Player, AIR, and Flash Lite over Real-Time Messaging Protocol. RTMP is optimized to deliver high-impact streams in real time. An RTMP connection can multiplex any number of streams. Each stream contains synchronized audio, video, and data channels. Remote method invocation and shared object messages are carried in a data-only stream. There are five types of RTMP connections supported by Flash Media Server 3:
HTTP (Hypertext Transfer Protocol)Flash Media Server 3.5 includes Apache HTTP Server. If you install and enable Apache, you can deliver the client SWF file, container HTML page, and additional assets over HTTP. Additionally, you can write client-side ActionScript that causes Apache to serve media assets over HTTP progressive download if RTMP streaming fails. For example, if a client attempts to stream a video over RTMP and fails, the server attempts to tunnel RTMP over HTTP. If that attempt fails, the server delivers the video over HTTP. Streaming mediaMedia (which can contain audio, video, and data) is sent between a client and Flash Media Server in real time and displayed as it arrives. This type of data transmission is called streaming. The media streamed between a client and Flash Media Server is called a stream. Streams use a publish-and-subscribe model; subscribe means play. Either a client or a server can publish a stream; only a client can play a stream. For example, a producer could use Adobe Flash Media Live Encoder to capture and encode live audio and video from a keynote speech and publish it to the server. Users could view the speech in a Flash Player, AIR, or Flash Lite client that subscribes to the stream. In another scenario, a user on a social media website could publish a live stream in a video chat application; in this case, Flash Player would capture the video from the user’s webcam. Other users on the social media site could view the stream live, or, if the developer added this functionality, play the recorded stream at a later time. Note: Flash
Media Interactive Server and Flash Media Development Server can record
live streams for playback at a later time.
A server can publish a stream to clients or to other servers. For example, you might want to pull XML data into a server-side script to create a playlist and publish it as a stream to clients. A server would publish a stream to another server to scale live broadcasting applications to support more clients. Supported codecsFlash Media Server doesn’t encode or decode audio and video information. Flash Media Server streams media that has already been encoded. To encode media that has already been captured (in other words, media that is not live), use any codec that supports the version of Flash Player or AIR that you want to target. To capture, encode, and stream live video, you can either use Flash Media Live Encoder or use ActionScript to build your own Flash Player or AIR client. Flash Media Live Encoder 2.5 and later encodes video in the On2 VP6 codec or the H.264 codec. Flash Player and AIR encode live video with the Sorenson Spark codec and encode live audio with a proprietary Nellymoser codec. The following table lists the supported codecs and their earliest required SWF file format and Flash Player versions:
Note: AIR is a cross-operating system runtime that
contains Flash Player 9 Update 3 or later. Flash Player and AIR
support an alpha channel in the On2 VP6 codec only.
Flash Player Update 3 and later supports playback of the following subsets of the MPEG-4 file format standards:
Supported file formatsAll editions of Flash Media Server stream the following file formats:
Note: H.264 playback in Flash Player supports most profiles including
Base, Main, and HiP. The F4V format is a subset of MPEG-4 ISO 14496-10
and AAC+ (ISO 14496-3).
Supported metadata formatsYou can now deliver Adobe Extensible Metatdata Platform (XMP) metadata embedded video streaming through Flash Media Server to Flash Player. XMP is a labeling technology that allows you to embed data about a file into the file itself. XMP metadata is a system that communicates critical media information from the point where the media is created to the point where media is viewed. With XMP, applications and publishing systems can capture, share, and leverage metadata. In Flash Media Server, all the metadata embedded within a media file is accurately delivered. In addition, speech-to-text metadata embedded within files and encoded from Adobe Media Encoder CS4 can be delivered. For detailed information about XMP, see www.adobe.com/go/learn_fms_xmp_en. Data modelFlash Media Server applications use a simple, yet powerful, distributed data model based on shared objects. Both client-side ActionScript and Server-Side ActionScript have a SharedObject class that lets developers share data between clients connected to a server. There are two types of shared objects: local and remote. Local shared objects are stored on the client computer and remote shared objects are stored on the server. Both local and remote shared objects can be either temporary or persistent. Local shared objects are like cookies: they save data to a user’s computer for offline access, or for saving preferences. Local shared objects are a feature of Flash Player and do not require Flash Media Server. Remote shared objects are managed and stored by the server. Developers can use remote shared objects for messaging, data synchronization, and storing data. Clients connect to a remote shared object and receive updates whenever a change is made to that shared object. Messages can be sent to all clients connected to a remote shared object. Note: Remote shared objects are not supported by Flash
Media Streaming Server.
For more information, see Adobe Flash Media Server Developer Guide. Invoking remote methodsFlash Media Interactive Server and Flash Media Development Server support two-way, asynchronous, remote method invocation. Clients can invoke methods defined on the server, and the server can invoke methods on clients connected to the server. In client-side script, call the NetConnection.call() method to invoke a method defined on a server-side Client object. In a server-side script, call the Client.call() method to invoke a method defined on the client-side NetConnection object. You can also call NetConnection.call() in a server-side script to invoke a method on a remote server. For more information, see Adobe ActionScript 2.0 Language Reference for Adobe Flash Media Server and Adobe ActionScript 3.0 Language and Components Reference. Connecting to external sourcesIn addition to the communication models that streams and shared objects provide, Flash Media Interactive Server and Flash Media Development Server can interact with external data sources, such as web services and relational databases, or with other Flash Media Server applications. For example, Server-Side ActionScript can be written to connect to a web service (use the WebService class) or to a ColdFusion® application to retrieve a list of names and phone numbers. The results of the query can then be placed in a shared object. For more information, see Adobe Flash Media Server Developer Guide and Adobe ActionScript 2.0 Language Reference for Adobe Flash Media Server. Note: Flash Player, AIR, and Flash Lite clients can
use any supported client-side ActionScript API to interact with
external sources as well; Flash Media Server doesn’t limit this
functionality. For more information, see Flash Player, AIR, and
Flash Lite documentation.
|