RealNetworks pioneered streaming audio with RealAudio, the first streaming media product for the Internet. Since its debut in 1995, RealAudio has become the standard for network audio, delivering stereo sound over 28.8 Kbps modems and CD-quality sound at high connection speeds. This chapter gives pointers on how to prepare and encode your sound files for streaming.
Because RealAudio clips are compressed, you typically start with a sound file in a digitized, uncompressed format such as WAV or AIFF. Using a RealAudio encoding tool, you create a RealAudio clip from the source file. RealAudio clips use the file extension .rm, although older clips may use .ra instead. This section explains how RealAudio encodes an audio file for streaming. This knowledge will help you produce high-quality streaming clips.
One way that RealAudio squeezes an audio file's size down is by throwing out nonessential data. This makes it a lossy compression format. RealAudio doesn't delete data indiscriminately, though. It first jettisons portions you cannot hear, such as very high and very low frequencies. Next, it removes as much data as needed while keeping certain frequencies intact. Voice encoding favors frequencies in the normal human speaking range. Music encoding retains a broader frequency range.
Although RealAudio is savvy about what audio data it throws out, be aware 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 sound quality rivals that of CD playback. When creating RealAudio clips for low bandwidths, it's important to start with high-quality input, as described in "Capturing Audio", to attain good sound quality.
You create a RealAudio clip by using one or more RealAudio codecs. A codec is a coder/decoder. It tells an encoding tool how to turn audio source files into RealAudio clips. On the receiving end, RealOne Player uses codecs to expand clips into audio data the computer can play. RealAudio employs a series of codecs, each of which creates an audio stream for a precise bandwidth. One codec compresses mono music for a 28.8 Kbps modem. Another one compresses stereo music for that same modem speed. This set of codecs is different from the set used to compress music for, say, DSL and cable modem connections.
A RealAudio clip consumes bandwidth at a flat rate determined by the codec used to encode the clip. A RealAudio clip encoded with a 20 Kbps codec, for example, steadily consumes 20 Kbps of bandwidth as it plays. The following table lists the standard bit rates for RealAudio clips encoded for specific target audiences by Helix Producer. Encoding a voice-only audio file for a 28.8 Kbps modem, for example, creates a 16 Kbps streaming clip. With mono music input, though, you get a 20 Kbps clip.
In terms of bandwidth use, RealAudio is the most
inflexible media type. The
RealAudio codecs set streaming bit rates in a stairstep model: 20 Kbps, 36
Kbps, 44 Kbps, and so on, with no inbetween choices. Because RealAudio clips
always stream at specific bit rates, consider their bandwidth needs first when
you use them in multiclip presentations. Then create your other clips to
stream within the bandwidth that's left.
![]() |
Note: With SureStream technology, a single RealAudio clip can stream at many different speed. For the basics of SureStream, see "SureStream RealAudio and RealVideo". |
This section discusses the RealAudio codecs used by Helix Producer. The codecs are listed in separate tables for voice, mono music, and stereo music. Voice codecs focus on the standard frequency range of the human voice. Music codecs have broader frequency responses to capture more high and low frequencies.
The tables list each codec's optimum sampling rate. Using a codec's optimum sampling rate in your audio source file ensures that the audio stays synchronized with other media in the presentation. It also prevents pitch shifting in audio resampling. Audio quality degrades if you use less than the optimum sampling rate. If you use a higher 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 the CD-quality sampling rate of 44.1 kHz.
![]() |
Note: RealProducer 8.5 and Helix Producer can also take audio input sampled at a rate of 48 kHz, which is commonly used with digital video discs (DVD) and digital audio tape (DAT). Helix Producer automatically resamples the input to the optimum rates for the selected RealAudio codecs. |
Voice codecs are for voice-only clips. The lowest-speed voice codec normally used to encode a RealAudio clip streams data at 16 Kbps. The lower-speed codecs (5, 6.5, and 8.5 Kbps) are used as SureStream duress streams that RealOne Player downshifts to if the connection bandwidth drops. They're also used to encode soundtracks for low-bandwidth RealVideo clips.
RealAudio Codec | Sampling Rate |
---|---|
5 Kbps Voice | 8 kHz |
6.5 Kbps Voice | 8 kHz |
8.5 Kbps Voice | 8 kHz |
16 Kbps Voice | 16 kHz |
32 Kbps Voice | 22.05 kHz |
64 Kbps Voice | 44.1 kHz |
As with the voice codecs, the lowest-speed mono music codec normally used with RealAudio streams data at 16 Kbps. The lower-speed codecs (6, 8, and 11 Kbps) 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, Helix Producer uses the higher-response version by default.
RealPlayer G2 or later can play the stereo codecs listed in the following table. These stereo codecs do not stream slower than 20 Kbps because, if they did, they would not have enough frequency response for adequate sound.
RealAudio 8 introduces new stereo music codecs that greatly enhance sound quality, especially over high-speed connections. Only RealPlayer 8 and later can play RealAudio 8 clips. Users with RealPlayer G2 and RealPlayer 7 are prompted to upgrade to the latest version of RealOne Player before listening to a RealAudio 8 clip. When there are two versions of a codec, Helix Producer uses the higher-response version by default. These codecs are also used to encode voice-with-music clips.
The RealAudio Surround codecs preserve the matrixed multi-channel surround audio in conventional "surround sound" audio. Surround audio can consist of four sound channels (left, right, left surround, and right surround) or 5.1 channels (additional subwoofer and center) that are mixed into the two conventional left and right stereo channels. To play RealAudio clips encoded with these codecs, your viewers need RealOne Player or later, and an A/V receiver equipped with surround sound decoding.
The following tables list older RealAudio codecs that became obsolete with
RealPlayer G2. Some of these codecs are still used for compatibility with
RealPlayer 5, though. RealPlayer G2 and later can play any clips encoded with
these codecs. An "X
" in the 5, 4, 3, 2, or 1 column indicates that a clip encoded
with this codec can be played by that version of RealPlayer.
RealAudio Codec | 5 | 4 | 3 | 2 | 1 | Sampling Rate |
---|---|---|---|---|---|---|
8 Kbps Voice | X |
X |
X |
X |
X |
8 kHz |
15.2 Kbps Voice | X |
X |
X |
X |
|
8 kHz |
To produce a great streaming audio clip, you need to use great source material, high-quality equipment, and good production practices. This section surveys the steps involved in streaming an audio clip.
![]() |
To create a streaming audio clip, follow these basic steps: |
You start audio production by capturing audio from a source, such as a person speaking into a microphone. You might also start with an audio source file from a compact disc, for example.
![]() |
For More Information: "Capturing Audio" provides guidelines for capturing audio. |
With the audio file digitized in a common file format such as WAV or AIFF, you can use a sound editor to optimize the audio file for encoding as a streaming clip. When broadcasting live, however, you encode audio input directly from the source, optimizing the audio during capture.
![]() |
For More Information: See "Optimizing Audio" for tips on editing sound. |
With your digitized file optimized or your live broadcast ready to go, you encode your source file in a streaming format, such as RealAudio. When you do this, you choose one or several streaming bandwidths based on your target audiences.
![]() |
For More Information: "Encoding RealAudio with Helix Producer" provides encoding tips. |
When your presentation is ready to go, you make your audio clip or broadcast available through your Web site. To combine an audio clip with another streaming clip, such as a RealPix clip, you write a SMIL file.
![]() |
For More Information: Chapter 8 explains SMIL. See Chapter 21 for instructions on linking your Web page to a clip or a SMIL file. |
A streaming clip reflects the quality of its audio source. Any quality problems within the source will affect the streaming clip as well. Because you cannot edit a broadcast, live Webcasting introduces several issues beyond those involved with delivering on-demand clips. This section will help you capture high-quality audio source files, or set up your sound equipment to deliver good broadcasts.
If you plan to stream existing material, start with the best source possible. Use the cleanest recording with the least amount of unwanted noise. Compact discs (CDs) and digital audio tapes (DATs) are good source media, although well-recorded analog sources such as records, reel-to-reel tapes, and chrome (type II) cassettes can sound just as good. Try to avoid consumer-grade recording media such as Type I cassettes and VHS tapes.
Every piece of equipment in the audio chainmicrophone, mixer, sound card, and so onaffects sound quality. If you intend to provide professional-quality audio content, invest in professional-quality audio equipment and software. Lesser equipment can add hiss and distortion, degrading sound clarity.
It is important to use high-quality, shielded cables. Using unshielded cables increases the likelihood of introducing line noise and radio frequency interference into recordings. Keep audio cables physically separated from power cords to minimize the introduction of noise. Also be sure to ground all equipment properly.
Setting correct input levels is crucial. All audio equipment has a signal-to- noise ratio, the ratio between the loudest possible sound the equipment can reproduce without distortion and its inherent "noise floor." Also called "clipping," distortion of this type is audible as a high-frequency crackling noise.
To get the best signal-to-noise ratio, set the input level on each audio device in the signal chain so that it uses its full range of available amplitude without distortion during the program's loudest sections. The signal chain typically includes a microphone, a mixing desk, a compressor, and a sound card. For each piece of equipment, set levels as close as possible to 0 decibels without going over that level.
Check for signal distortion at each point in the signal chain. Perform several test runs, and make sure that there are no peaks above maximum amplitude. Adjust the levels on your sound card mixer so that the input approaches but does not exceed the maximum. Be conservative, though. Levels might suddenly increase if, for instance, an interviewee suddenly speaks loudly or a crowd at a sports event roars.
When broadcasting live audio streams, it is useful to have a dynamics compressor for gain compression (not data compression). This piece of audio equipment automatically adjusts the volume level. By providing a consistent volume level, it allows you to "set and forget" the input levels to Helix Producer.
Try to capture sound with a sampling width of 16 bits. RealAudio codecs have different sampling rates that produce the best sound, however. If your sound card allows it, capture audio content at the optimum sampling rate for the codec you intend to use. The RealAudio encoder will convert the file to the optimum rate if necessary, but this is recommended only for static files. For live broadcasts, use a sound card that supports the optimum rate. This avoids the overhead entailed in converting the rate while encoding sound in real time.
![]() |
For More Information: "RealAudio Codecs" lists the optimum sampling rates for each codec. |
![]() |
Tip: You do not need to capture stereo sound if you plan to use a mono codec. However, many sound cards simply discard the right input channel in mono mode. If you have a mixing desk, pan all inputs to the center so that nothing is lost during the conversion to mono. |
If you are not broadcasting audio live, you work with digitized audio source files in supported formats such as WAV or AIFF. You then edit the audio files to optimize them. To do this, you need to be familiar with the features your editing program offers. This section gives you some optimization tips you can try with your editing software.
![]() |
Tip: Always keep copies of your audio source files. You cannot convert RealAudio clips back to their original source formats. |
DC offset is low-frequency, inaudible noise that results from equipment grounding problems. If you don't remove it, it can skew the results of subsequent sound editing. Use your sound editor's DC Offset function immediately after recording a digital audio file.
![]() |
Tip: If your editing program has this option, remove DC offset during recording. This eliminates an editing step. |
Set sensible input levels when recording, and then use normalization to maximize the levels after recording. Your streaming files sound best when your digitized source has the highest possible gain without clipping. Digital audio files that do not use their full amplitude range produce low-quality streaming clips. If the amplitude range is too low, use your sound editor to adjust the range and increase the amplitude.
![]() |
Tip: Most sound editors have a Normalize function that maximizes levels automatically. Because some systems have trouble with files normalized to 100 percent, normalize to 95 percent of maximum, or to -0.5dB. |
Normalization maximizes the volume level of the audio file's loudest sections. Consequently, quiet sections may not encode as well. Dynamics compression evens out input levels by attenuating (turning down) the input when it rises above a specified threshold. Check your audio software for a Compression or Dynamics feature. You can control attenuation by specifying a compression ratio. This turns down the loudest sections, and you can readjust input levels accordingly.
![]() |
Tip: For multipurpose dynamics compression, set the threshold to -10dB, the ratio to 4:1, and the attack and release times to 100ms. Adjust the input level to get approximately 3dB of compression and an output level of about 0dB. |
Equalization (EQ) changes the tone of the incoming signal by "boosting" (turning up) or "cutting" (turning down) certain frequencies. Using EQ, you can emphasize certain frequencies and cut others that contain noise or unwanted sound. EQ can compensate for RealAudio codecs that do not have flat frequency responses (that is, codecs for which certain frequencies are not as loud after encoding). You can therefore use EQ to make a RealAudio clip sound as close as possible to the source recording.
![]() |
Tip: For voice-only content, you can make the file more intelligible by cutting frequencies below 100 Hz and carefully boosting frequencies in the 1 to 4 kHz range. |
To produce RealAudio clips, you start with audio input from a live source, a digitized file, or media such as a tape or CD. You then encode a RealAudio clip from this input by using a RealAudio encoding tool. Some sound-editing programs can create RealAudio clips. But the most widely used tools for encoding RealAudio are Helix Producer Basic (a free product) and Helix Producer Plus, which are available from RealNetworks at:
http://www.realnetworks.com/products/producer/info.html
Helix Producer on Macintosh accepts the formats widely used on that platform, whereas Helix Producer on Windows and Unix supports the formats widely used on those platforms. Check the Helix Producer manual for your operating system for a list of accepted formats, which may include:
When you encode audio clips with Helix Producer, you select the target audiences you want to reach, such as 56 Kbps modem users. You also indicate the audio type, whether voice or music. Helix Producer then determines which RealAudio codecs are best to use. Helix Producer uses SureStream technology to encode the RealAudio clip so that it streams well for all your bandwidth choices, requiring only a few seconds of preroll when RealOne Player users request the clip.
![]() |
For More Information: Refer to the Helix Producer user's guide or online help for step-by-step instructions for encoding RealAudio. |
![]() |
Tip: Helix Producer Plus, which you can purchase and download from http://www.realnetworks.com/products/producer/index.h tml, installs a bandwidth simulator in RealOne Player that you can use to test different streaming speeds for a SureStream RealAudio clip streamed by Helix Universal Server. |
![]() |
Note: RealAudio encoding tools other than Helix Producer may not include all the features described in the following sections. |
If your RealAudio clip will be played along with another clip, you may need to change Helix Producer's default codec selection by adjusting the RealAudio target audience settings. Encoding mono music for 28.8 Kbps modems usually entails a 20 Kbps codec, for example, leaving no bandwidth for the second clip. Helix Producer has a set of multimedia defaults, though, that lower the clip's bandwidth. With these defaults turned on, Helix Producer encodes the mono music clip at 8 Kbps, leaving 12 Kbps of bandwidth for the second clip.
![]() |
©2002 RealNetworks, Inc. All rights reserved.
For more information, visit RealNetworks Click here if the Table of Contents frame is not visible at the left side of your screen. |