previous next

Working with RealAudio Codecs

All streaming audio clips use a codec, which is short for "compressor/decompressor." Encoding software, such as RealSystem Producer, use RealAudio codecs to tell a computer how to convert audio input into streaming audio clips. On the receiving end, decoding software, such as RealPlayer, use the same codecs to expand the streaming clips into digitized audio data.

RealNetworks has developed an array of RealAudio codecs, and each one is designed for a specific bandwidth and a type of audio. For example, one RealAudio codec compresses mono music for a 28.8 Kbps modem. Another compresses stereo music for that same modem speed. And still more codecs are used to compress music for cable modems bandwidths. RealAudio Codec Reference lists the many RealAudio codecs RealSystem Producer uses.

How RealAudio Codecs Compress Audio

RealAudio squeezes files down by, in part, throwing out data, which makes RealAudio a lossy compression format. RealAudio doesn't delete data indiscriminately, though. It first jettisons portions you can't hear, such as very high and very low frequencies. Next, it removes as much data as needed while keeping certain frequencies intact. Your answer to the audio type question (voice, music, or a combination) determines which frequencies stay and which go. Voice encoding favors frequencies in the normal human speaking range. Music encoding retains a broader frequency range.

Although RealSystem Producer is savvy about what audio data it throws out, you can't escape the reality that the lower the connection speed, the more data gets ejected, and the cruder the sound quality becomes. At low bandwidths, you get roughly the quality of an AM radio broadcast. With faster connections, you can encode music with FM-quality sound. And at the high speeds of DSL, cable modems, and LANs, RealAudio rivals CD playback.

Encoding with the RealAudio Standard Defaults

When you encode RealAudio, RealSystem Producer is set up to use a specific set of RealAudio codecs based on your choice of:

Table 2 shows the bit rates at which RealSystem Producer encodes a RealAudio file based on your choice of connection speed and audio type. With voice-only clips encoded for a 28.8 Kbps modem, for example, you get a 16 Kbps streaming clip. With mono music, though, you get a 20 Kbps streaming clip.

Table 2: RealAudio Standard Default Bit Rates
Target Audience Voice Only Voice and Music Mono
Music
Stereo
Music
28.8 Kbps modem 16 Kbps 20 Kbps 20 Kbps 20 Kbps
56 Kbps modem 32 Kbps 32 Kbps 32 Kbps
Single ISDN (64 Kbps) 32 Kbps 44 Kbps 44 Kbps 44 Kbps
Dual ISDN (112 Kbps) 64 Kbps 64 Kbps 64 Kbps 64 Kbps
Corporate LAN 96 Kbps 132 Kbps
256 Kbps DSL/cable modem 176 Kbps
384 Kbps DSL/cable modem 96 Kbps 264 Kbps
512 Kbps DSL/cable modem 352 Kbps

Notice that RealAudio doesn't use all of a connection's available bandwidth. For example, if you select a 28.8 Kbps modem target audience, RealAudio uses 16 or 20 Kbps, reserving some bandwidth for network overhead. Although the same is true for all connections, higher-speed connections need proportionally less bandwidth for overhead than analog modems, which are more prone to transmission errors.

At low speeds, RealAudio uses most of the connection bandwidth to make the audio quality as high as possible. At faster speeds, RealAudio uses less of the connection's total bandwidth. Note, too, that every RealAudio codec has a specific speed. There are 64 Kbps and 96 Kbps codecs, for example, but nothing in-between.

Choosing SureStream Rates

Knowing the RealAudio codecs used with RealSystem Producer's target audiences helps you use SureStream effectively. For example, Table 2 tells you that the 28.8 and 56 Kbps modem audiences share the 16 Kbps codec when encoding a voice-only clip. And each target audience uses identical 8.5 Kbps and 6.5 Kbps duress streams. Basically, there is no difference in audio quality between the two audiences.

If you want to give your audience more options, you can choose one of the modem settings and one of the higher bandwidth settings. This gives you a clip with a 16 Kbps stream for slower connections, and a 32 or 64 Kbps stream for faster connections.

With music, though, you have more options. For mono music, a 28.8 Kbps modem gets 20 Kbps of sound, while a 56 Kbps modem gets 32 Kbps. That extra 12 Kbps of bandwidth noticeably improves sound quality. So if modem audiences are important, encode with the two modem settings. If you want to provide higher-quality clips for faster connections, choose a higher-speed connection to get a faster clip.

If you purchase RealSystem Producer Plus, you can encode RealAudio for all eight target audience speeds. While it's possible to choose all the audiences, you won't ever get eight distinct and separate streams. And RealSystem Producer's encoding performance will suffer. As shown in Table 2 above, many target audiences share the same stream. RealSystem Producer is smart enough to know that if you choose different audiences that use the same codec, you need just one stream that uses that codec. It won't waste file space and processor time by stuffing two identical streams into the same clip.

Reducing Streaming Clip Size

Just because RealSystem Producer Plus lets you encode for all eight target audiences, that doesn't mean you have to. Other factors such as clip size might matter. Each SureStream stream increases the clip's size as shown in Table 1. If the audio file is large, the encoded clip size can escalate dramatically. The bigger the clip, the more hard disk space it eats up, and the longer it takes to transfer to RealServer.

When RealSystem Producer encodes a clip, it not only creates a stream for the codec listed in Table 2, but it also creates a number of duress streams (as many as three duress streams for a selected target audience). The fewer target audiences you select, the fewer duress streams are created. But since some audiences share the same duress streams, selecting certain combinations of audiences can maximize your clip size.

The Statistics window in RealSystem Producer shows you all streams that will be encoded once you have selected a number of target audiences. For more information on how to use the Statistics window, see Viewing Statistics.

Encoding with the RealAudio Multimedia Defaults

Table 2 shows you which RealAudio codecs RealSystem Producer uses as its standard default settings. RealSystem Producer has another set of defaults, though, that lower a RealAudio clip's streaming bandwidth so you can combine it with other clips in a multimedia presentation. To use the multimedia defaults, choose the menu command Options>Target Audience Settings>for RealAudio Clips.... This displays the dialog shown in Figure 2.

Figure 2: RealAudio Target Audience Dialog

Initially, the radio button Audio Only is selected. This sets RealSystem Producer to use RealAudio's standard defaults given in Table 2. If you click Multimedia Presentation, RealSystem Producer uses lower-bandwidth RealAudio codecs for each combination of audience and music type. This keeps RealAudio from overloading the connection when played in parallel with another clip in a SMIL presentation. These settings stay in effect until you click the Audio Only button to return RealSystem Producer to the standard defaults.

Table 3 shows the results of encoding a RealAudio clip with the multimedia defaults. With these defaults turned on, encoding voice-only audio for a 28.8 Kbps modem produces an 8.5 Kbps clip, for example. The standard default given in Table 2 is a 16 Kbps clip. In most cases, a clip using the multimedia defaults consumes about half the standard default bandwidth. The Top Speed column in Table 3 shows the total usable bandwidth for each connection. Your multimedia presentation should not exceed this number.

Table 3: RealAudio Multimedia Default Bit Rates
Target Audience Top Speed Voice Only Voice and
Music
Mono
Music
Stereo
Music
28.8 Kbps modem 20 Kbps 8.5 Kbps 11 Kbps 8 Kbps 11 Kbps
56 Kbps modem 34 Kbps 16 Kbps 20 Kbps 20 Kbps 20 Kbps
Single ISDN (64 Kbps) 45 Kbps 32 Kbps
Dual ISDN (112 Kbps) 80 Kbps 32 Kbps 44 Kbps 44 Kbps 44 Kbps
Corporate LAN 150 Kbps 64 Kbps 96 Kbps 64 Kbps 105 Kbps
256 Kbps DSL/cable 225 Kbps 132 Kbps
384 Kbps DSL/cable 350 Kbps 96 Kbps 264 Kbps
512 Kbps DSL/cable 450 Kbps 352 Kbps

When to Use the Multimedia Defaults

Using the multimedia defaults is crucial for delivering multliclip presentations at slow connection speeds. Suppose you want to deliver a combined RealPix slideshow and RealAudio narration over a 28.8 Kbps modem. For this modem speed, presentations should not exceed 20 Kbps. If you use the standard RealAudio settings, you get a 16 Kbps RealAudio clip, leaving just 4 Kbps for RealPix. That's inadequate for most slideshows. If you use the RealAudio multimedia settings, though, you get an 8.5 Kbps clip. That nearly triples the amount of bandwidth for RealPix to 11.5 Kbps.

At faster speeds, though, it's not always necessary to encode RealAudio at the multimedia rate for a multiclip presentation. Just make sure your RealAudio clip uses a lot of SureStream streams, and let each RealPlayer determine which stream to play. When clips play together, RealPlayer evaluates their separate requirements, assesses its own connection speed, and determines if it can juggle all the clips together. With a SureStream clip, RealPlayer automatically picks the highest bit rate stream it can handle while still keeping all the other balls in the air.

For example, suppose you have a RealPix clip at 12 Kbps. You could have it play in parallel with a RealAudio mono music clip encoded with the standard defaults for 28.8 Kbps and 56 Kbps modems. Table 2 shows that you get two audio streams, one at 20 Kbps and one at 32 Kbps. The combined RealPix and RealAudio presentation is too fast for a 28 Kbps modem. For a 56 Kbps modem, though, RealPlayer chooses the 20 Kbps RealAudio stream, putting the presentation at 32 Kbps (20 Kbps for RealAudio plus 12 Kbps for RealPix). Faster connections get the 32 Kbps RealAudio stream.

In some cases the multimedia defaults are the same as the standard defaults, so it doesn't matter which set of defaults you use. For DSL/cable modem connections, for example, mono music is recorded at 64 Kbps regardless of which defaults you use. The same is not true for stereo music with the 256 Kbps DSL/cable modem audience, though. The standard default is 176 Kbps while the multimedia default is 132 Kbps.

RealAudio, it's important to grasp, is the most inflexible media type in terms of bandwidth use. Bandwidth choices are in a stairstep model: 16 Kbps, 32 Kbps, 64 Kbps, and so on, with no in-between choices. So when you plan to use RealAudio in a multimedia presentation, decide which bandwidth or bandwidths you want the audio clip to use. Then create your other clips to stream within the bandwidth that's left.

Tip
Remember not to count on having the connection's full speed (such as 28.8 Kbps) available. Always use as your maximum the top speed given in Table 3.

Changing RealAudio Defaults

If you purchased RealSystem Producer Plus, you can choose exactly which RealAudio codec RealSystem Producer uses for any combination of audience and audio type. (This feature is unavailable with RealSystem Producer Basic.)

To change the defaults, choose Options>Target Audience Settings>for RealAudio Clips... to display the dialog shown in Figure 2. Click the Audio Only radio button to change the standard codecs, or the Multimedia Presentation button to change the codecs used for clips combined with other media. Next, select the connection speed in the Target Audience pull-down menu. The four pull-down menus in the remainder of the dialog let you set the target audience's codec for each type of audio:

Because you can change any RealAudio default codec choice, there's nothing immutable about the target audience and audio type combinations. When you encode a clip, selecting voice-only audio for 28.8 Kbps modems might give you a stereo music clip for DSL connections because you've changed the defaults. This makes changing the defaults a powerful tool, but also a potentially confusing one if you forget how you've adjusted codec selection. Keep in mind, too, that you can choose between two distinct sets of defaults by clicking either the Audio Only or the Multimedia Presentation radio button.

Tip
Click Restore Defaults to return all settings to their defaults. This affects both the standard and the multimedia default settings.

Additional Information
The statistics that RealSystem Producer shows after creating a clip help you verify that the clip is encoded the way you want. See Viewing Statistics.

Changing RealAudio Defaults for Different Bandwidths

The most obvious reason to change the RealAudio defaults is to modify the streaming speed for a certain target audience and audio type. This is most useful for multiclip presentations. You might not want to use RealAudio's reduced multimedia rates at higher connection speeds because the standard defaults leave plenty of bandwidth for other clips. (That's rarely true at slow speeds, though.) So you might leave the multimedia defaults for slow connection speeds at their presets, and use faster codecs for higher connection speeds.

Note
Always keep in mind the top streaming speed for connections as shown in Table 3.

Encoding High Response Music

The 20 Kbps, 32 Kbps, and 44 Kbps music codecs both come in two flavors. RealSystem Producer by default uses the "high response" versions, which are the better codecs for most situations. But you can also use the "normal response" versions. Table 4 lists the high response codecs and their normal response twins.

Table 4: RealAudio High and Normal Response Codecs
Codec Frequency Response
20 Kbps Music 10 kHz
20 Kbps Music-High Response 20 kHz
20 Kbps Stereo Music 5 kHz
20 Kbps Stereo Music-High Response 9.9 kHz
32 Kbps Music 16 kHz
32 Kbps Music-High Response 20 kHz
32 Kbps Stereo Music 8 kHz
32 Kbps Stereo Music-High Response 13.8 kHz
44 Kbps Stereo Music 11 kHz
44 Kbps Stereo Music-High Response 16 kHz

The high response codecs cover a larger frequency spectrum than the normal response versions. As you can see with the 20 Kbps codecs, the high response version has twice the range as the normal codec. This means it provides crisper sound and is better at capturing high frequencies. With symphonic music, for example, the high response codec gets more of the flute and piccolo. It can produce more distortion than the normal response codec with voices and loud sounds such as drums, though.

If you're encoding music with a diverse range of frequencies, stick with the high response codecs. If you notice distortion, compare your results with a clip that uses the normal response codecs. The best tool for determining which codec to use is your ear. Listen carefully for minute differences in how the clip sounds. It also helps to have other people listen. Our own ears have different frequency responses, too.

Using the New RealAudio 8 Stereo Codecs

RealSystem Producer version 8.5 contains an array of new audio codecs, all of which are optimized for stereo music. The RealAudio 8 codecs now allow you to stream high-quality stereo music at a wide range of bit rates.

This section describes the basic differences between the stereo and mono codecs, and it explains when to use the new RealAudio 8 codecs.

Stereo Music Basics

Take a look back at the mono and stereo music settings in Table 2. Until you get to the high speed connections, the mono and stereo bit rates are the same. What isn't the same, though, is the quality. Mono music has one channel that gets sent to both speakers. Stereo music has separate channels for the left and the right. That means a stereo version of an audio clip holds twice as much data as a mono version. Yet RealSystem Producer makes stereo and mono clips the same size. How can it do this?

The answer lies in the codecs' frequency responses. Remember, RealAudio is a lossy compression scheme that throws out data. The stereo codec squeezes both channels down to the same size as the mono codec by throwing out more data for each channel. This makes its frequency response lower. To put it simply, a stereo clip doesn't represent all frequencies as accurately as a mono clip. You'll hear the two channels, but they may not sound as crisp as a mono channel.

The lower frequency response is not necessarily a bad thing. If the frequency response of your music falls within the stereo codec's response range, the music quality is virtually unaffected and you get the benefit of using both stereo channels.

For stereo codecs at higher connection speeds, SureStream plays stereo clips when bandwidth is plentiful, and it plays mono when it's sparse. If the clip downshifts from high to lower speeds, the music shifts from stereo to mono, but the sound stays brighter.

Additional Information
Changing RealAudio Defaults explains how to change the default codec selections. RealAudio Codec Reference lists the frequency response of each codec.

Using RealAudio 8 Stereo Music Codecs

Before the new RealAudio 8 codecs existed, stereo music was primarily for high-bandwidth encoding. Only five different stereo codecs existed. But with RealAudio 8, you can now encode stereo music for all bandwidths, with 18 new codecs that range from 12 Kbps to 352 Kbps.

Stereo music steps into the limelight at higher bandwidths. The higher the streaming speed, the better the stereo frequency response. The stereo music codecs that range from 66 Kbps and up are called the ATRAC codecs. These ATRAC codecs, developed jointly by RealNetworks and Sony, were specifically created to create CD-quality stereo music for broadband and portable music users. Another advantage to using the ATRAC codecs is that they are also designed to be compatible with Sony products. For example, any music encoded with an ATRAC codec can be uploaded to and listened with a Sony portable music player.

Using Mono Codecs for Stereo Music

If a stereo clip sounds unclear, try encoding the audio source as a mono clip. RealSystem Producer is smart about the stereo-to-mono conversion. While some audio programs throw out a channel, RealSystem Producer blends the two channels into the mono channel. This is called "panning to the middle." Without panning, music recorded on only one channel might simply vanish from the recording!

Tip
If you're a pro, run the stereo-to-mono conversion in your audio editing program so you have full control over the result.

RealAudio Codec Reference

This section provides a reference for all RealAudio codecs used by RealSystem Producer, broken down into separate tables for voice, mono music, and stereo music codecs. There are no separate voice-with-music codecs. When you choose voice with music, RealSystem Producer uses a voice codec. Each table lists each codec's optimum sampling rate and frequency response.

Using a codec's optimum sampling rate in your audio source file ensures that the audio stays synchronized with other media and prevents pitch shifting in audio resampling. Audio quality degrades if you use lower than the optimum sampling rate. If you use a higher sampling rate, it is best to use a multiple of the optimum rate. If the optimum rate is 8 kHz, for example, use a higher rate of 16 kHz or 32 kHz. When in doubt, use a CD-quality sampling rate of 44.1 kHz.

The frequency response column lists the codec's frequency response in Kilohertz. A codec with a higher frequency response reproduces a wider range of sound than a codec with a lower response. A measure of codec quality, the frequency response does not affect how you produce audio. RealAudio encoding always results in a clip of equal or lower quality than the original audio. If the original audio has an 8 kHz frequency response, encoding it with a codec that has a frequency response of 10 kHz produces a clip that still has a response of 8 kHz.

Additional Information
The audio preparation chapter of RealSystem Production Guide has an expanded list that covers all RealAudio codecs, including obsolete codecs no longer used by RealSystem Producer.

Voice Codecs

RealSystem Producer uses a voice codec when you encode a voice-only or voice-with-music clip. The lowest-speed voice codec normally used with RealAudio is 16 Kbps. The lower-speed codecs are used as "duress" streams in SureStream clips. They're also used to encode soundtracks for low-bandwidth RealVideo clips.

Table 5: RealAudio Voice Codecs
RealAudio Codec Sampling Rate Frequency Response
5 Kbps Voice 8 kHz 4 kHz
6.5 Kbps Voice 8 kHz 4 kHz
8.5 Kbps Voice 8 kHz 4 kHz
16 Kbps Voice 16 kHz 8 kHz
32 Kbps Voice 22.05 kHz 11 kHz
64 Kbps Voice 44.1 kHz 20 kHz

Mono Music Codecs

As with the voice codecs, the lowest-speed mono music codec normally used with RealAudio is 16 Kbps. The lower-speed codecs are used as "duress" streams in SureStream clips, and to encode soundtracks for low-bandwidth RealVideo clips. When there are two versions of a codec, RealSystem Producer uses the high response version by default.

Table 6: RealAudio Mono Music Codecs
RealAudio Codec Sampling Rate Frequency Response
6 Kbps Music 8 kHz 3 kHz
8 Kbps Music 8 kHz 4 kHz
11 Kbps Music 11.025 kHz 5.5 kHz
16 Kbps Music 22.05 kHz 8 kHz
20 Kbps Music 22.05 kHz 10 kHz
20 Kbps Music-High Response 44.1 kHz 20 kHz
32 Kbps Music 44.1 kHz 16 kHz
32 Kbps Music-High Response 44.1 kHz 20 kHz
44 Kbps Music 44.1 kHz 20 kHz
64 Kbps Music 44.1 kHz 20 kHz

Stereo Music Codecs

The slowest stereo codec is 12 Kbps. Stereo codecs don't go lower than that because they would not have enough frequency response for adequate sound. In the following table, the new RealAudio 8 codecs are marked with RA8.

Table 7: RealAudio Stereo Music Codecs
RealAudio Codec Sampling Rate Frequency Response
12 Kbps Stereo Music, RealAudio 8 11.025 kHz 3.9 kHz
16 Kbps Stereo Music, RA8 22.05 kHz 4.3 kHz
20 Kbps Stereo Music 11.025 kHz 5 kHz
20 Kbps Stereo Music, RA8 22.05 kHz 8.6 kHz
20 Kbps Stereo Music-High Response, RA8 22.05 kHz 9.9 kHz
32 Kbps Stereo Music 22.05 kHz 8 kHz
32 Kbps Stereo Music, RA8 22.05 kHz 10.3 kHz
32 Kbps Stereo Music-High Response, RA8 44.1 kHz 13.8 kHz
44 Kbps Stereo Music 22.05 kHz 11 kHz
44 Kbps Stereo Music, RA8 44.1 kHz 13.8 kHz
44 Kbps Stereo Music-High Response, RA8 44.1 kHz 16 kHz
64 Kbps Stereo Music 44.1 kHz 16 kHz
64 Kbps Stereo Music, RA8 44.1 kHz 16 kHz
66 Kbps Stereo Music, RA8 44.1 kHz 12.4 kHz
94 Kbps Stereo Music, RA8 44.1 kHz 15.1 kHz
96 Kbps Stereo Music 44.1 kHz 16 kHz
96 Kbps Stereo Music, RA8 44.1 kHz 16 kHz
105 Kbps Stereo Music, RA8 44.1 kHz 13.7 kHz
132 Kbps Stereo Music, RA8 44.1 kHz 16.5 kHz
146 Kbps Stereo Music, RA8 44.1 kHz 16.5 kHz
176 Kbps Stereo Music, RA8 44.1 kHz 19.2 kHz
264 Kbps Stereo Music, RA8 44.1 kHz 22 kHz
352 Kbps Stereo Music, RA8 44.1 kHz 22 kHz


Copyright © 2001 RealNetworks
For information on RealNetworks' technical support, click here.
Comments on this document? Click here.
This file last updated on 04/10/01 at 16:17:57.
previous next