58
Working With Media Files
Customizing stream delivery
You can use the Flash Media Server custom stream delivery feature to provide the best
streaming experience for each client by serving different versions of the same stream to
different clients. For example, you can provide video encoded with the Sorenson Spark codec
to clients with Flash Player 7 and video encoded with the On2 VP6 codec to clients with
Flash Player 8. You can also provide video encoded at different bit rates based on the
bandwidth of the client.
Flash Media Server has two features that work together to let you deliver custom streams:
virtual directories and virtual keys.
You can create multiple directories on the Flash Media Server and store different versions of
the same video content in each directory (for example, a video encoded with different codecs
or at different bit rates). Each client that connects to the Flash Media Server is given a virtual
key (stored in the server-side
Client.virtualKey
property). By default, the virtual key is
based on the value of the client’s Flash Player version. In the vhost.xml configuration file, you
can map the keys to the directories in the VirtualKeys and VirtualDirectory sections of the file
to deliver custom content for individual clients. For customizing stream delivery based on
bandwidth, you must check the client bandwidth in a script and change the client keys
accordingly.
You can set the key and directory values directly in the vhost.xml file or you can use server-
side ActionScript (the
Client.virtualKey
property and the
Stream.setVirtualPath()
method) to set the values. After you’ve set up the mapping in the vhost.xml file (or
programatically), each connecting client is automatically served the appropriate video
content.
For more information about the vhost.xml configuration file, see “Vhost.xml file” in
Managing Flash Media Server
.
Delivering video based on Flash Player version
Flash Media Server can encode and deliver On2 V6 and Sorenson Spark encoded video. Flash
Player 8 supports both codecs; Flash Player 7 and earlier versions support only the Sorenson
Spark codec. You can create virtual directories on the server to store copies of video streams in
each format; this lets you deliver the highest quality content to clients with Flash Player 8.
Summary of Contents for FLASH MEDIA SERVER 2-DEVELOPING MEDIA
Page 1: ...Developing Media Applications ...
Page 6: ...6 ...
Page 10: ...10 About This Manual ...
Page 36: ...36 Flash Media Server Architecture ...
Page 80: ...80 Debugging and Monitoring Applications ...
Page 106: ...106 Application Development Tips and Tricks ...
Page 114: ...114 ...