previous next

RealPix Bandwidth Usage

If you plan to use RealServer to stream your RealPix presentation to viewers over a network such as the World Wide Web, you need to consider the bandwidth (bit rate) the presentation will consume. You don't need to consider bandwidth if copies of the presentation files will reside on each viewer's desktop computer. This section helps you determine your presentation's bandwidth consumption. It also gives tips for lowering bandwidth consumption.

Additional Information
For a detailed explanation of bandwidth in RealMedia presentations, see RealMedia Production Guide available at http://www.real.com.

Targeting a Bit Rate

The following table lists the recommended maximum presentation bit rate for streaming files over different network connections. If you want to reach users with 28.8 Kbps modems, for example, your presentation should not consume more than 20 Kilobits of data per second. The full 28.8 Kbps is not available because bandwidth is required for noise, data loss, and packet overhead.

Bit Rates Available for Streaming Files
Target Connection SpeedSuggested Maximum Bit
Rate for Streaming Files
14.4 Kbps modem 10 Kbps
28.8 Kbps modem 20 Kbps
56.0 Kbps modem 34 Kbps
56.0 Kbps ISDN 45 Kbps
112 Kbps dual ISDN 80 Kbps

You also need to consider bandwidth required by other media types you use in the presentation. If you target 28.8 Kbps modem connections, for example, and your presentation has a RealAudio soundtrack that consumes 5 Kbps, you have 15 Kbps left for RealPix. You should set this value in the <head> tag bitrate attribute. This tells RealServer your target bandwidth value.

The bandwidth your presentation actually requires, however, depends on the total size of the image files and the presentation length. To get a rough estimate of this bandwidth, add together the sizes of all image files used in the presentation. Convert this total to Kilobits using the chart below. Then divide by the RealPix presentation length in seconds.

Converting File Size to Kilobits
Using This MeasurementDo This to Get Kilobits
Megabytes Multiply by 8192
Kilobytes Multiply by 8
bytes Divide by 128
bits Divide by 1024

For example, if your image files add up to 200 Kilobytes, multiply 200 by 8 to get 1600 Kilobits. A presentation that lasts two minutes, for instance, uses an average of 13.3 Kilobits per second:


(200 Kilobytes x 8)/120 seconds = 13.3 Kilobits per second

If your RealPix target is 15 Kbps, your presentation should stream smoothly with bandwidth to spare.

This estimate assumes that the images are each about the same size and are introduced at regular intervals during the presentation. You run into bandwidth problems if you use a lot of images near the start of the presentation. If the presentation begins by fading four big images into four quadrants of the display window, for example, RealServer needs to download a lot of image data before the presentation can begin. This results in a lengthy preroll.

What is Preroll?

Before it delivers a RealPix presentation, RealServer looks at the image sizes and the presentation timeline. Weighing these against the bit rate set in the <head> tag, RealServer determines how much data RealPlayer must receive before it can start to play the presentation. This ensures that once RealPlayer commences playback, it does not need to halt the presentation while it receives more data. The initial data sent before playback is the preroll. As a rule of thumb, you want the preroll under 15 seconds, ideally under 10 seconds.

For example, if a RealPix presentation streams for 60 seconds at 20 Kbps, it can deliver up to 1200 Kb of data during playback. If the RealPix presentation requires 1400 Kb of data, at least 200 Kb of data must be sent as preroll. At 20 Kbps, this equals a 10 second preroll:


(1400 Kb - 1200 Kb)/20 Kbps = 10 seconds

As mentioned above, presentation size divided by presentation length is only a rough guide to preroll length. RealServer considers when each image is introduced in the timeline when it calculates preroll. The following sections give instructions for determining preroll more accurately and for reducing bandwidth consumption.

Lowering Bandwidth Consumption

If your presentation requires too much initial buffering, you can take several steps to lower the preroll. You can modify your RealPix presentation or balance multiple media types so that initial presentation bandwidth needs are low. This gives RealSystem extra bandwidth when the presentation starts to stream the higher bit rate items required later in the timeline.

Lowering RealPix Preroll

Within the RealPix presentation, you can do the following to lower bandwidth consumption:

Masking Preroll using Other Media

When you stream RealPix along with a low-bandwidth media type, you can mask the RealPix preroll so that it takes place while the other media file plays. For example, start the presentation with RealText (to display opening credits, for example) or a low-bandwidth RealAudio file (as a narration, for instance) to consume from 1 to 5 Kbps at the start of the presentation.

As these files play, RealServer takes advantage of the extra bandwidth available in the connection to stream the RealPix preroll. If RealPix starts 20 seconds after the RealAudio or RealText file, for example, you make 300 to 380 Kilobits available (at 20 Kbps) for the RealPix preroll. To do this, you assemble the overall presentation with a SMIL file, setting a 20-second delay for RealPix.

Additional Information
For more on SMIL and RealAudio, see RealMedia Production Guide. For more on RealText, see RealText Content Creation Guide. Both are available at http:// www.real.com.

Calculating Bandwidth Use

This section explains how to derive a detailed picture of RealPix presentation bandwidth. You may want to do this if you experience high preroll when streaming the presentation. You can then determine where the problem occurs and resolve it by modifying images or adjusting the timeline. The following table and text illustrate a sample RealPix presentation and explain how to calculate bandwidth usage.

Note
Calculating exact bandwidth usage is not required. Instead, you can adjust your presentation according to the guidelines in "Lowering Bandwidth Consumption" until the presentation preroll becomes acceptable. The method presented here gives you precise insight into your RealPix presentation's bandwidth use, however.

Initial Example of RealPix Bandwidth Usage at 20 Kbps
1. Image2. Time (sec.)3. Total Data Rate (Kb)4. Image Size (Kb)5. Total Data (Kb)6. Time to Stream7. Time Difference (sec.)
1 1 20 232 232 11.6 10.6
2 4 80 388 620 31.0 27.0
3 10 200 400 1020 51.0 41.0
4 70 1400 512 1532 76.6 6.6
5 84 1680 110 1642 82.1 (-1.9)
6 100 2000 712 2354 117.7 17.7

  1. Start with the RealPix bandwidth target set in the <head> tag bitrate attribute. This is the bandwidth available to RealPix during the presentation. The example above uses 20 Kbps, the bandwidth target for a presentation delivered over a 28.8 Kbps modem.

  2. As shown in columns 1 and 2, list the images and the times they are slated to appear. You need to consider only the first appearance of each image. You wouldn't list image 1 again, for example if it reappeared at 60 seconds. At that point, RealPlayer has the image data in memory and does not need to receive the image again from RealServer.

  3. Calculate the maximum data the presentation has received when each file appears, assuming no preroll. In the table above, image 2 appears 4 seconds into the presentation. Because the presentation bit rate is 20 Kbps, the maximum data delivered up to that point is 80 Kilobits. This value appears in column 3.

  4. List each image's file size in Kilobits as shown in column 4. Convert from Kilobytes or Megabytes with the table "Converting File Size to Kilobits". For example, image 1 is 29 Kilobytes, which converts to 232 Kilobits.

  5. As shown in column 5, calculate the total data required at each point. Because the first two files are 232 and 388 Kilobits, the cumulative data required by the time the second file appears is 620 Kilobits.

  6. As shown in column 6, calculate the time required to stream the data required through that point. Do this by dividing the value in column 5 by the bit rate in Kbps, which in this example is 20.

  7. Subtract the time value in column 2 from the time value in column 6. Enter this in column 7. This gives the extra time required to stream the data required at that point. The highest positive figure in column 7 is the preroll.

As the table illustrates, the biggest problem is with images 2 and 3. To deliver these images, RealServer needs to stream 1020 Kilobits (column 5). At 20 Kbps, this takes 51 seconds (column 6). But all three images appear within the first 10 seconds when the presentation (minus any preroll) has received only 200 Kilobits of data (column 3). RealSystem sends the extra data as 41 seconds of preroll, significantly longer than the goal of 15 seconds or less.

The following table illustrates a revised presentation that makes better use of bandwidth. Files 1 through 3 have been reduced in size. The presentation is longer by 10 seconds. Images appear at more even intervals. As the table shows, the largest value in column 7 is 10.2 seconds. This is the presentation preroll.

Revised Example of RealPix Bandwidth Usage at 20 Kbps
1. Image2. Time (sec.)3. Total Data Rate (Kb)4. Image Size (Kb)5. Total Data (Kb)6. Time to Stream7. Time Difference (sec.)
1 1 20 168 168 8.4 7.4
2 15 300 336 504 25.2 10.2
3 35 700 360 864 43.2 8.2
4 80 1600 512 1376 68.8 (-11.2)
5 90 1800 110 1486 74.3 (-15.7)
6 110 2200 712 2198 109.9 (-0.1)


Copyright © 1998 RealNetworks
For technical support on RealNetworks products, visit http://service.real.com/.
Comments on this document? Contact techpubs@real.com.
This file last updated on 05/20/98 at 16:48:06.
previous next