previous next

Chapter 9: Delivering Your Presentation

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.

Moving Files to RealServer

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:

Linking your Web Page to your Presentation

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 ComponentMeaning
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.

Using RAMGEN

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.

  1. Using the HTTP protocol, the Web browser requests the SMIL file from RealServer.

  2. The URL to the SMIL file causes RealServer's RAMGEN utility to generate a RAM file automatically and download it to the browser.

  3. The RAM file extension (.ram or .rpm) causes the Web browser to launch RealPlayer as a helper application.

  4. RealPlayer receives the RAM file and request the SMIL file from RealServer using the RTSP protocol.

  5. With the information in the SMIL file, RealPlayer requests and receives the streaming media files.

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".

Listing Alternate Presentations

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.

Combining RAMGEN Options

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">

Streaming from a Web Server

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".

Limitations on HTTP Streaming

There are several limitations on presentations streamed by Web servers:

Configuring Web Server MIME Types

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:

Creating a RAM File Manually

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:

To create a RAM file:

  1. Open any editor that can save files as plain text. On the top line, enter the URL of the SMIL file or the single media file in the presentation. The following example links to a SMIL file on a RealServer machine that doesn't use RAMGEN:
    
    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".

  2. When streaming from RealServer, you can support older versions of RealPlayer just as RAMGEN does with the altplay attribute. You add the marker:
    
    --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.

  3. Save the file as text-only with a .ram extension (played in RealPlayer) or a .rpm extension (played in the Web browser).

  4. Link your Web page to the .ram or .rpm file.

Testing your Presentation

The following are guidelines for making sure your presentation works well and reaches its target audience:

  1. Test your presentation in "real world" conditions. If you target 28.8 Kbps connections, for example, request the presentation from RealServer over a 28.8 dial-up modem.

  2. Make sure that your presentation works well for an "average" CPU. RealNetworks recommends testing a presentation on both Pentium and Power Macintosh 90 MHz machines. Do not rely on MMX technology to enhance playback. Not all viewers will have MMX machines.

  3. Test that the presentation plays to completion successfully (minimal or no buffering after the initial preroll) and that the presentation parts are synchronized.

  4. When embedding a presentation in a Web page, verify that the playback window has the correct location and controls.


Copyright © 1998 RealNetworks
For technical support on RealNetworks products, visit http://service.real.com/.
Comments on this document? Contact techpubs@real.com.
This file last updated on 05/20/98 at 16:52:05.
previous next