AT Streaming Media Servers » Accessing media files
Accessing media files
Although Real and Windows Media files can be retrieved directly using the Real or Windows Media client, in most cases you will make your media files available as a link on a web page. There are two conditions required to make this happen:
- The client's browser must be told the URL of the media file that is to be retrieved.
- The client's browser must know how to execute the Real or Windows Media client to retrieve the media file.
Can the media files be referenced directly from a web page? Yes they can, but it's not what you want. That would require the entire media file to be downloaded onto the client computer.
Accessing Windows Media files:
Windows Media files are referenced on a web page using a small text file called an .asx file. This file contains a single line that is the URL for the actual media file. The .asx file is referenced as a link in your web page, something like this:
<a href="clip.asx">Film clip</a> of my vacation.
The file clip.asx is a text file containing the single line that is the URL for the media clip. If your server username is john and the media clip is named vacation.wmv, then the .asx file will contain this URL:
mms://wm.video.ufl.edu/john/vacation.wmv
When a user clicks on the "Film clip" link in your web page, the server will send back the contents of the file clip.asx. The browser will recognize the asx file type as a file containing a URL and will pass the URL to your Windows Media client. The Windows Media client will connect to the Windows Media server and retrieve the media file.
Accessing Real Media files:
Real media files are referenced on a web page using a small text file called a .ram file. This file contains a single line that is the URL for the actual media file. The .ram file is referenced as a link in your web page, something like this:
<a href="clip.ram">Film clip</a> of my vacation.
The file clip.ram is a text file containing the single line that is the URL for the media clip. If your server username is john and the media clip is named vacation.rm, then the .ram file will contain this URL:
rtsp://real.video.ufl.edu/john/vacation.rm
When a user clicks on the "Film clip" link in your web page, the server will send back the contents of the file clip.ram. The browser will recognize the .ram file type as a file containing a URL and will pass the URL to your Real client. The Real client will connect to the Real server and retrieve the media file.
Alternatively, you can use the ramgen feature and you don't need to create the .ram file. With this technique, a URL like this is coded as a link on your web page:
<a href="http://real.video.ufl.edu:8080/ramgen/john/vacation.rm">Film clip</a> of my vacation.
This link uses a feature of the Real server to internally generate the .ram file and return it to your browser. The results should be identical.
Also, most browsers will be able to handle the .ram and .asx files without any additional configuration. If your browser does not, it must be configured so that a MIME type of video/x-ms-asf asf asx and file types of .asx are handled by the Windows Media client and the a MIME type of audio/x-pn-realaudio and file types of .ram are handled by the Real media client.