Multiple bitrate video streaming

October 10, 2007 11:15 am Tags: No Comments 0

In order to provide the best quality video possible to the widest range of viewers, it is necessary to tailor the bit rate of the video to match the download speed of the client’s connection. This is possible to do with Windows Media Server, Real Producer and Quicktime.

The most difficult task of streaming audio and video over a network is maintaining a continuous presentation to the user in a highly changeable environment. Buffering is the biggest problem of streaming digital media. It is caused when the client runs out of data in memory, called the buffer, and must wait for more to arrive. The client will always run out of data if the bit rate of the incoming stream exceeds the current available bandwidth.

Unpredictability of bandwidth is taken for granted on the Internet. For example, just because a user connects to an ISP at 56 Kbps does not mean there is 56 Kbps of bandwidth available to the user at all times. The actual bandwidth at any given point is determined by network conditions and traffic on the Internet, which is constantly fluctuating, causing bandwidth to drop to 18 Kbps one moment, and then increase to 40 Kbps the next. If a user attempts to view video being streamed at 50 Kbps, the presentation suffers considerably when bandwidth is squeezed.

Windows Media

To ensure a continuous presentation, Windows Media technologies use intelligent streaming, which adjusts the bit rate of the content stream to counteract changes in available bandwidth. When a user first connects to a stream, intelligent streaming ensures that the client receives content at the bit rate that is most appropriate for the current bandwidth. As the user continues to play a stream, intelligent streaming dynamically and seamlessly adjusts the bit rate of the streaming content as the available bandwidth changes.

Multiple-Bit-Rate Encoding

To take full advantage of intelligent streaming, content must be encoded as a multiple-bit-rate stream. In multiple-bit-rate encoding, a number of discrete, user-definable audio and video streams are encoded into a single Windows Media stream. The streams are encoded from the same content, but each is encoded at a different bit rate. When Windows Media Player connects to a Windows Media server to receive a multiple-bit-rate Windows Media file or broadcast stream, the server only sends the set of audio and video streams that is the most appropriate for current bandwidth conditions. The process of selecting the appropriate stream is completely transparent to the user.

How to create multiple bit rate files

To encode content that takes advantage of intelligent streaming, you can simply use one of the multiple-bit-rate destinations provided in Windows Media Encoder. For greater control, you can manually select the bit rates for each audio and video stream within a multiple-bit-rate stream. Client post-processing and intelligent bit rate optimization are all automatic, on-the-fly features. Best of all, you only need to create and manage a single file to handle multiple bit rates.

To understand the following topics, you should be familiar with the operation of Windows Media Encoder 9 Series. For more information about encoding, see Windows Media Encoder Help.

Setting Up the Encoder
To set up a multiple-bit-rate encoding session, do the following:

  1. Open the Session Properties dialog box in the encoder, and click the Compression tab.
  2. In Destination, click Windows Media server (streaming).
  3. In Audio and Video, click the type of audio and video you want to encode.
  4. Select more than one of the bit rate check boxes. The number of bit rate choices changes depending on the audio and video type you chose.
  5. If you want more manual control of the encoding session, on the Compression tab, click Edit.
  6. Optionally, in the Custom Encoding Settings dialog box (shown in the following figure), you can add and configure custom target bit rates, and then modify the settings of each bit rate by clicking the corresponding tab. Multiple-bit-rate encoding is only available if you select the constant-bit-rate (CBR) encoding mode.

If you want to use intelligent streaming with multiple-bit-rate streams, the content must be hosted on a Windows Media server and played in Windows Media Player. You can create files that contain multiple-bit-rate streams and play them locally or from a Web server, but only the highest bit rate streams will play.

For more information about editing or creating profiles that encode with multiple bit rates, see Windows Media Encoder Help.

Viewing the Process
After you have configured an encoding session for capturing multiple-bit-rate content and have connected and adjusted the video and audio streams, start encoding. If your computer meets the requirements for encoding high-bit-rate content, you can capture and encode multiple-bit-rate content. The more streams you encode, however, the faster the CPU and more memory your computer requires.


You face a tough choice when you want to deliver your QuickTime movies over the web. Part of your audience has a dialup connection and a slow computer and can’t view large movies with high frame rates. They need small, highly compressed movies. The other part of your audience has a fast connection and a fast computer and easily watch higher bit rate videos. They want movies with the highest possible video and audio quality. How do you satisfy both?

With QuickTime, you don’t have to choose–you just use a reference movie. A reference movie contains pointers to alternate data rate movies–that is, multiple versions of the movie designed for downloading at various data rates.

For example, you could create three versions of a movie–a version optimized for 56K dialups, a version for DSL or cable modems, and a version for T1’s and higher–put them all on your webpage, and have the reference movie choose which is appropriate for each viewer.

That’s right, QuickTime 3 and later can auto-select the right movie for any connection speed (or CPU speed, or language, or QuickTime version) in the QuickTime Settings dialog without the viewer having to make a choice, and without special coding on your part. You can even create a default movie that plays if none of the criteria are met.

To create a reference movie/alternate data rate movie setup, you’ll need the Pro version of QuickTime Player and an application that allows you to make a reference movie, such as Peter Hoddie’s XMLtoRefMovie utility, or Apple’s free MakeRefMovie utility.

Make Reference Movies

Making alternate data rate movies

Creating the alternate data rate movies is a straightforward process.

  • Start by creating a master movie of the highest possible quality. That means the largest frame size, the highest frame rate, and the least compression on audio and video tracks. You’ll be making the alternate movies from this master.
  • Determine the number of alternate data rate movies you want to create, and the rate for each one. A typical spread for web delivery is one each for 56K (56 Kbits/sec max, but usually much lower), DSL/cable (up to about 128 Kbits/sec), and T1/T3 (up to 1 Mbit/sec). If you are delivering media on CD-ROM, you may want to create a spread for slow computers and fast computers, or for 2X, 8X, and 24X drives.
  • Create the alternate data rate movies from the master using the appropriate image dimensions and codecs. You can do this in QuickTime Player using the Export option in the File menu.
  • If some of your alternates are streaming movies, make Fast Start movies that point to them, and use the Fast Start movie as the alternate for the stream. To create a Fast Start movie that points to a streaming movie, open the streaming movie in QuickTime Player by choosing Open URL from the File menu and typing in the URL. Then choose Save As from the File menu, name it, and save it as a self-contained movie.
  • Also create a default movie that anyone in your audience can see, no matter what connection or computer they are using. It could be a few frames from your movie with a low-bandwidth audio track, or a single image with a scrolling text track and no audio, or just an image. In any case. keep it very small, because the browser will download it even if an alternate movie is used.
  • Name each movie in a logical way, including the .mov filename suffix. For example, you may want to name your alternate movies,, and Save as self-contained movies. Store them all in the same folder or directory.

Making a reference movie

You can make a reference movie for alternate data rates based on connection speed or other criteria using an application such as the free utility program MakeRefMovie, available from Apple for Mac OS 9 , Mac OS X, and Windows. The latest version of MakeRefMovie can also create reference movies that choose among alternate movies based on CPU speed, language, or QuickTime version.

Once you’ve made the alternate movies, follow these steps in MakeRefMovie:

  • Open MakeRefMovie.
  • Save your new document in the same folder or directory where the alternates are located. Make sure the reference movie filename contains the ‘.mov’ extension. This reference movie will call upon the alternates.
  • Drag each of the alternate movies onto the window of MakeRefMovie. An alternate movie will appear for each file you drag-and-drop. Or you can open each file separately by choosing ‘Add movie file’ from the Movie menu or you can type the URL to your streaming movie by selecting “Add URL” from the Movie menu.
  • Set the minimum connection speed for each alternate movie in the Speed: pop-up menu.
  • Set the load order of the movies in the Priority: pop-up. For example, you may want the reference movie to call the highest quality movie first, then the medium quality movie, and last the lowest-quality or default movie. If there is more than one movie designed for the same connection speed, set a priority for which movie will load first.
  • Specify the default movie by checking Flatten into output. The default movie should be compressed with a codec supported by older versions of QuickTime for backward compatibility. This checkbox can only be applied to one movie.
  • Save the reference movie and place it and all the alternate movies in the same directory. Upload the directory or folder to the server.
  • If you are putting the movies on a webpage, embed the reference movie into the HTML using the <OBJECT> tag. The reference movie will load the appropriate alternate based on the viewer’s connection speed. More about embedding QuickTime movies into webpages using HTML.