previous next

Chapter 4: Producing Audio

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. RealSystem G2 can stream other audio formats as well. This chapter explains how to prepare and encode your sound files for streaming.

Steps for Streaming RealAudio

To produce a great RealAudio clip, you need to use great source material, high-quality equipment, and good production practices. This section provides a quick overview of the steps involved in streaming a RealAudio clip.

Creating a RealAudio Clip

To create a streaming RealAudio clip, follow these basic steps:

  1. Capture audio.

    You start audio production by capturing audio from a source, such as a person speaking into a microphone. You might also start with a digitized audio source file from a compact disc, for example.

    Additional Information
    "Capturing Audio" provides guidelines for capturing audio.

  2. Optimize audio.

    With the audio file digitized in a common file format, such as WAV or AIFF, you next use a sound editor to optimize the audio for streaming. When broadcasting live, however, you encode the streaming audio directly from the source, optimizing the audio source during the capture.

    Additional Information
    See "Optimizing Audio" for tips on sound editing. For more on live broadcasting, read Chapter 11.

  3. Encode RealAudio clip.

    With your digitized file optimized or your live broadcast ready to go, you encode your source in the RealAudio format. When you do this, you choose a codec or set of codecs that target a network bandwidth.

    Additional Information
    "Creating RealAudio Clips" explains RealAudio and its codecs. As described in "Streaming Other Audio Formats", RealSystem G2 can stream other audio formats as well.

  4. Deliver RealAudio clip.

    With your presentation is ready to go, you make your RealAudio clip or broadcast available through your Website. To combine sound with another streaming clip, such as RealPix, you write a SMIL file.

    Additional Information
    Chapter 7 explains how to create a SMIL file. See Chapter 10 for instructions on linking your Web page to a RealAudio or SMIL file.

Capturing Audio

A streaming audio clip reflects the quality of the audio source. Degradations in sound quality within the audio source affect the final streaming audio clip. The following sections will help you capture high-quality audio source files or broadcasts.

Broadcasting live audio introduces several issues beyond those you need to consider when creating a standard clip. This is because you cannot edit a broadcast the way you can edit a digitized audio file. When broadcasting, though, you can set up your sound equipment to capture high-quality sound before encoding it.

Additional Information
For pointers on producing video, see "Recording Video".

Use High-Quality Source Media

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 disc (CD) and digital audio tape (DAT) 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.

Choose Professional Recording Equipment

Every piece of equipment in the audio chain-microphone, mixer, sound card, and so on-affects sound quality. If you intend to provide professional-quality audio content, invest in professional audio equipment and software. Poor-quality equipment can add hiss and distortion, degrading sound clarity.

Use Shielded Cables

It is important to use high-quality, shielded cables. Unshielded cables increase the chance of introducing line noise and Radio Frequency Interference (RFI) into recordings. Keep audio cables physically separated from power cords to minimize the introduction of noise. Also be sure to ground all equipment properly.

Set Input Levels Correctly

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. This distortion is known as "clipping," and 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 utilizes 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 dB without going over.

Check at each point in the signal chain for signal distortion. Perform several test runs and make sure there are no peaks above maximum amplitude. Adjust levels on your sound card mixer so 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.

Prepare Volume Levels for Live Broadcasts

When broadcasting live audio, it is useful to have a dynamics compressor (gain compression, not data compression), which is a piece of audio equipment that automatically adjusts the volume level. By providing a consistent level, the compressor allows you to "set and forget" the input levels to the RealAudio encoder.

Use Optimum RealAudio Sampling Rates

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 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 of converting the rate while encoding in real-time.

Additional Information
The tables below list the optimum sampling rates for each codec.

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 the conversion to mono loses nothing.

Optimizing Audio

If you are not broadcasting audio live, you work with a digitized audio source file in a supported format such as WAV, QuickTime, or AIFF. You then edit the audio file to optimize it. To do this, you need to be familiar with the editing functions your audio editing program offers. The following sections give some optimization tips you can carry out with your audio editing software.

DC Offset

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.

If your sound editing program allows it, eliminate DC offset during recording. This saves you an editing step.


Set sensible input levels when recording, then use normalization to maximize 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 utilize 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.

Most sound editors have a Normalize function that maximizes levels automatically. Because some systems have trouble with files normalized to 100%, normalize to 95% of maximum or to -0.5dB.

Dynamics Compression

Normalization maximizes the input 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 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.

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 around 3dB of compression and an output level around 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 frequencies 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 initial recording.

For voice-only content, you can make the file more intelligible by cutting frequencies below 100 Hz and carefully boosting frequencies in the 1-4 kHz range.

Creating RealAudio Clips

RealAudio is a compressed format suitable for streaming over the Internet or intranets. A RealAudio clip generally uses .rm as its file extension, but .ra is also acceptable. Because RealAudio is compressed, you typically start with a sound file in a digitized, uncompressed format such as WAV or AIFF. You then create a RealAudio clip from this source file through an encoding tool. Your encoding tool should be able to accept some or all of these input formats:

Choosing RealAudio Codecs

RealAudio uses a "lossy" compression scheme that discards parts of the audio source file to achieve a highly reduced file size. A RealAudio clip encoded from a WAV source file, for example, may be 10 to 20 times smaller than the WAV file. Although discarding audio information during encoding lowers the clip's frequency response and dynamic range, carefully choosing codecs minimizes the impact of compression.

A RealAudio encoding tool uses a codec to compress the original sound file and create a RealAudio clip. RealPlayer uses the same codec to decompress the streamed RealAudio clip for playback. When you encode a RealAudio clip, you choose a codec (or series of codecs) based on two criteria:

  1. Bandwidth

    As Chapter 3 explains, you need to decide how much bandwidth each part of your presentation will consume. When you have a bandwidth target for your audio component, you can choose a codec that encodes RealAudio at or below that target.

  2. Audio Content

    RealAudio uses different codecs for music and spoken voice. Voice codecs focus on the standard frequency range of the human voice. Music codecs have broader frequency response to capture more of the high and low frequencies.

The following tables provide a reference for all RealAudio codecs. Note that your encoding tool may not include all codecs listed. The tables give the following information:

RealAudio Low Bandwidth Codecs
RealAudio Codec G2 5 4 3 2 1 Rate Resp. Comments
5 Kbps Voice X X - - - - 8 kHz 4 kHz Lowest bit rate for speech or speech with background music.
6.5 Kbps Voice X X X - - - 8 kHz 4 kHz Low bit rate for speech or speech with background music.
6 Kbps Music-G2 Mono X - - - - - 8 kHz 3 kHz Use with SureStream clips.
8 Kbps Voice X X X X X X 8 kHz 4 kHz Original voice codec. Superseded by 8.5Kbps Voice.
8 Kbps Music-G2 Mono X - - - - - 8 kHz 4 kHz Use with SureStream clips.
8 Kbps Music X X X - - - 8 kHz 4 kHz DolbyNet codec.
8.5 Kbps Voice X X X - - - 8 kHz 4 kHz High-quality voice codec for voice or voice with background music.
11 Kbps Music-G2 Mono X - - - - - 11.025 kHz 5 kHz Use with SureStream clips.
12 Kbps Music X X X - - - 8 kHz 4 kHz DolbyNet codec.

RealAudio Medium Bandwidth Codecs
RealAudio Codec G2 5 4 3 2 1 Rate Resp. Comments
15.2 Kbps Voice X X X X X - 8 kHz 4 kHz Superseded by 16 Kbps Voice codec.
16 Kbps Voice-Mono X X - - - - 16 kHz 7 kHz High-quality wideband for voice or voice with background music.
16 Kbps Music-G2 Mono X - - - - - 22.05 kHz 8 kHz Use with SureStream clips.
16 Kbps Music-Mono Low X X X X - - 8 kHz 4 kHz DolbyNet codec. Low response.
16 Kbps Music-Mono Medium X X X X - - 11.025 kHz 4.7 kHz DolbyNet codec for pop/rock music. Medium response.
16 Kbps Music-Mono High X X X X - - 11.025 kHz 5.5 kHz DolbyNet codec for classical music. High response.
20 Kbps Music-G2 Mono X - - - - - 22.05 kHz 10 kHz Use with SureStream clips.
20 Kbps Music-G2 Stereo X - - - - - 11.025 kHz 5 kHz Use with SureStream clips.
20 Kbps Music-Stereo X X X X - - 8 kHz 4 kHz DolbyNet codec.

RealAudio High Bandwidth Codecs
RealAudio Codec G2 5 4 3 2 1 Rate Resp. Comments
32 Kbps Voice-G2 Mono X - - - - - 22.05 kHz 11 kHz Use with SureStream clips.
32 Kbps Music-G2 Mono X - - - - - 44.1 kHz 16 kHz Use with SureStream clips.
32 Kbps Music-G2 Stereo X - - - - - 44.1 kHz 8 kHz Use with SureStream clips.
32 Kbps Music-Mono X X X - - - 16 kHz 8 kHz DolbyNet codec.
32 Kbps Music-Stereo X X X - - - 11.025 kHz 5.5 kHz DolbyNet codec.
40 Kbps Music-Mono X X X X - - 22.05 kHz 11 kHz DolbyNet codec.
40 Kbps Music-Stereo X X X X - - 16 kHz 8 kHz DolbyNet codec.
44 Kbps Music-G2 Mono X - - - - - 44.1 kHz 20 kHz Use with SureStream clips.
44 Kbps Music-G2 Stereo X - - - - - 44.1 kHz 11 kHz Use with SureStream clips.
64 Kbps Voice-G2 Mono X - - - - - 44.1 kHz 20 kHz Use with SureStream clips.
64 Kbps Music-G2 Mono X - - - - - 44.1 kHz 20 kHz Use with SureStream clips.
64 Kbps Music-G2 Stereo X - - - - - 44.1 kHz 16 kHz Use with SureStream clips.
80 Kbps Music-Mono X X X X - - 44.1 kHz 20 kHz DolbyNet codec.
80 Kbps Music-Stereo X X X X - - 32 kHz 16 kHz DolbyNet codec.
96 Kbps Music-G2 Stereo X - - - - - 44.1 kHz 24 kHz Use with SureStream clips.

Encoding RealAudio with RealSystem Tools

When you encode RealAudio clips with a RealSystem G2 encoding tool, you simply set parameters such as audio type (voice or music) and compatibility with earlier versions of RealPlayer. You can also specify multiple bandwidth targets for the clip, such as both 28.8 Kbps modems and ISDN connections. The tool then chooses the best codec or codecs to use. The following sections give tips on using RealSystem tools.

Additional Information
See the tool's manual or online help for step-by-step instructions on encoding RealAudio. RealSystem encoding tools are available for purchase or free download at

Not all RealSystem tools may include the features described here. Check the product description or documentation for information on supported features.

Retain Source Files

Always keep a copy of the original audio source file. To edit the RealAudio clip or encode it with a different codec, modify the source file as necessary, then encode the file again as RealAudio. You cannot convert RealAudio clips to other audio formats.

Using RealAudio in a MultiClip Presentation

When you encode a RealAudio clip, consider whether it will play in parallel with another clip such as a RealPix. If you target 28.8 Kbps modems when encoding, for example, the tool may select a 20 Kbps codec, leaving no bandwidth for the second clip. Make sure you specify that the RealAudio clip is just one part of the presentation. The tool then lets you choose a lower bandwidth codec, such as 8 or 12 Kbps.

Multiple Encoding in a Single SureStream Clip

You can create a single RealAudio clip encoded for up to six bandwidths with SureStream technology introduced in RealSystem G2. You can also specify backwards compatibility with earlier versions of RealPlayer. The encoding tool then encodes the clip for your selected bandwidths with the new RealAudio G2 codecs. It also includes in the clip an encoding that uses an older codec and targets the lowest bandwidth choice.

For example, you can encode a single clip at 8, 16, and 32 Kbps using RealAudio G2 codecs. In the RealSystem encoding tool, you choose backwards compatibility to create an additional 8 Kbps stream with an older codec. Depending on its connection speed, RealPlayer G2 receives the 8, 16, or 32 Kbps RealAudio G2 stream. Earlier versions of RealPlayer receive the 8 Kbps stream encoded with the older codec regardless of their connection speeds.

To support multiple bandwidths with codecs other than RealAudio G2 codecs, you must encode a separate clip with each codec. You then use SMIL to specify bandwidth choices. For more on bandwidth selection through SMIL, see "Setting Bandwidth Choices".

Batch Encoding

Your encoding tool may have a batch mode that lets you encode several clips at once. The batch encoder may run through a command-line interface or a graphical user interface.

Streaming Other Audio Formats

RealSystem can stream several audio formats in addition to RealAudio. The following table lists the streamable formats and shows whether RealPlayer G2 for different operating systems (Windows 95 or NT, Macintosh, and UNIX) can play the audio. RealSystem typically does not stream audio formats that have been compressed with a codec. Where codec compression is supported, codecs are not included with RealPlayer G2 and must reside on the playback machine already.

Streamable Audio Formats
Format Codec compression Win32 Mac UNIX
AIFF (.aif) uncompressed yes yes yes
AU (.au) uncompressed yes yes yes
WAV (.wav) compressed yes no no
uncompressed yes yes yes

RealSystem plug-ins may exist for additional audio formats. Check for information about other audio formats you can stream.

Tips for Streaming other Audio Formats

Observe the following points when streaming audio formats other than RealAudio:

Copyright © 1998 RealNetworks
For information on RealNetworks' technical support, click here.
Comments on this document? Click here.
This file last updated on 12/18/98 at 14:36:30.
previous next