A video consists of two parts: the visual track and the soundtrack. For the soundtrack, RealVideo uses the RealAudio codecs. For the visual track it uses its Scalable Video Technology (SVT) codec. It packages both tracks in a single RealVideo file that, like RealAudio, uses the file extension .rm. So keep in mind that everything discussed about RealAudio clips in "Working with RealAudio Codecs" applies to the soundtrack of RealVideo clips.
Unlike RealAudio, RealVideo uses just one codec to compress a video's visual track for all bandwidths. For all practical purposes, the RealVideo codec is infinitely scalable. You can encode RealVideo at any speed you want, from a slow 20 Kbps for modems all the way up to fast rates of hundreds of kilobits per second. Plus you can encode at precisely any bandwidth you choose, such as 65 Kbps, 89 Kbps, 117 Kbps, and so on.
Because RealVideo uses RealAudio for audio, a specific amount of the clip's bandwidth goes to the soundtrack. The visual track then gets squeezed into the remaining bandwidth. Like RealAudio, RealVideo compression is "lossy," meaning RealProducer throws out video data when necessary as it encodes a clip. RealVideo does this intelligently to keep the clip's playback quality as high as possible.
RealProducer squeezes down clip size by, in part, reducing the video's frame rate. Most videos have a frame rate from 15 to 30 frames per second (fps). RealProducer dynamically adjusts this frame rate downward, keeping the rate up where there's a lot of movement, reducing it in slow scenes. If you follow good production techniques, your clips will typically stream over slow to medium-speed connections at 5 to 15 fps, depending on the video quality and the target audience. At higher speeds, you'll get 15 to 30 fps.
Another way RealVideo reduces the clip's streaming size is to throw out pixel data. A standard video clip stores information about each screen pixel in the video frame. Instead of storing unique values for each pixel, RealVideo stores data for pixel groups. When bandwidth is tight, RealProducer shoehorns pixels with slightly different RGB values into the same group. These pixels end up looking identical rather than nearly identical. This results in a loss of detail, which can make the video blocky. Figure 4 compares a smooth video with a version that has lost detail through encoding for a low bandwidth.
The different means of reducing video bit rate explain why RealProducer asks you whether you prefer smooth motion (a higher frame rate), better image quality (more detail), or a split of the difference. Your choice tells it how to squeeze down the file data. As it creates the RealVideo clip, RealProducer also uses some complex technology to soften the blow of the reduced frame rate and pixel data. This helps smooth jerkiness and sand off the rough edges of the pixel blocks.
RealProducer determines how to encode a RealVideo clip based on your selection of:
Table 8 shows the RealAudio codecs used for RealVideo clips based on connection speed and audio type.
The first column in Table 8 lists RealProducer's standard target audiences. For each audience, the "Total Rate" column shows the maximum streaming bandwidth. For 28.8 Kbps modems, for example, RealProducer creates a RealVideo clip at 20 Kbps. As it does when creating a RealAudio clip, RealProducer never uses the full connection bandwidth, reserving some bandwidth for overhead.
The remaining four columns show which RealAudio codec RealProducer uses in the RealVideo clip, depending on the audio type. Compare these rates to those in Table 2. Table 2 shows that when you encode mono audio for a 28.8 Kbps modem, you get a 20 Kbps RealAudio clip. But Table 8 shows that the same audio gets 8 Kbps of bandwidth when used in a video clip. Even at fast speeds, a RealVideo soundtrack gets about half the bandwidth it would receive when encoded solo as RealAudio. So, for example, a music video won't sound as good as the music alone.
The amount of bandwidth used for the visual track is the total rate minus the RealAudio soundtrack rate. For a 28.8 Kbps modem, the visual track gets 15 Kbps (20 Kbps minus 5 Kbps) when the audio is voice-only, 13.5 Kbps (20 Kbps minus 6.5 Kbps) when it's voice with music, or 12 Kbps (20 Kbps minus 8 Kbps) when it's music. A video with an audio narration might therefore look slightly better than one with a music soundtrack because more bandwidth goes to its visual track. At higher connection speeds, though, the differences even out. Many things, though, affect a video clip's quality, and even a music video can look good at 20 Kbps.
|
|
Additional Information |
|---|
| For more on video quality, see the video preparation chapter in RealSystem G2 Production Guide. |
Note, too, that the lowest-speed stereo codec is 20 Kbps. Table 8 shows that stereo codecs 20 Kbps or faster are used only for RealVideo clips encoded at dual-ISDN or faster speeds. When you encode for lower connection speeds, RealProducer converts stereo sound to mono because bandwidth is lacking for both the visual track and a stereo soundtrack. "Making a Mono Clip from Stereo Input" explains more about this conversion process.
If you have RealProducer Plus, you can change the RealAudio codecs RealProducer uses for video clips. This lets you increase or decrease the soundtrack bandwidth to emphasize or de-emphasize it in relation to the visual track. To change the defaults, choose Options>Target Audience Settings>for RealVideo Clips..., and click the Audio tab. The dialog is similar to the one used to modify RealAudio defaults, as shown in Figure 2.
To change the RealAudio codec used with a certain RealVideo stream, select the target audience speed in the Target Audience pull-down menu. The four pull-down menus in the remainder of the dialog correspond to the audio type choices: voice, voice with music, mono music, and stereo music. For an audio type, simply select the appropriate codec from the pull-down menu. Click OK when you're finished.
|
|
Note |
|---|
| Each tab of the RealVideo preferences dialog has a Restore Defaults button that returns everything to the initial defaults. This affects all panes in the dialog, not just the one you're viewing. |
The reasons for swapping RealAudio codecs given in "Changing RealAudio Defaults" applies to changing the audio defaults for RealVideo as well. When you encode a video, you might want to change its stereo soundtrack to mono to get better frequency response at low bandwidths. Or you might want to use the 20 Kbps and 32Kbps normal response codecs.
The primary reason to change the defaults, though, is to increase or decrease the bandwidth used by the video's soundtrack. In most cases you won't want to decrease the soundtrack's bandwidth. As Table 8 shows, the defaults are low to start. This ensures that the visual track gets enough bandwidth while keeping audio quality acceptable. For high-speed connections, though, you may want to increase the soundtrack bandwidth to get better sound quality.
An example of when to increase audio bandwidth is a music video streamed at high speeds. At DSL/cable modem speeds, you may want to use a 64 Kbps RealAudio codec instead of 32 or 44 Kbps. This will boost sound quality greatly without cutting too hard into video clarity and frame rate. If in doubt, try different options and determine by sight and sound which clip best balances audio and visual quality.
The default, maximum frame rate for RealVideo clips is 15 frames per second (fps) for dial-up modem and ISDN audiences, 30 fps for LAN/DSL/cable modems. During encoding, RealProducer adjusts the frame rate based on the clip size, target audience speed, and emphasis on smoothness or visual clarity. One scene may be 7 fps, for example, while another is 10. A maximum of 15 fps means the frame rate may vary anywhere between 15 fps and 0.25 fps.
Typically, it's a good strategy to leave the frame rate set to its defaults and let RealProducer cut the rate down as needed. But at low bandwidths, you may want to emphasize clarity. Instead of just choosing the RealProducer option for visual clarity, you could also set a slower maximum frame rate, say 5 fps. This slows the frame rate down even when it could go faster. The result is a sharper image, at the expense of some jerkiness due to the slower frame rate. Rarely would you want to increase the maximum frame rate unless you're also raising the streaming bit rate.
|
|
Tip |
|---|
| To really slow things down and heighten visual clarity, you can just record the video as a slide show. You'll get about one frame a second without having to lower the frame rate setting. |
You can change the maximum rate with Options>Target Audience Settings>for RealVideo Clips.... After giving this command, click the Video tab, which is shown in Figure 5. Select the connection speed in the Target Audience pull-down menu. Then click the slider button and move it between the minimum of 0.25 fps and the maximum of 30 fps. The chosen frame rate displays to the left of the slider.
The frame rate dialog also lets you choose between two RealVideo codecs. The default choice is "RealVideo G2 with SVT," where SVT stands for "Scalable Video Technology." The other choice is an older RealVideo G2 codec without SVT. The SVT technology removes a stumbling block of streaming media by letting you encode clips at high frame rates for fast machines without concern that slower machines might not keep up. SVT even works when delivering clips with Web servers, so there's no reason not to use SVT all the time.
When it encodes RealVideo, RealProducer uses a variable frame rate, meaning one scene might stream at 7 fps, while another streams at 15 fps. On the receiving end, RealPlayer decompresses the stream, which can take a lot of processing power at high frame rates. Fast PCs handle high frame rates well, but slower PCs may have trouble. With SVT, RealPlayer can lower the frame rate "on the fly" to keep a PC's CPU from sputtering. So although a certain scene is encoded at 15 fps, it may play on some RealPlayers at 8 fps, for example, if those RealPlayer machines lack the power to decompress 15 fps.
Unlike RealAudio codecs, which have fixed bit rates, the RealVideo codec can squeeze the visual track into any bandwidth. Only the soundtrack bit rate is fixed, based on the RealAudio codec used. To change RealVideo's total streaming speed, select Options>Target Audience Settings>for RealVideo Clips.... Then click the Target Bitrate tab, which is shown in Figure 6. This tab lets you change the total RealVideo bit rate by selecting the connection speed in the Target Audience pull-down menu, and entering a bit rate in Kilobits per second in the Target Bitrate field. Click OK when you've made your changes.
The main reason to lower the streaming bit rate of a RealVideo clip is to combine it with another clip at lower bandwidths. But remember that lowering the RealVideo bit rate affects its quality. Video is hungry for speed, and you need to leave enough bandwidth for RealVideo to function well. You generally shouldn't need to raise the bit rates because they are as high as they can safely go for each target audience. The following sections give tips for handling RealVideo bandwidth settings.
|
|
Additional Information |
|---|
| See the "Total Rate" column of Table 8 for the recommended maximum bandwidth of a presentation streamed to various audiences. |
Don't touch the setting for 28.8 Kbps modems. The default size of 20 Kbps is the smallest package that can carry video. Lowering the size seriously degrades quality. So for slow modems, don't try to combine RealVideo with other clips, except a lightweight RealText clip that consumes 1 Kbps or less. In this case, you don't need to lower the RealVideo bandwidth from 20 Kbps because RealText can easily sneak inside the extra 8.8 Kbps left for modem overhead.
Whenever you lower RealVideo speed, the new bit rate includes the RealAudio codec set through the dialog's Audio tab. If you use a 32 Kbps RealAudio codec and set a total RealVideo bit rate of 36 Kbps, you won't get much for the visuals, maybe a frame every few seconds. You'll need to select a lower-bandwidth RealAudio codec, too.
There are no strict rules for the ratio of soundtrack bandwidth to total RealVideo bandwidth. The ratio can be anything depending on whether you want to emphasize audio or the visuals. As you can see from Table 8, RealVideo normally allots no more than 1/4 of the total bandwidth to the soundtrack because the visual information contains much more data. At high bandwidths, the soundtrack can receive considerably less bandwidth in proportion to the visual track.
|
|
Additional Information |
|---|
| See "Changing the RealAudio Codecs used with RealVideo". |
When streaming video on an intranet, you can raise RealVideo's LAN connection bit rate because a local area network has total bandwidth much higher than 150 Kbps. However, LAN bandwidth is shared by everyone logged on. If lots of people view your RealVideo clips simultaneously, the LAN can bog down and no one is going to be happy, least of all the LAN manager. So in some cases, you may need to lower the LAN audience bit rate. What to set for the LAN rate depends on the LAN speed and average RealVideo use. Your LAN manager is the best person to determine this.
Instead of lowering the bit rate for a target audience, you could just encode the clip using a slower target audience setting. This does not give you the precise control you have when choosing a new bit rate, but it may be adequate in many circumstances. Suppose you want to combine RealVideo with a 50 Kbps RealPix slide show for DSL/cable modem connections. You could lower RealVideo's lowest DSL rate by 50 Kbps, or simply encode the RealVideo clip at the standard LAN speeds. The modified DSL setting gives you a 175 Kbps clip that will be only marginally better than the 150 Kbps clip you get from the default LAN option.