When you finish crafting your multimedia presentation, you place the files on RealServer for streaming. This chapter explains how to link your Web page to your presentation. It also describes how a Web server can stream some RealMedia presentations.
When your media files and SMIL file are ready, transfer them to RealServer and place them in the directories prepared by the RealServer administrator. Check your SMIL file to ensure the following:
rtsp://
when streaming from RealServer and http://
when streaming or downloaded from a Web server.
![]() |
Tip |
RealNetworks' publishing tools include features for transferring files to RealServer automatically. See http://www.real.com for details. |
With your files on RealServer, link your Web page to the SMIL file with an HTML hypertext link that looks like this:
<a href="http://realserver.company.com:8080/ramgen/sample.smi">
If the presentation plays back directly in the Web page, the URL looks like this:
<a href="http://realserver.company.com:8080/ramgen/sample.smi?embed">
The following table explains the components of these URLs.
URL Component | Meaning |
---|---|
http:// | This makes the browser contact RealServer through the HTTP protocol. (Web browsers do not use the RTSP protocol.) |
realserver.company.com | This address varies for each RealServer. It typically uses an identifier such as "realserver" instead of "www". |
:8080 | This is the port RealServer uses for HTTP connections. It can vary for each RealServer. Separate the port and address with a colon. |
/ramgen/ | As "Using RAMGEN" explains, this parameter causes RealServer to generate a RAM file automatically. |
sample.smi | This is the SMIL file for your presentation. If you have just one file to stream, you can link directly to that file instead of a SMIL file. |
?altplay=file.ext | This optional parameter specifies an alternate presentation created for older versions of RealPlayer. See "Listing Alternate Presentations". |
?embed | This makes the presentation play back in the Web page. See Chapter 7 for more information. |
![]() |
Tip |
Contact your RealServer administrator to get the RealServer address, HTTP port, and RAMGEN directory structure. |
The /ramgen/ parameter in your Web page hyperlink causes RealServer to generate a RAM file and download it to the viewer's Web browser. This step is needed because browsers may not be configured to launch RealPlayer when they receive a SMIL file. But browsers are configured to launch RealPlayer when they receive a RAM file with the .ram or .rpm extension. RealPlayer then receives the RAM file and can use it to get the SMIL file and presentation files from RealServer. Because the RAM and SMIL files are small, this interaction occurs quickly.
The figure above illustrates the process of requesting a presentation.
![]() |
Note |
Use RAMGEN even when linking to a single file type (such as a .rm file) that automatically launches RealPlayer. |
![]() |
Additional Information |
If you cannot use RAMGEN to generate the RAM file automatically, you can write the RAM file as described in "Creating a RAM File Manually". |
When you update existing content for RealSystem G2, you can keep the earlier content available for older versions of RealPlayer. If you have a RealVideo 5.0 presentation, for example, your Web page links to a RAM file. You could modify the presentation by incorporating advanced SMIL features. In your Web page link, you then use RAMGEN options that cause viewers to link to either the older presentation file or the new SMIL file depending on the RealPlayer version they use:
<a href="http://realserver.company.com:8080/ramgen/sample.smi?altplay="old_sample.rm">
This link instructs RealServer to generate a RAM file for sample.smi if the viewer has the latest version of RealPlayer. Older versions of RealPlayer receive a RAM file for the older old_sample.rm file. (Note that the URL specifies the presentation file, not the old RAM file.) If your previous link specified options such as an end time, you can include those options in the new URL after the altplay parameter. The following shows an end time set for old_sample.rm:
<a href="http://realserver.company.com:8080/ramgen/sample.smi?altplay=old_sample.rm?end=7:45">
![]() |
Tip |
It is not necessary to keep older content available. If you do not use altplay, viewers with older versions of RealPlayer are prompted to upgrade when they click the link to the SMIL file. |
The question mark operator ("?") separates RAMGEN options from the main URL. To use multiple RAMGEN options, you use a question mark before the first option, then separate the remaining options with ampersands (&). For example, the following link uses altplay and embed (the order of options does not matter):
<a href="http://realserver.company.com:8080/ramgen/sample.smi?embed&altplay=old_sample.rm">
With HTTP streaming, you can stream RealMedia clips from a Web server. You can use HTTP streaming if, for example, your Internet Service Provider (ISP) does not have RealServer. This method is not as robust as streaming from RealServer, but it provides a reasonable method for providing short clips to a limited number of users. HTTP streaming is not recommended for long presentations or presentations viewed simultaneously by large numbers of people, however.
If you plan to stream files from a Web server, configure your server's MIME types as described below. Then transfer your files to the Web server and write a RAM file as described in "Creating a RAM File Manually".
There are several limitations on presentations streamed by Web servers:
Except for RealFlash, the RealMedia formats are designed to stream from a Web server as well as from RealServer. A Web server cannot stream other file formats streamed by RealServer, however. A Web server will download rather than stream a WAV file, for example.
Your presentation must consist of a single file or multiple files played in sequence. A Web server cannot deliver multiple streams synchronized to the same timeline. For this reason it cannot play back a RealFlash presentation, for example.
Web server streaming prevents the use of some RealPlayer features. For example, a Web server cannot jump to a new position in a presentation. When the viewer moves the RealPlayer position slider forward, playback stops because the Web server cannot jump to that new position in the file's timeline. The file continues to stream at its normal pace and RealPlayer resumes playback once the stream reaches the requested timeline position.
With HTTP streaming, RealPlayer can't automatically detect the modem speed and determine which version of a presentation to play. Instead, you need to encode separate files optimized for various connection speeds and provide separate links that viewers can select.
Live streaming of presentations is not possible because Web servers can stream only presentations stored on disk.
To stream RealAudio and RealVideo clips from a Web server, you must define the following MIME types in the server. Some Web servers are preconfigured with these MIME types. If you are using an ISP, ask the ISP's Web server administrator to configure these MIME types for you:
Whenever possible, have RealServer create the RAM file automatically as described in "Using RAMGEN". In some cases, though, you may need to create a RAM file manually:
rtsp://realserver.company.com:6060/sample.smi
For Web server streaming, you specify the HTTP protocol and the Web server name:
http://www.company.com/sample.smi
On a local machine, the following specifies a file that resides one level below the RAM file in the media directory:
file://media/sample.smi
![]() |
Additional Information |
These URLs are like those used in a SMIL file to designate media files. For more information on general URL syntax, see "Specifying File Locations". |
--stop--
after the RTSP URL and specify the URL for the older file just as in previous versions of RealSystem. Here's an example:
rtsp://realserver.company.com:6060/sample.smi
--stop--
pnm://realserver.company.com:7070/old_sample.rm
Note that this second URL specifies the older pnm://
protocol and designates the port that RealServer uses for that protocol. Contact the RealServer administrator for that port number.
The following are guidelines for making sure your presentation works well and reaches its target audience: