In the previous section I described how a multi-bit rate solution could be implemented to enhance the end user's video experience. In this part, we'll begin working with the sample video files. To follow along, you'll need multiple versions of the same video content to stream. Download the sample files provided on the first page of this article, or locate your own video files on your hard drive. You can use the Flash Video Encoder (which ships with Flash CS3 Professional) or Adobe Media Encoder CS4 (which ships with Flash CS4 Professional) to encode the video at different bit rates. Alternately, you can also use other video encoding options that are described at the end of this section.
One of the primary requirements to providing a clean solution for dynamic bit rate stream switching is having a set of videos of different bandwidths available from a single source. This will enable us to determine which file is best suited for the end user at the different bandwidths they may connect at or shift to over time. The key factors we need to manage between the videos are as follows:
Let's get started by preparing some video for streaming. We'll encode videos for several different bit rates:
Ensure that all of the encoded videos use the same frame dimensions. We'll be switching between the videos as they're playing, and the transitions will be smoother if all of the videos in a set have the same frame dimensions.
The sample video source is encoded as a High-Definition QuickTime MOV file using the H.264 MPEG compression at an approximately 5 Mb/second bit rate encoding and AAC audio. The source file has the frame dimensions of 1280 × 720 and a frame rate of 24 fps. It is most definitely not a web ready video, but it suits our purposes well as the master source file to use when encoding the web versions we'll deliver.
It is important to note that whenever you are encoding your own video you should always strive to use the highest quality, least compressed source to achieve the best results. In this walkthrough we will use the bit rates listed above to encode the web-quality video clips in preparation for setting up the dynamic bit rate swapping in the later exercises:
Set the Output filename to AdobeMax2007_720p_150. Switch to the Crop and Resize tab. Check the Resize video checkbox, and then set the height to 240. The width should automatically resize to 426 (see Figure 2).

Figure 2. Select the option to resize the video and set the height to 240 pixels

Figure 3. Duplicate and add settings to create three more versions to encode
That's all you need to do to encode the video sample files for this article. Keep in mind that there are other settings you can tweak later to provide your users with more viewing options. You can encode videos at different levels of smoothing or at different frame sizes. Although switching between videos with different settings for smoothing and frame sizes is outside the scope of this article, you may wish to experiment later with switching between videos using these settings as well.
Adobe works with partner companies to provide Flash Media Server assistance, including video encoding services. Encoding partners can set up solutions such as server-based transcoding or simpler needs, such as batch encoding of media files. Table 1 includes a list of Adobe partners and the type of Flash Media Server services they provide. To learn more, see the Flash Media Server: Ecosystem partners.
Table 1. Flash Media Server services of Adobe partners