Knowledgebase: Audio and Video Streaming
How do I stream Real Audio and Video Files?
Posted by Support, Last modified by Support on 16 March 2009 12:29 PM
Adding Real Audio/Video Streaming|
The HTTP protocol enables audio content providers to stream RealAudio and RealVideo from a Virtual Server. While this method is not the same as using an actual RealAudio server, it provides a reasonable method for providing RealAudio and RealVideo content. Although we recommend flash for streaming.
Copy your encoded RealAudio or RealVideo files (.rm or .ra) to your web site via FTP. (Make sure to use BINARY/RAW mode if youÂ have aÂ UNIX Based Web Hosting account)
In order for a Real Audio file to properly "stream" from your server you will need two files - one with a .ra or .rm extension (this is the actual Real Audio file which contains all the data) and a second file with a .ram extension. This file is referred to as a 'metafile' (which simply means that it points to another file). Explanations on what these files do is below:
The first file (the one with the .ram extension) is simply a pointer to the second file (the one with the .ra or .rm extension, which is the actual Real Audio file). This first file (the metafile) is the one that will be called from your web page and it is what allows the Real Audio Clips to "stream".
You will need to create the file with the .ram extension (the metafile) yourself. To do this, create the .ram file with the URL pointing to the .ra file:
(In this example the file, myrafile.ra, is located in /sound.)
The .ram file should contain: http://www.yourdomain.com/sound/myrafile.ra
Now calling the .ram file in a web browser would cause the Real Audio file to "stream". Ie:
You can now include this as a link on your site for "streaming" Real Audio files.
Now, in your HTML document, reference the .ram file (metafile) in a hyperlink. For example:(This link would be on a web page in the /sounds directory)
<A HREF="myrafile.ram">Click here to listen!</A>
You may use either relative or complete paths to your .ram file. If you use complete paths, you must include both the hostname and the complete path. For example:
Now when a visitor to your website clicks on the link, the file will begin to play for them almost immediately!
For more information on how to create .ra and .rm files to use on your website, please see RealNetwork's Web Site.