News GoLive Help and Tutorials HTML Help and Tutorials JavaScript Help and Tutorials Links, Files, and Resources Contact and Contribution Info
 
   
GoLive Tutorial
Adding Streaming RealAudio/Video

Adding streaming RealAudio/Video to your site

Adding audio and video to you site is one of the best ways to create interest in your site and to create repeat visits. Adding RealAudio or RealVideo to your site is also really quite simple. And - maybe most important - your visitors will really appreciate how quickly RealAudio/Video starts to play because they don’t have to wait for it to download.

This tutorial will NOT cover how to encode the audio/video file. It is assumed that you have a previously encoded file that you want to include on your site. We’ll cover adding the .ra and .ram files to a site and page and how to properly write the .ram "text file." Also, writing links to the correct (and correctly named) file, etc. Also, you will find source links for further study at the bottom of this page.

It is well worth noting that this tutorial will be on how to do HTTP streaming...no Real Server needed!! This type of streaming can be done for free from virtually any server that hosts web pages. Note that RealAudio files can be quite large and if lots of people listen you may incur charges from your web host for high usage. Check with your host for any limitations.

Let's Get Started

There are two key files needed to make RealAudio/Video actually stream:

  1. an encoded file
  2. a text file

First you’ll want to locate your encoded audio file and have it in view. Then open your site window in Cyberstudio or GoLive. Drag the encoded file onto your Site Window at the root level. As an example, we’ll now have a file called “realencodedfile.ra” in the site folder at the root level. (If your encoded file has a .rm on the end, I suggest you change it to .ra - just changing that one letter in the name seems to make it more “backwards compatible” with older RealPlayer versions.)

(Note: I usually locate my encoded audio files at the root level of my Web site, and I suggest you do the same. In other words, put the encoded file in the same folder as your “www.yourdomain/index.html” page. I’ll explain why below. If you are very familiar with hand writing the path to another folder, you can ignore this suggestion and place the encoded file wherever you like. The actual web page(s) that we’ll create with the links to this file can be anywhere on your site.)

Next, you will create a new blank page. You can do this by dragging the Generic Page icon from Site Tab of the Palette to the Site Window.

In this example we’ll name it “textfile.ram”. Notice that I changed the entire name of this file. It is no longer an html file. This is a plain text file. Name it anything you like, but be sure to have the .ram on the end instead of .html.

Double click on “textfile.ram” to open it, and the first thing you’ll do is select ALL of the html text and delete ALL of it. Now you’ll carefully type a single line of text like this:

pnm://www.yourdomain.com/realencodedfile.ra

(Notice this is a standard URL format, but uses “pnm” instead of “http” at the beginning)

You will replace “www.yourdomain.com” with your actual domain name. And replace “realencodedfile.ra” with the actual name of your encoded file. And this is why I suggested you place the encoded file at your root level. It's a lot easier to write this URL if it's at the root level of your site. This line of text always has to be hand typed. You cannot “Point and Shoot” this. The above line of text is actually the full URL - written in RealAudio language - of your encoded file. On your actual web page, the link you create will be to this text file. Then this single line of text tells RealAudio where to look for the actual encoded file. I know this can be a bit confusing, but that’s how RealAudio works.

Be sure to save the changes to this “textfile.ram”, and then close the window.

Now for the easy part!! Now open the web page that will point your visitors to your audio/video file.

Select the text that will be the link your visitors will click on for the audio file. Now Point and Shoot to the “textfile.ram” (NOT to the “realencodedfile.ra”) to create the link. Save the changes to this page.

Believe it or not - you’re done. All that’s left is to upload these changes and new files to your site and test to make sure it’s working properly.


Troubleshooting: If you click on the link on your Web site and the audio/video file starts to download to your hard drive instead of starting to stream, then the link on your page points to the encoded file instead of the text file. Try changing the link and see if it streams.

Here’s a cool trick in case you want to stream two or more encoded files one right after the other. Just write the “textfile.ram” like this:

pnm://www.yourdomain.com/realencodedfile1.ra
pnm://www.yourdomain.com/realencodedfile2.ra
pnm://www.yourdomain.com/realencodedfile3.ra

Just write each of the file names on a separate line. This can be used to stream several files in a row. Sometime this is used when a short introduction or announcement is desired before the main audio clip.

Good luck, and have fun with your next RealAudio project.

  
If you have any questions, corrections, or suggestions on how to improve it, you may e-mail him at rich@planetmango.com.

Rich is a freelance web designer. Currently he is a broadcaster and volunteer webmaster for KVMR-FM in Nevada City, CA and is working on a project to get this community radio station broadcasting live on the internet sometime in May 1999. Stop by and listen to one of the best radio stations on the Internet. Rich plays traditional Hawaiian music Sunday mornings from 9 to 11 AM Pacific time.

Further Study:

The WebDeveloper.com Secret Guide to RealAudio
Produce Streaming Audio That Satisfies
RealAudio/Video Content Creation and Programmer's Guide


Back to GoLive Tutorials

Design and Content ©1999 WebDawn Multimedia. View our Copyright Notice.
Send Comments and Feedback to the WebMaster.