When you 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, however. This section helps you determine your presentation's bandwidth usage. It also gives tips for lowering bandwidth consumption.
|For an explanation of bandwidth in RealSystem, see RealSystem Production Guide available at http://service.real.com/help/library/encoders.html.|
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.
|Target Connection Speed||Suggested 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 clips 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
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.
|Using This Measurement||Do 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 simple estimate assumes that all images are each about the same size and are streamed at regular intervals. You run into bandwidth problems, however, 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.
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 general rule, 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.
The RealPix Bandwidth Calculator (rpcalc.xls) is a Microsoft Excel 97 for Windows spreadsheet included in the utils directory of this manual. Use the calculator to derive a detailed picture of RealPix bandwidth usage. You may want to do this if you experience high preroll when streaming your presentation. You can then determine where the problem occurs and resolve it by modifying image size or adjusting the timeline.
In the calculator you can enter RealPix information manually, or read in a RealPix (.rp) file to gather the image file names and display times. The calculator will also load the image sizes automatically. To be read automatically, a RealPix file must meet these criteria:
In the calculator, make sure that the RealPix bit rate is set correctly. This reflects the RealPix bandwidth target set in the
bitrate attribute. The example below uses 20 Kbps, the bandwidth target for a presentation delivered over a 28.8 Kbps modem. Set the buffer time to your targeted preroll, which should be approximately 10 seconds.
|See "Targeting a Bit Rate".|
When setting values manually, enter file names (not shown below) and image sizes in Kilobytes, along with the times each image first displays. These values go in the white columns. The calculator computes the values in gray. When you load a RealPix file automatically, the calculator adds an entry for each effect. After the first effect that uses an image, though, RealPlayer has the image in memory, so the entries for subsequent effects show that image as 0 Kb. You can ignore these entries and examine only the initial appearance of each image.
Based on the image sizes, the calculator computes the transmission time in seconds for each image. This is the time it takes RealServer to stream the image to RealPlayer at the presentation bit rate. The last column shows the earliest display time for each file. This reflects the earliest time in the RealPix timeline the image can appear. The calculator derives this time by subtracting the presentation preroll from the cumulative image transmission times.
The example above illustrates a RealPix presentation that will not stream with the desired preroll of 10 seconds. It shows, for example, that the first image can display at 2.3 seconds into the timeline at the earliest. The image is slated to appear at 1 second after the start of playback, however. The calculator flags this display time in red to indicate the problem. As shown above, only the fifth image can display at its slated time of 84 seconds.
Were it to stream this RealPix presentation, RealSystem would compensate with a preroll higher than the desired 10 seconds. Although the presentation would stream smoothly, viewers would have to wait too long for playback. (To determine the actual preroll for a presentation, increase the preroll value until all display time values turn black.)
To improve a presentation's performance, you can take steps described in "Lowering Bandwidth Consumption". Then reload the RealPix file into the spreadsheet or update the image sizes and display times manually. The following figure illustrates a revised presentation that makes better use of bandwidth.
In this example the preroll is still 10 seconds, but files 1 through 3 are reduced in size. The entire presentation is lengthened and the images appear at more even intervals within the timeline. All display time values are now in black. The first image shows its earliest display time in green as (1.1). This indicates that the preroll is 1.1 seconds longer than necessary to display this image. If the earliest display times for all images appears in green, the actual preroll will be lower than the value listed in the calculator.
As described in "Using JPEGTRAN", you run JPEGTRAN on JPEG images to prepare them for streaming. On Windows, you can run JPEGTRAN in a batch conversion mode from the RealPix spreadsheet as described below.
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.
Within the RealPix presentation, you can do the following to lower bandwidth consumption:
When you stream RealPix along with a low-bandwidth media file, you can mask the RealPix preroll so that it takes place while the other 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, put all files in a
<par> group, and set a 20-second delay for RealPix.
|For more on masking preroll, see the appendix on advanced production techniques in RealSystem Production Guide. For more on RealText, see RealText Authoring Guide. You can download both guides from http://service.real.com/help/library/encoders.html.|