Technical White Paper Adobe Flash Media Server 3.5 ® ® The next generation of Adobe’s award-winning software for streaming video and real-time communication Table of contents 1 Introduction 2 What’s new in Flash Media Server 3.5? 3 The Adobe Flash Media Server 3.5 family 5 Flash Media Server quick comparison 6 Flash Media Server system requirements 7 Flash Media Server upgrades 8 Flash Media Server support for different versions of Adobe Flash Player 9 How Flash Media Server 3.
Interactivity • Integrated video, audio, and data streaming for a complete social media toolset • New DVR functionality that supports added playback features such as chapter navigation, time skip, interactivity, and other custom functionality • Customizable server (using the server-side ActionScript® language and and plug-in architecture) Security • More secure content delivery with encryption and access control features and no client cache • New support for encrypted H.
• Integrated HTTP server to allow an all-in-one hosting solution for your interactive and streaming applications, defaulting to progressive delivery when needed • Delivery of encrypted media, including H.264 support to Adobe AIR and Adobe Media Player • New ActionScript classes for Dynamic Streaming • Improved C++ plug-in samples • Support for more platforms, including Windows 2008 and Linux Red Hat® 5.
Adobe Flash Media Streaming Server 3.5 This server edition is ideal for one-way secure video streaming. Flash Media Streaming Server 3.5 is an economical solution that allows you to quickly start streaming high-quality, more secure video. It provides all the features you need to stream video and audio, and works in unison with the Adobe Flash Media Live Encoder to stream live video.
• Multiway communication • Social media solutions • Distributed core processing • Multipoint publishing • Live-stream metadata injection Flash Media Interactive Server also lets you include value-added multiway solutions to help you socialize your streaming media with advanced real-time communication and collaboration services.
Features Bandwidth limitations Flash Media Interactive Server 3.5 Flash Media Streaming Server 3.5 Flash Media Development Server 3.
Flash Media Server upgrades Upgrading from Adobe Flash Media Server 3 The guidelines for upgrading from Flash Media Server 3 vary depending on your current license and when it was purchased: • I f you own Flash Media Interactive Server 3, you can purchase an upgrade to Flash Media Interactive Server 3.5. • I f you own Flash Media Streaming Server 3, you can purchase an upgrade to Flash Media Streaming Server 3.5 or Flash Media Interactive Server 3.5. • Education licenses are not upgradable.
Flash Media Server support for different versions of Adobe Flash Player Features Sorenson Video codec (H.263): play and capture On2 VP6 video codec: play only Ve rsion 6 Ve rsion 7 Ve rsion 8 Ve rsion 9 Version 9,0,115,0 Ve rsion 10 • • • • • • • • • • • • • • • • • • • • • • • • • • H.264 and High Efficiency AAC: play only RTMPE/RTMPTE SWF verification GPU hardware acceleration Multicore support Smart buffering Dynamic Streaming XMP metadata RTMFP Speex audio codec Adobe AIR (version 1.
How Flash Media Server 3.5 works Flash Media Server solutions have both a server-side and a client-side architecture. The client experience is deployed as a SWF or AIR file, created in either Flash or Flex. Clients run within a web browser (Flash Player), mobile device (Flash Lite 3), or as a desktop application (Adobe AIR).
The following figure illustrates the basic architecture of a Flash Media Server connection. Web server Sends SWF 1 HTTP Client Plays SWF using Flash Player 2 RTMP Flash Media Server Sends/Receives data stream 3 Flash Media Server client/server architecture Supported file types Flash Media Server 3.5 is completely backward-compatible with Flash Player 6 or later, Adobe AIR, and Flash Lite 3 clients. Additional formats and features are supported with newer versions of Flash Player.
For more information on H.264/AAC support, see the Flash Player 9 Update FAQ at http://labs.adobe.com/wiki/index.php/Flash_Player:9:Update:H.264. Extending Flash Media Server There are a number of APIs available for developing custom applications and monitoring Flash Media Server.
Progressive download video delivery Since Flash MX2004, progressive download has been supported for video delivery. This method allows developers to load external video files into a Flash or Flex interface and play them back during runtime. This can be accomplished using ActionScript commands with the Video object or playback components, or by setting parameters for the playback components in the authoring environment, as shown in the following figure.
Streaming delivery The ability to stream video and audio was first available with Flash MX, Flash Player 6, and Flash Communication Server MX. When you use streaming delivery, the video files are kept external to the other content, just like progressive downloads. Developers can use ActionScript commands (and parameter settings with media components) to load external video files into a SWF file and play them back at runtime.
• Tracking, reporting, and logging capabilities—Because progressive download is a simple download of a file, you can’t easily log specific relevant statistics such as how long the video was viewed, if the user navigated forward, backward, or paused the video, how many times the viewer played the video, if the viewer left the web page before the video completed playing, and so on. Streaming enables you to easily capture this important data.
If your website or blog relies heavily on video, audio, or real-time data sharing, you can give your user the best experience by using the features in Flash Media Server. Delivery comparison The following table provides a comparison of the three video delivery techniques in Flash Media Server. Embedded video Progressive download Streaming delivery Encoding Video and audio is encoded on import into Flash using a Sorenson Spark or VP6-E codec.
Embedded video Progressive download Performance Audio and video sync is limited. Sync between audio and video suffer after approximately 120 seconds of video. Total file duration is limited to available RAM on the playback system. Improved performance over embedded SWF video, with higher resolution and more reliable audio synchronization. Provides best image quality, which is limited only by the amount of available hard drive space on the playback system.
Factors affecting performance This section explains how performance for Flash Media Server 3.5 is affected by different conditions. Measuring performance increases is done by comparing the number of concurrent streams for a given CPU utilization. Knowing how many streams a server can support helps you determine how many servers you need to deploy.
300Kbps recorded video limited to 1Gbps 700Kbps recorded video limited to 1Gbps The following graphs show the number of concurrent streams given different percent CPU utilization, protocol, and bit rate. Notice that with more percent CPU utilization, you can deliver more streams. The graphs were limited to 1Gbps and never reached 100% CPU. Higher data rates resulted in faster saturation, while lower data rates used more CPU to deliver similar connections.
Comparing with Flash Media Server 2 Flash Media Server 3.5 nearly doubles the total number of active streams from Flash Media Server 2. Increases can be found in both live and prerecorded video applications and allow for significantly more connections at lower bit rates than Flash Media Server 2. Total concurrent video stream capacity between Flash Media Server version 2 and version 3.5 All tests were sampled using RTMP. Values for live streaming were sampled at 60% CPU.
Enhanced process scopes Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Flash Player 6 or later. Flash Media Server 3.5 offers flexibility in configuring server process scopes. In Flash Media Server 2, a server administrator had three choices for process scope management: run a process for each virtual host, each application, or each instance. This could easily require a large number of processes. This new feature limits the number of processes to a predetermined number.
Built-in bandwidth detection Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Flash Player 6 or later. Bandwidth detection is built into Flash Media Server and is enabled by default. The updated approach to bandwidth detection, called native bandwidth detection, provides better performance and scalability than scripted bandwidth detection.
Distributed cores Feature in Flash Media Interactive Server; requires Flash Player 6 or later. To further increase the capacity and reliability of your server, you can distribute connections across multiple processes for a specific scope. For example, if your scope was set to “adaptor,” you could have connections spread across any number of core processes for each virtual host. Like process scopes, the distributed core feature lets you increase the capacity of your server.
A revised server-side and client-side API allows you to manage server redirection data. Note that you need to use the updated FLVPlayback component to take advantage of this feature. For more information, refer to the Flash Media Server 3.5 documentation, Plug-in Developer Guide. Server-side plug-in architecture Feature in Flash Media Interactive Server; requires Flash Player 6 or later. Adobe Flash Media Interactive Server 3.
Access plug-in The Access plug-in gives developers another security tool. It provides an additional layer between client and server, intercepting connection requests and examining both the client and the server to determine how to handle the request. With the Access plug-in, you can perform tasks such as: • Query a database of login data to authorize the connection. If accepted, you could update the database with information about the client and keep a record of the connection.
Each profile is further organized into three levels, as shown in the following table. Level Codec Target resolution/data rate LT level 1 VP6 Mobile GSM LT level 2 VP6 Mobile 3G LT level 3 VP6 Mobile 3G-high SD level 1 On2 VP6 and H.264 160x112 SD level 2 On2 VP6 and H.264 320x240 SD level 3 On2 VP6 and H.264 640x480 HD level 1 On2 VP6 and H.264 640x480 HD level 2 On2 VP6 and H.264 1,280x720 HD level 3 On2 VP6 and H.264 1,920x1,080 (Source: www.adobe.
• High Efficiency AAC v2 (also known as HE-AAC+, eAAC, and aacPlus v2)—A superset of the AAC core codec that combines spectral band replication (SBR) and parametric stereo (PS) techniques to enhance coding , especially for low-bit-rate stereo signals. HE-AAC v2 supports up to 48 audio channels and enables 5.1 and 7.1 surround sound. For more information about HE-AAC implementation, visit www.adobe.com/products/hdvideo/ supported_technologies/heaacv2.html.
• Video with long duration • Video with large file size • HD video • Video with larger dimensions, such as full screen video •C ontent distributed to users who are more susceptible to bandwidth issues, such as home users rather than corporate users Smart buffering (player fix) Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Flash Player 9,0,115,0 or later.
Multipoint publishing architecture Flash Media Streaming Server 1 (FVSS) Los Angeles Client Client Publishing Point Philadelphia Client Flash Media Streaming Server New York City Client Client Flash Media Streaming Server 2 (FVSS) London Client Client Client Client Client Stream data access Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Flash Player 9,0,115,0 or later.
• Profile identification—Resource Description Framework (RDF) URI reference for the device • Network/type—For example, Code Division Multiple Access (CDMA), 3G, and so on A user agent string might look something like this: FlashLite/3.0.1 Device/RAZRV3x Profile/razrv3x Network/2.5G You can find device information in the RDF reference. A sample URL for the Motorola Razor is http://motorola.handango.com/phoneconfig/razrv3x/Profile/razrv3x.rdf.
AMF3 support Feature in Flash Media Interactive Server; requires Flash Player 8 or later. Flash Media Server supports the AMF3 format for sending data between the server and connected clients. Flash Media Server can now serialize and deserialize all basic datatypes, including Number, Boolean, String, Null, Undefined, Array, Date, XML, Object, and ByteArray. Note: ByteArray data cannot be created or inspected using server-side scripting, but can be safely exchanged between clients.
Deploying Flash Media Server 3.5 Installing Flash Media Server 3.5 is a simple process, whether deploying to Linux or Windows platforms. Your first step is to design your deployment structure. Flash Media Server can consist of individual installations, a single publishing point connected with a CDN, or a more complex Edge/ Origin architecture, if required. It is recommended that you consult the Adobe Flash Media Server Technical Overview to help you assess your needs and design your specific deployment.
You can also test your installation by running the vod sample application located in samples/ applications/vod/vodtest.html. You can select a video (FLV or H.264) to play. The Adobe Flash Media Server Installation Guide also provides a list of installed files and their locations. If you are having trouble getting Flash Media Server to run, you may want to consult this list to be sure your installation was complete.
Configuring adaptors and virtual hosts Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Flash Player 6 or later. The server is divided into hierarchical levels: server, adaptor, virtual host, and application. The server is at the top level and contains one or more adaptors. Each adaptor contains one or more virtual hosts, and in turn, each adaptor contains one or more applications or services.
Each adaptor has its own directory inside the RootInstall/conf directory. The name of the directory is the name of the adaptor. Each adaptor directory must contain an Adaptor.xml file. For example, the default adaptor included with the server at installation is named _ defaultRoot _ , and its directory is conf/ _ defaultRoot _ . To change an adaptor’s settings, edit the elements in its Adaptor.xml file.
Also located at the root level of the configuration directory, the Logger.xml file controls settings for Flash Media Server log files. You can edit this file to specify the data that is logged, where the log files are saved, and how often they are rotated. The default location for the log files is in the logs directory in your server installation directory (RootInstall/logs). The Logging section in Server.xml enables or disables the log files; Logger.xml contains the actual log file settings.
You can configure Flash Media Server to spawn FMSCore processes by configuring the scope node in the global Application.xml file. Valid scopes include adaptor, vhost, app, inst. Depending on the scope you choose, you can configure each core process separately. For example, if you configure the system to scope adaptors to different core processes, each setting in the specific adaptor.xml file and all subsequent XML files are used to configure that core process.
vhost app Process scope “vhost.” Useful for applying unique settings for users in different subdomains. Process scope “app.” Each application running can be run within its own process. Useful if you have lots of memory and heavy connection requests from different applications. inst Process scope “inst.” Depends on your customer provision. For a CDN customer (VOD profiles), selecting a scope depends upon how you provision your customer accounts.
Distributed process scopes There are three processes, each able to accept connections. Users connected to the same application may not be able to communicate or share RAM because they are connected to a different process. Useful for stateless deployments. Like process scopes, the distributed core feature lets you increase the capacity of your server. Distributed cores let you engage more RAM for the cache and more threading for the process-intensive connection routine.
The following example shows process distribution with a single virtual host. The figure shows how the configuration is implemented over a 5-hour time frame given a 1-hour (3,600 second) rollover.
The maximum connection time using the above configuration is 4 hours. After 4 hours, the core process is closed and all connections are dropped. At this stage, the client SWF file initiates a reconnect routine that reestablishes the stream playback. Changing the number of processes (numprocs) configures the number of processes in which connections are distributed. Changing the numprocs setting to 2 and using the same settings as before reduces the maximum connection time from 4 hours to 2 hours.
Close idle connections Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Flash Player 6 or later. When clients leave an application, their connection is often left open. Flash Media Server 3.5 can detect these idle connections and reclaim their resources for new and active clients. When a client has been idle longer than the maximum specified idle time—the default is 10 minutes—the server closes the connection.
In the Application.xml file, you can specify one or more folders on the server to hold these SWF verification files locally. This is done within the node . You can also configure the versions to check the length of time the verification data is held in cache, and any exceptions (such as Flash Media Live Encoder). You can also configure how often the server should check for updated SWF verification files. Here is a sample from the Application.xml file.
Encrypted RTMP (RTMPE) Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Flash Player 9,0,115,0 or later. By default, the encrypted RTMP (RTMPE) is enabled in the server’s Adaptor.xml file and offers 128-bit encryption. If you want to disable RTMPE, change the ADAPTOR.RTMPE _ ENABLED parameter to “off.” You should only turn off RTMPE if you do not want it to be available to developers deploying applications on your server.
For example, if you create a global application _ owner property, every instance of that application could access that property using this syntax: Application.config.application _ owner Enable/disable native bandwidth detection Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Flash Player 6 or later. Flash Media Server 3.5 can detect a client’s bandwidth using native bandwidth detection or server-side ActionScript (called script-based bandwidth detection).
Application logs record application event data such as: • Date and time of the event • Event’s server process ID • Event status level (warning, error, information, debug, and so on) Diagnostic logs The diagnostic logs record information about Flash Media Server operations and are used primarily for debugging server-level issues. Flash Media Server is configured, by default, to create a diagnostic log for each type of process. The default diagnostic logs are master.XX.log, edge.XX.log, core.XX.log, admin.XX.
Server healthcheck utility Feature in Flash Media Streaming Server and Flash Media Interactive Server; requires Windows or Linux. In addition to the Administration Console and server logs, you can use FMSCheck to help evaluate the overall health of Flash Media Server. FMSCheck is a command-line utility program that diagnoses and determines server status. The tool is installed with Flash Media Server and is available for both Windows and Linux.
Edge and Origin configurations Feature in Flash Media Interactive Server; requires Flash Player 6 or later. In versions prior to Flash Media Server you had to purchase the Edge and Origin editions to achieve distributed caching and load balancing. This functionality is now built into Flash Media Interactive Server. Flash Media Interactive Server provides an enterprise-ready architecture designed to simplify load balancing, failover, and clustering to ensure maximum availability over large regions.
The Edge server serves as a “traffic cop”—handling connection overhead, authentication, and other administrative duties—freeing up valuable system and network resources for the Origin server. Every connection and connection attempt consumes resources over and above the actual stream data flowing through the connection. As the number and frequency of connections increase, the load can be excessive, adversely affecting server performance. The Edge server greatly reduces this load by aggregating connections.
edge1.fms.com:*;192.168.110.150:1935 The connection string would look like: rtmp://edge1.fms.com/ondemand/ The Flash Player connects to the Edge server and does not expose the Origin server at 192.168.110.50, as shown in the following figure. Edge server using a single Origin server You can configure Edge servers to create proxy clusters. In the following figure, notice how an Edge server (e1) can proxy the Edge server (e0) in its routeEntry tag.
Edge server cluster using a master Edge and a single Origin Using live video Flash Media Server allows you to broadcast live streams with a wealth of interactive features. Connected clients only need Flash Player or an Adobe AIR application to view the live broadcast. A new feature of Flash Media Server 3.5, you can now record H.264 server-side streams, allowing you to create interactive HD media applications leveraging DVR functionality.
Flash Media Live Encoder interface Flash Media Live Encoder live broadcast log Flash Media Live Encoder 3 can also be tightly integrated into your current streaming workflow with command-line control both locally and through a remote connection via Microsoft Remote Desktop Connection or Virtual Networking Computing (VNC). Among other powerful features, auto-restart after power failures or other system restarts also helps ensure that your live streams are reliably available.
A significant benefit over broadcasting direct from the Flash Player, Flash Media Live Encoder 3 allows you to broadcast video using either the VP6 or H.264 codec, and now supports multi-bit-rate encoding (up to three simultaneous streams). You also have greater audio control with bit-rate-efficient Nellymoser, MP3, or AAC encoding. Flash Media Live Encoder is available as a free download from Adobe at: www.adobe.com/go/fmle.
Content vulnerabilities Online digital content can be compromised a number of ways: • Raiding the browser cache—Though the filenames are not easily read, it is relatively simple to retrieve video files from the browser cache. This vulnerability is only present with progressive video delivery; streams are never cached. • Video URI access—Video URIs can be easily discovered using free “sniffer” utilities. • SWF file re-serving—Your SWF file can be copied and re-served from another domain.
Restrict access from domains By default, a client can connect to Flash Media Server from any domain or IP address, which can be a security risk. You can create a whitelist of allowed domains (or a blacklist of banned domains) to ensure that only authorized clients can connect to your applications or services. You can add a comma-delimited list of domains and IP address blocks in the Adaptor.xml or vHost.xml configuration files to add this level of security.
Authorization adaptors can: • Authorize connections to the server • Authorize playing a stream or seeking in a stream • Authorize publishing a stream • Disconnect clients from the server • Call a method in server-side ActionScript • Deliver content to clients according to their geographic location, subscription level, and stream Origin • Limit time and duration of a user’s access to specific streams • Map a logical stream path to a physical stream path. For example, a client requests the stream foo.
Implementing stream encryption in your applications is easy. Simply specify the protocol when you connect to your application. • SSL NetConnection.connect(“rtmps://yourFMSserver.com”); • Tunneled SSL NetConnection.connect(“rtmpts://yourFMSserver.com”); • Enhanced RTMP NetConnection.connect(“rtmpe://yourFMSserver.com”); • Tunneled enhanced RTMP NetConnection.connect(“rtmpte://yourFMSserver.
Content protection with CDNs An easy way to add content protection to your streaming content is to use FVSS through Adobe’s CDN partners. Many of Adobe’s FVSS partners offer plug-and-play restricted access and secure video-streaming solutions. To learn more about how a CDN can help protect your content, visit www.adobe.com/go/fvss.
Live: Live video streaming using Flash Media Live Encoder or Flash Player. Publishing point: A directory on Flash Media Server where customers can place video and audio content and publish live video. On2 VP6: A video codec that offers high-quality, lightweight, full-screen playback (available since Flash Player 8). VP6-S is a simplified version that is ideal for delivery of high-quality video to older computers (available in Flash Player 9 or later).
Flash Media Encoding Server www.adobe.com/go/fmes Flash Media Rights Management Server www.adobe.com/go/fmrms Flash Media Live Encoder www.adobe.com/go/fmle Adobe FVSS partners www.adobe.com/go/fvss Flash Media Solution Provider program www.adobe.com/go/fmsp Flash Player 9 update FAQ http://labs.adobe.com/wiki/index.php/Flash_Player:9:Update:H.264 Flash Media Server community FMSGuru.com www.fmsguru.com FlashComGuru www.flashcomguru.com FlashConnections www.flashconnections.