Home : Video : Formats : RealMedia : Streaming

Streaming Video with Real Media

Hyperlinks to RealMedia Files

There are two ways to link to RealMedia files. The first is to make a hyperlink directly to the video file - in this case the whole file will be downloaded before viewing (i.e. it will not stream). Use this method if you specifically want this outcome. For example:

<a href="video01.rm">Click here to download video</a>

To make the video stream you actually need to create another file - a simple text file with a .ram extension. This is known as a metafile - a file which contains data about another file.

To create the metafile, open a text editor (such as Notepad) and enter the URL of the video file. For example:

RealMedia Metafile

Save this text file with the extension .ram. It probably makes sense to use the same file name as the video file — this will make file management easier. Now create a hyperlink to the metafile like so:

<a href="video01.ram">Click here to view streaming video</a>

Notice the only difference between this and the previous hyperlink: The file extension is .ram instead of .rm (so it points to the metafile instead of the video file).

When the user clicks this hyperlink, the metafile opens and in turn opens the video file - except this time it will be streamed instead of downloaded. This process is transparent to the user - as far as they are concerned the hyperlink just starts the streaming.

Note: In order for RealMedia files to stream from your website your host server must recognize the .ra, .ram, .rm and .rpm mime types. These are standardized file classifications and if your host doesn't support them, you should request that they do or find another host.

Embedding RealMedia Files

Use the following code to embed a real media file. Change "videofilename.wmv" to your own file name in both instances.

<PARAM name="src" value="videofilename.rmvb">
<PARAM name="autostart" value="false">
<PARAM name="controls" value="imagewindow">
<PARAM name="console" value="video">
<EMBED TYPE="audio/x-pn-realaudio-plugin" SRC="videofilename.rmvb" WIDTH="180" HEIGHT="159" AUTOSTART="false" CONTROLS="all" CONSOLE="video">

Subscribe to us on YouTube