Scott Crevier's General Help Resource HomeSearchPrint
Q4030: What's the best way to link to my RealAudio files?

-
Document # -
Fri 05-Jul-2002 2:12pm -

Background

Many web sites go through the trouble of creating RealAudio content for their visitors, but then when actually linking to those RealAudio files, they make a big mistake.

First the main advantage of RealAudio content is that it's streaming. This means that the music is actually downloading as the visitor is listening. This whole concept was created because it was just too much of a pain for a visitor to have to wait to download a large wav file before they could listen to it.

As an example, let's say you have a 30-second song sample in a wav file, and another wav file which contains a complete 3 minute song. Obviously, a visitor is going to have to wait much longer to listen to the complete song than the sample, because the wav file is much larger and therefore takes longer to download. But if you offer both of these in RealAudio streaming format, the music would start playing just a couple of seconds after the visitor clicks the link, regardless of how long the song is.

The Problem

So, back to the question at hand. Most RealAudio sound files have the ".rm" extension on the filename. If you link directly to this ".rm" file in your web page, then the music will NOT be streaming. This means that the user will have to download the entire ".rm" file before the music starts to play. This defeats the purpose of having streaming audio. The good news is that the fix is very simple.

The Solution

Let's assume you've got a file called StarSpangledBanner.rm. To make that song download in streaming mode, just create a corresponding file called StarSpangledBanner.ram. Note that this filename has the ".ram" extension. This is a simple text file that contains only one line. And that line should be the full URL to your ".rm" file. So, the ".ram" file would contain something like this:

http://www.gq4.org/anthem/StarSpangledBanner.rm

Put this new ".ram" file on your web site, and in your web page, link to the ".ram" file instead of the ".rm" file. Now, when you click the link, the RealAudio player will start up immediately, and the song will start playing while the file downloads.

Extra

If you want to try something else, create another file on your web site called "AllSongs.ram". In this file, put the URL to all of your ".rm" files, one per line. Something like this:

http://www.gq4.org/songs/song1.rm
http://www.gq4.org/songs/song2.rm
http://www.gq4.org/songs/song3.rm
http://www.gq4.org/songs/song4.rm

Then put a link to 'AllSongs.ram" on your web page. Now, when you click on this link you'll be able to control your song selection from within the RealAudio program.

Tue 10-Jun-2003 CST
Scott Crevier • De Pere, Wisconsin, USACopyright © 2010
Scott Crevier scott@crevier.info
www.crevier.info
-