oreilly.comSafari Books Online.Conferences.


Streaming Media With Linux
Pages: 1, 2, 3, 4, 5, 6

Common streaming audio formats and players

Uncompressed CD-quality WAV and AIFF files are too large to stream over the Internet for playback in real time. Instead, lighter-weight compressed formats such as MP3 and RealAudio are employed for streaming network audio. These formats use what are called "lossy" compression schemes, reducing file sizes by eliminating certain inaudible data from the original files without too significantly degrading playback sound quality. MP3 and RealAudio are excellent streaming formats, achieving performance factors great enough to allow real-time encoding/decoding over current network bandwidth conditions while delivering satisfying audio quality.

MP3 and RealAudio are not the only players in the network streaming audio arena. We'll also look at Macromedia's Flash and the Ogg Vorbis project from the Xiphophorus group. Since RealAudio's Internet history begins the earliest, we'll start with RealAudio.


In 1995, Progressive Networks (now RealNetworks) introduced RealAudio, the Internet's first widely-deployed streaming audio format. The RealAudio player (RealPlayer) was freely distributed to users who at that time were typically connected to the Internet via low-bandwidth modems; thus, the player supported connection rates as low as 14.4 Kbps, which delivered audio quality comparable to the sound of a decent AM radio. Faster connections such as ISDN accordingly improved reception speed and sound quality.

By giving away basic versions of RealPlayer and the RealProducer content-production utility, Progressive Networks seeded the market for their commercial product line and sparked an explosion in network multimedia. Today you can find an astonishing number and variety of RealAudio-enabled sites. As a curious example, I searched Google for "realaudio history", hoping to find some background material on the format; instead, I found thousands of sites dedicated to various historical topics, all of which included audio presentations requiring RealPlayer.

RealPlayer Basic tuned in to
Figure 1. RealPlayer Basic tuned in to

RealPlayer: RealAudio in X

Happily, RealPlayer is available for Linux, and you can retrieve it for free as either an RPM or tarball package from the downloads page. Installation is fairly straightforward, but there are a few snags to report. Close your web browser before installing the software, then become the root user and run the installation package. The RPM file needs to be renamed:

mv rp8_linux20_libc6_i386_cs1_rpm rp8.linux20.libc6.i386.cs1.rpm

before installing it (as root) with this command:

rpm -i rp8.linux20.libc6.i386.cs1.rpm

The tarball must have its permissions set (as root again):

chmod u+x rp8_linux20_libc6_i386_cs1.bin

Now you can run the installation package:


The installation procedure will automatically set up RealPlayer as a helper application in Netscape, but be forewarned: It will also overwrite any custom settings you have for audio formats such as WAV, AIFF, and AU, so you may want to back up your Netscape preferences before installing RealPlayer. Also, the installation will not automatically update the RealAudio plug-in. Close Netscape, copy the file from your new $HOME/RealPlayer directory to $HOME/.netscape/plugins, fire up Netscape again, and your RealAudio plug-in should now be enabled. Check the Help/About Plugins menu item in Netscape for a status report.

TRPlayer: RealAudio for the console

At least three RealAudio players are available for the Linux console. They all depend upon an existing installation of RealPlayer and act as wrappers for RealPlayer, making its functions available to console applications. The RAP and RaWrapper players require support for the frame-buffer device; I wanted to avoid the need for any special graphics support (such as SVGA, frame-buffer, or ncurses) in my console RealAudio player, so I chose Matthew Campbell's TRPlayer.

TRPlayer is available as a binary in RPM and DEB packages, but I chose to build the latest beta version (2.0.b2) from the source tarball. TRPlayer's only unique requirement is the slang library and header. Fortunately, slang is found on most mainstream Linux distributions, and a straightforward ./configure; make should have your player ready to rock. However, due to the filesystem vagaries of Linux distributions your build may fail with this message: slang.h: No such file or directory
make: *** [main.o] Error 1

If so, change this line in

#include <slang.h>

to this line:

#include <slang/slang.h>

and recompile.

When the build is complete, become root (su root), run make install, and you will have a new command-line RealAudio player. You can call it from the prompt at the console or in xterm, invoking it with an address linking the player to the RealAudio stream:


You now have streaming RealAudio at the Linux console. Cool...

Reality check

RealNetworks deserves praise for maintaining and steadily improving a freely available RealPlayer for Linux, particularly since there's no other way to enjoy all those RealAudio-empowered sites. Harder-core users and developers might be dismayed to learn that Real's software is available only in binary format and that source code is not freely available. Nevertheless, there's only one place to go for RealPlayer, so if you want it, there you go.

Now let's look at that other major streaming audio format, the notorious MP3.

Pages: 1, 2, 3, 4, 5, 6

Next Pagearrow

Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: