previous next

Chapter 21: Presentation Delivery

When you finish building your RealOne Player presentation, you place the clips on Helix Universal Server or a Web server for delivery to your audience. This chapter explains how to link your Web page to your clips and SMIL files. It shows how to write a Ram file, a simple text file that launches RealOne Player and gives it the URL to your clip or SMIL presentation.

Understanding Linking and URLs

Although the process of linking your Web page to your clips is simple, there are two types of mistakes that are easy to make:

  1. An incorrect URL can prevent a Web browser or RealOne Player from finding a requested file.
  2. An incorrect protocol designation (http://, for example) can keep a clip from streaming correctly.

The following sections provide an overview of the process of linking your Web page to streaming clips on a server. The remainder of this chapter then covers the various options for delivering your presentation.

The Ram File

The most common method of linking your Web page to your clips is through a Ram file, which is also called a metafile. This file uses the extension .ram and often has just one line that gives the full URL to your streaming clip or SMIL presentation. There are several reasons that you use a Ram file rather than link your Web page directly to your streaming clips:

  1. The Ram file launches RealOne Player.
  2. The file extension .ram causes a Web browser to launch RealOne Player to play the presentation. RealOne Player might not launch when you link directly to a clip. When you link your Web page directly to a Flash Player file (extension .swf), for example, the browser launches Macromedia's Flash Player. If you intend to stream your Flash clip, you need to use a Ram file to launch RealOne Player instead.

  3. The Ram file provides an RTSP URL for clips on Helix Universal Server.
  4. Clips on Helix Universal Server stream over the RTSP protocol, rather than HTTP. This means that the URL used to request the clips must start with rtsp:// rather than with http://. Because browsers cannot make RTSP requests, you link your Web page to a Ram file with an HTTP URL. The Ram file then gives RealOne Player the RTSP URL to your presentation.

    For More Information: See the section "The Difference Between RTSP and HTTP".

  5. The Ram file can pass parameters to RealOne Player.
  6. Through optional Ram file parameters, you can modify your clip or SMIL presentation by, for example, playing it double-size. You can also specify HTML pages that display as a clip plays.

How a Ram File Works

You can link a Ram file to a Web page with a standard <a href> hypertext link. The following actions occur when a viewer clicks this hypertext link to request a streaming presentation:

  1. The Web browser requests the Ram file from a Web server or Helix Universal Server.
  2. The Ram file extension (.ram or .rpm) causes the Web browser to launch RealOne Player.
  3. RealOne Player receives the Ram file and requests the clip or SMIL file from the Web server or Helix Universal Server.
  4. When a SMIL file is used, RealOne Player requests the clips based on the URLs in the SMIL file.

The Ram File for Embedded Presentations

For presentations in which RealOne Player pops up as a separate application, you use .ram as the Ram file extension. When you embed a clip or presentation in a Web page as described in Chapter 20, however, the Ram file uses the file extension .rpm. RealOne Player still plays the presentation, but it does not launch as a separate application. Instead, the browser appears to play the clips. Aside for the file extension, there's no difference between a Ram file for a pop- up presentation (.ram), and one for an embedded presentation (.rpm).

The Ramgen Alternative to Ram Files

When you stream clips from Helix Universal Server, you have the option of using Ramgen, a feature that lets you link your Web page directly to your streaming clips without using a Ram file. Ramgen uses a specially configured URL that causes the browser to launch RealOne Player and stream clips using RTSP. Although not suited for all streaming presentations, Ramgen can simplify the process of linking your Web to your clips in many cases. For instructions on using Ramgen, see "Using Ramgen for Clips on Helix Universal Server".

The Difference Between RTSP and HTTP

To deliver HTML pages and graphics, a Web server uses HyperText Transport Protocol (HTTP), as you can see in Web page URLs that begin with http://. HTTP downloads files without regard to timelines, making clips with timelines more likely to stall. Although Helix Universal Server can also use HTTP, URLs for media clips streamed by Helix Universal Server begin with rtsp://, which causes Helix Universal Server to use Real-Time Streaming Protocol (RTSP), Internet standard protocol set forth by the Internet Engineering Task Force (http://www.ietf.org/).

Designed specifically for streaming, RTSP enables Helix Universal Server to adjust streaming data to keep clips playing smoothly. When two clips play side-by-side, for example, RealOne Player communicates with Helix Universal Server about each clip's progress, indicating how much data it needs to keep playback synchronized. Helix Universal Server can then adjust the data flow to compensate for changing network conditions, reducing low priority data if necessary to ensure that crucial data gets through. Communication like this is not possible through HTTP.

Which URLs Use Which Protocol

When you assemble a RealOne Player presentation, it's important to understand clearly which URLs should use HTTP and which should use RTSP:

Directory Paths and URLs

You typically create your clips and SMIL files on a desktop computer or a workstation, then transfer them to a server, whether Helix Universal Server or a Web server, for streaming. If a server is on the same local area network (LAN) as your computer, you can often just copy the files to the server over the network. Otherwise, you can usually transfer files to a server over the Internet using FTP (file transfer protocol).

The Helix Universal Server or Web server administrator can create the content directories for you, and also set up features such as password authentication and pay-per-view. It's important to understand that the paths to the clips on a server and the URLs used to request the clips are different. For example, a clip on Helix Universal Server may reside in the following path on a Windows computer running Helix Universal Server:

C:\Program Files\Real\Helix Server\Content\video1.rm

But the URL used to request the clip may look like this:

rtsp://helixserver.example.com/video1.rm

You'll need the directory path to transfer the clips to the server, and the URL to set up the links for requesting the clip. Your Helix Universal Server or Web server can give you the path to the content directories, and tell you the URLs to use to request the clips.

Launching RealOne Player with a Ram File

A Ram file is a text file with the extension .ram (.rpm for playback in a Web page). When a browser receives this file, it launches RealOne Player as a helper application. RealOne Player then requests the clips listed in the Ram file, which may reside on Helix Universal Server or a Web server. The following sections describe how to write a Ram file, link it to your Web page, and use Ram file options.

Tip: As described in "Using Ramgen for Clips on Helix Universal Server", Helix Universal Server can cause a browser to launch RealOne Player without using a Ram file. Although this option eliminates the need to write a Ram file, it does not include all of the options that a Ram file provides.

Writing a Basic Ram File

The most basic Ram file has only one line: the full URL to a clip or SMIL file. A Ram file can also list multiple URLs to different clips, each URL on a separate line. This causes RealOne Player to play those clips in sequence.

Note: With RealOne Player, a Ram file can also contain multiple URLs to SMIL files and even to other Ram files. However, earlier versions of RealPlayer cannot play Ram files that list other Ram files, or more than one SMIL file.

To write a Ram file:

  1. Open any editor or word processor that can save files as plain text. On the top line, enter the full URL of the SMIL file or media clip. Add the full URL to each subsequent clip or SMIL file on a new line. The following samples show URLs to the same SMIL file, depending on whether the file resides on Helix Universal Server, a Web server, or the viewer's local computer:

    Helix Universal Server: rtsp://helixserver.example.com/sample1.smil
    Web server: http://www.example.com/sample1.smil
    Local: file://sample1.smil
  2. Note: Press Enter only to create a new line on which you want to enter a new URL. Do not press Enter when typing in a long URL. It's OK if your text editor wraps the URL to a new line automatically, though. Only a line break you enter yourself will cause an error.

    Tip: If you do not know the URLs to your clips, check with your Helix Universal Server administrator or Web server administrator.

    For More Information: For more on RTSP URLs, see "Linking to Clips on Helix Universal Server".

  3. Save the Ram file as plain text with a .ram extension (played in RealOne Player) or a .rpm extension (played in a Web browser).
  4. Move your Ram file to Helix Universal Server or your Web server. Even if all of your media clips are on Helix Universal Server, you can place the Ram file on your Web server. When the browser receives a Ram file, it turns it over to RealOne Player, which uses the URLs in the file to request clips. Hence the Ram file and the media clips do not need to reside on the same computer.
  5. For .ram files, link your Web page to the Ram file by using an HTML hyperlink such as this:
  6. <a href="http://www.example.com/sample.ram">click for video</a>
    

    For More Information: For .rpm files, incorporate the link URL into the <EMBED> tag as described in "Using <EMBED> Tags".

Adding Comments to a Ram File

You can add a comment to a Ram file by adding one or more pound signs (#) to the beginning of a line. The following example shows two lines commented out of a Ram file:

# Two videos and a SMIL presentation
# streamed from Helix Universal Server.
rtsp://helixserver.example.com/video1.rm
rtsp://helixserver.example.com/video2.rm
rtsp://helixserver.example.com/sample2.smil

Streaming Different Clips to Different RealPlayers

Earlier versions of RealPlayer cannot play the same content as RealOne Player. For example, RealPlayer G2 through RealPlayer 8 cannot play RealVideo 9 clips and SMIL 2.0 presentations. When these players request this content, the viewer is prompted to update automatically to RealOne Player. Through the Ram file, though, you can specify different clips, presentations, or sequences for three different classes of RealPlayer:

Using the Ram File Multiple-Player Syntax

The following example illustrates the Ram file syntax you use to support the different classes of RealPlayers. In this sample, each player requests two RealVideo clips in sequence. Each clip is encoded with the RealVideo codec suited to that class of players, as described in "RealVideo Codecs".

## The following two video clips play for RealOne Player and later:
## .RAM_V3.0_START
## rtsp://helixserver.example.com/video1_realone.rm
## rtsp://helixserver.example.com/video2_realone.rm
## .RAM_V3.0_END
## The following two clips play for RealPlayer G2 through RealPlayer 8:
rtsp://helixserver.example.com/video1_realG2.rm
rtsp://helixserver.example.com/video2_realG2.rm
--stop--
## The following two clips play for RealPlayer 5 and earlier:
pnm://helixserver.example.com/video1_real5.rm
pnm://helixserver.example.com/video2_real5.rm

Tips for Writing Multiple-Player Ram Files

Note the following about the multiple-player Ram file syntax:

Examples of Linking a Web Page to Clips

The following sections provide some examples of linking a Web page to clips or a SMIL presentation that resides on Helix Universal Server or a Web server.

Linking to a Single Clip

Suppose you have a single RealVideo clip called video1.rm. You can simply link your Web page to a Ram file (play_video1.ram) that resides in the same directory as the Web page:

<a href= "play_video1.ram">Play the video!</a>

The Ram file then gives RealOne Player either the full RTSP URL to the clip on Helix Universal Server:

rtsp://helixserver.example.com/video1.rm

or the full HTTP URL to the clip on a Web server:

http://www.example.com/video1.rm

Linking to an Embedded Clip

Suppose that you've embedded a RealVideo clip called video1.rm in your Web page according to the instructions in Chapter 20. You can link to a Ram file (play_video1.rpm) that resides in the same directory as the Web page within the <EMBED> tag:

<EMBED SRC="play_video1.rpm" WIDTH=300 HEIGHT=134>

The Ram file then gives RealOne Player either the RTSP URL to the clip on Helix Universal Server:

rtsp://helixserver.example.com/video1.rm

or the HTTP URL to the clip on a Web server:

http://www.example.com/video1.rm

Linking to a SMIL Presentation

Linking to a SMIL file is similar to linking to a clip. However, because a SMIL file contains the URLs to clips in the presentation, the SMIL file itself can reside on any server. Suppose you have a SMIL file named presentation.smil. You can simply link your Web page to a Ram file (play_presentation.ram) that resides in the same directory as the Web page:

<a href= "play_presentation.ram">Play the video!</a>

The Ram file should give RealOne Player the full RTSP URL to the SMIL file if it resides on Helix Universal Server:

rtsp://helixserver.example.com/presentation.smil

or the HTTP URL to the file if it resides on a Web server:

http://www.example.com/presentation.smil

The SMIL file itself should contain the full URLs to clips in its source tags, as in the following example:

<video src="rtsp://helixserver.example.com/video1.rm" .../>

For More Information: See "Writing Clip Source URLs" for more information on SMIL file URLs.

Passing Parameters Through a Ram File

A Ram file provides a simple and convenient way to set parameters that open HTML pages in the RealOne Player related info and media browser panes. Ram file parameters can also affect the clip itself by shortening its playback time, for instance. In the Ram file, separate the first parameter from the clip URL with a question mark (?), as shown here:

URL?parameter=value

To set two or more parameters for the same clip, precede the second and all subsequent parameters with ampersands (&) instead of question marks:

URL?parameter=value&parameter=value&parameter=value...

Note the following about Ram file parameters:

Opening a URL in an HTML Pane

For each clip in the Ram file, you can provide the URL to one HTML page that opens in the RealOne Player related info pane. You can also provide a URL to an HTML page that opens in the media browser pane. This feature is useful when you want to supplement a clip with one or two HTML pages, but you don't need all the features provided by SMIL. The following table lists the Ram file HTML page parameters.

Ram File Parameters for Opening an HTML Page
Parameter and Value Function
rpcontexturl=URL|
_keep
Displays the specified URL in the related info pane, or keeps the existing related info pane open. Use a fully qualified HTTP URL. If testing with a local clip, use the full, absolute path to the clip on your computer.
rpcontextheight=pixels Sets the pixel height of the related info pane. If no height is specified, RealOne Player uses the height of the media clip. See "Related Info Pane Sizing" for more information.
rpcontextwidth=pixels Sets the pixel width of the related info pane. If no width is specified, a default of 330 pixels is used.
rpcontextparams=
URL_parameters
Appends parameters to the rpcontexturl URL. HTML page parameters are generally separated from the page URL with a question mark. In a Ram file, however a question mark indicates the start of the Ram file parameters. Hence, if you need to append parameters to your related info page URL, do so through rpcontextparams.
rpcontexttime=
dd:hh:mm:ss.x
Specifies the time at which the HTML page displays in the related info pane, relative to the start of the media clip. Only the seconds (ss) field is required, so rpcontexttime=10 means to open the related info pane 10 seconds after the clip starts to play. If no time is specified, the page opens when the clip starts to play. Use of start=hh:mm:ss.x with the clip does not affect when the HTML page displays.
rpurl=URL Specifies the URL to display in the media browser pane. This URL always opens when the clip begins to play. If testing with a local clip, use the full, absolute path to the clip on your computer.
rpurlparams=
URL_parameters
Appends parameters to the rpurl URL. If you need to add parameters to your media browser page URL, do so through rpurlparams.
rpurltarget=_rpbrowser|name Sets the target for rpurl as the media browser pane when you use _rpbrowser, or as a secondary browsing window if you use any other name. Because the default is _rpbrowser, you can omit this parameter to use the media browser.
rpvideofillcolor=
color_value
Specifies a background color for the media playback pane, allowing you to match the backgrounds for the media playback and related info panes. Black is the default color. See below for more about colors.

Background Color Values

For rpvideofillcolor, use one of the following:

With a hexadecimal color value, substitute the escape character %23 for the pound sign (#), which, in a Ram file, signifies the start of a comment. For example, suppose that you want to match the following hexadecimal color used in a related info HTML page:

<BODY BGCOLOR="#FF5A4E">

You would add the following to your Ram file:

rpvideofillcolor=%23FF5A4E

Examples of Opening HTML Pages

Opening a Page in the Related Info Pane

The following example plays a clip and opens an HTML page in a related info pane that is 250 pixels high and 280 pixels wide:

rtsp://helixserver.example.com/video1.rm?rpcontextheight=250
&rpcontextwidth=280&rpcontexturl="http://www.example.com/relatedinfo1.html"

Opening a Page in the Media Browser Pane

The next example opens an HTML page in the media browser pane when the clip begins to play:

rtsp://helixserver.example.com/video2.rm?rpurl="http://www.example.com/index.html"

Keeping the Same Context Pane, But Changing Background Colors

The following sample Ram file plays two clips in sequence. After the first clip plays for 5.5 seconds, the Ram parameters open an HTML page in a related info pane that is 350 pixels high by 300 pixels wide. The media playback pane's background color is set to rgb(30,60,200). When the second clip plays, the same related info pane is kept onscreen, but the media playback pane's background changes to red:

# First URL that opens a related info pane.
rtsp://helixserver.example.com/video3.rm?rpcontextheight=350
&rpcontextwidth=300&rpcontexturl="http://www.example.com/relatedinfo2.html"
&rpcontexttime=5.5&rpvideofillcolor=rgb(30,60,200)
#
# Second URL that keeps the same related info pane,
# but changes the media playback pane's background color.
rtsp://helixserver.example.com/video4.rm?rpcontexturl=_keep
&rpvideofillcolor=red

Tips for Opening HTML URLs

Controlling How a Presentation Initially Displays

In the Ram file, you can set several parameters that control how RealOne Player initially displays a clip or SMIL presentation. You can play a clip at double its normal size, for example, play part of a clip, or open the RealOne Player at full-screen size. To control these characteristics, add one or more of the following parameters to the Ram file URL.

Ram File Parameters for Setting the Initial Display
Parameter and Value Function
screensize=double|
full|original
Opens the clip or presentation at double its normal size, at full-screen size, in which the monitor looks like a television set, or at its original size, which is the default.
mode=normal|
theater|toolbar
Opens RealOne Player in one of three modes. In normal mode, which is the default, controls are grouped around the media playback pane. In toolbar mode, which is available only to subscribers of the premium services, the controls appear at the bottom of the computer screen. In theater mode, controls are put in toolbar mode, and the media presentation appears centered on a darkened screen.
start=hh:mm:ss.x Starts the clip at the specified point in its timeline. Only the seconds field is required, so start=45 begins the clip at its 45-second mark. This parameter shortens the total time the clip plays, but it does not delay the clip from starting its playback.
end=hh:mm:ss.x Ends the clip at the specified point in its timeline. Only the seconds field is required. For example, end=3:30 means to end the clip when it reaches its internal mark of three minutes and thirty seconds. The total time that the clip plays is the end time minus the start time.
showvideocontrolsoverlay=0|1 When set to 0, hides the sizing overlay that appears briefly when the viewer moves the screen pointer over the media playback pane. (The overlay, which appears in the upper-left corner of the media playback pane, has controls to display the media at different sizes.) This parameter works only with RealOne Player version 2 and higher.

View it now! (requirements for viewing this sample)
The first sample plays a clip at normal size, then at double-size. The second sample plays a clip in full-screen mode. The third sample uses start and end to play a portion of a clip. You can also open clips in theater mode or, for subscribers to premium services, toolbarmode.

Examples of Setting a Presentation's Initial Display

Opening a Clip in Full-Screen Mode

The following example opens a SMIL presentation in full-screen mode:

rtsp://helixserver.example.com/sample1.smil?screensize=full

Opening a Clip at Normal Size in Theater Mode

The next example opens a RealVideo clip at double its normal size, and sets RealOne Player to its theater mode:

rtsp://helixserver.example.com/video1.rm?screensize=double&mode=theater

Playing a Clip Excerpt

The final example plays a 30-second excerpt from the middle of a clip:

rtsp://helixserver.example.com/audio1.rm?start=55&end=1:25

Tips for Setting the Initial Display

Overriding Title, Author, and Copyright Information

A streaming clip often encodes title, author, and copyright information. When you encode a RealAudio or RealVideo clip, for example, you can add this information to the clip through Helix Producer. Through the Ram file, you can override this title, author, and copyright information. These parameters are compatible with earlier versions of RealPlayer.

Title, Author, and Copyright Parameters
Parameter and Value Function
title="text" Specifies the clip title.
author="text" Indicates the clip author. This information displays in the Artist field of the clip information panel.
copyright="text" Gives the copyright notice. You can use the HTML code &#169; to create the standard copyright symbol.

For More Information: For information about where this information displays in RealOne Player, see "Where Title, Author, and Copyright Information Displays".

View it now! (requirements for viewing this sample)
This sample uses title, author, and copyright parameters in a Ram file to override information encoded in a clip. You can view the information supplied by the Ram file by pressing Ctrl+i.

Example of Setting Title, Author, and Copyright Information

The following example sets title, author, and copyright information for a video clip:

rtsp://helixserver.example.com/introvid.rm?title="Introduction to RealOne Player 
Production"&author="RealNetworks, Inc."&copyright="&#169;2001,
RealNetworks, Inc."

Setting Clip Information

The clipinfo parameter is new with RealOne Player, and is ignored by earlier RealPlayers. Geared for online music, it allows you to encode information such as the artist name, album, genre, and so on, which displays when the viewer chooses the File>Clip Properties>View Clip Info command, or presses Ctrl+i. The clipinfo parameter uses one long value surrounded by double quotation marks. Within the quotes, you separate the subvalues with vertical lines, or "pipes," as shown here:

clipinfo="name=value|name=value|name=value..."

The following table describes the name and value pairs that you can use with clipinfo. You can use any set of values, and list them in any order. Most text values can be over 100 characters long.

Clipinfo Parameter Values
Name and Value Function
title=text Gives the clip title.
artist name=text Indicates the artist name.
album name=text Gives the album name. If you specify an album name and do not also display an HTML page in the related info pane, RealOne Player displays in that pane a standard page that lists the artist, album, year, and genre values. The viewer can hide this information, though, with Tools>Album Info>Hide.
genre=text Indicates the clip genre, such as Rock or Jazz.
copyright=text Gives the copyright notice.
year=text Indicates the year the content was released.
cdnum=number Supplies the CD track number.
comments=text Provides any additional comments.

Note: Do not use the title, author, and copyright parameters described in "Overriding Title, Author, and Copyright Information" along with clipinfo.

View it now! (requirements for viewing this sample)
This sample demonstrates how the clipinfo parameter in a Ram file can set clip information, which you can view by pressing Ctrl+i.

Using Text Escape Characters

To use certain text characters in a value for the clipinfo parameter, you must use the character's corresponding escape code. This is because certain characters represent syntax components. A pipe (|) represents the start of a new value, for example, so to use a pipe within a value, you must use the escape code %7C. The following table lists some common text characters that you can add through escape codes.

Text Character Escape Codes
Name Character Escape Code
ampersand & %26
apostrophe ` %27
backslash \ %5C
carat ^ %5E
double quote " %22
greater than sign > %3E
left bracket [ %5B
less than sign < %3C
percent sign % %25
pipe | %7C
pound sign # %23
right bracket ] %5D

You can enter other common text characters, such as commas, periods, and colons directly into clipinfo parameter. Conversely, you can display any text character, including letters and numbers, by using an escape code that starts with % followed by the character's ASCII hexadecimal value. You can create an asterisk (*) with the escape code %2A, for example.

For More Information: Visit http://www.asciitable.com for a full list of ASCII codes.

Example of Setting Clip Information

This example sets the clipinfo parameter for an audio clip:

rtsp://helixserver.example.com/song1.rm?clipinfo="title=Artist of the Year|
artist name=Your Name Here|album name=My Debut|genre=Rock|
copyright=2001|year=2001|comments=This one really knows how to rock!"

The following figure illustrates how this information appears in the clip information panel (Ctrl+i).

Clip Information

Clip Information

Using Ramgen for Clips on Helix Universal Server

With Helix Universal Server, you can use Ramgen to launch RealOne Player automatically, eliminating the need to write a separate Ram file. Your Web page URL simply points to your media clip or SMIL file on Helix Universal Server and includes a ramgen parameter. If your Helix Universal Server does not use Ramgen, you can write a Ram file as explained in "Launching RealOne Player with a Ram File". A Ram file also enables you to use some RealOne Player features, such as playing a clip at double or full-screen size.

The following illustration shows the process of requesting a presentation through Ramgen. This example uses a SMIL file that coordinates multiple clips, but you can also link to a single clip directly without using SMIL.

Requesting a Presentation from Helix Universal Server Using Ramgen

Requesting a Presentation from Helix Universal Server Using Ramgen

  1. Using HTTP, the Web browser requests the SMIL file from Helix Universal Server. The URL includes a /ramgen/ parameter that invokes Ramgen.
  2. Helix Universal Server's response causes the Web browser to launch RealOne Player as a helper application and to give it the URL to the SMIL file.
  3. RealOne Player requests the SMIL file from Helix Universal Server using RTSP.
  4. With the information in the SMIL file, RealOne Player requests and receives the streaming media clips.

Linking Your Web Page to Helix Universal Server Using Ramgen

With your clips on Helix Universal Server, link your Web page to the SMIL file by using an HTML hypertext link that looks like the following:

<a href="http://helixserver.example.com:8080/ramgen/media/sample.smil">...</a>

If the presentation plays back directly in the Web page, the URL occurs within an <EMBED> tag and looks like this:

SRC="http://helixserver.example.com:8080/ramgen/media/sample.smil?embed"

In these examples, the /ramgen/ parameter causes the Web browser to launch RealOne Player without the use of a separate Ram file. This parameter designates a virtual directory in Helix Universal Server, and can be followed in the URL by actual directory listings. The following table describes the components of these URLs. Contact your Helix Universal Server administrator to get the actual Helix Universal Server address, HTTP port, and directory structure.

URL Components in a Web Page Link to Helix Universal Server
URL Component Function
http:// This causes the browser to contact Helix Universal Server through HTTP. (Web browsers do not use RTSP.)
helixserver.example.com This address varies for each Helix Universal Server. It typically uses an identifier such as helixserver instead of www. It may also use a numeric TCP/IP address, such as 204.71.154.5.
:8080 This is the port Helix Universal Server uses for HTTP connections. Separate the port and address with a colon. You can leave the port number out if Helix Universal Server uses port 80 for HTTP connections. Include the port number if Helix Universal Server uses any port other than 80 for HTTP.
/ramgen/ This parameter launches RealOne Player without the use of a separate Ram file.
/media/ Following /ramgen/, the URL may list other directories, depending on where the clip resides on Helix Universal Server.
sample.smil This is the SMIL file for your presentation. If you have only one clip to stream, you can link directly to that clip instead of to a SMIL file.
?altplay=file.ext This Ramgen option specifies an alternate presentation created for earlier versions of RealPlayer. See "Listing Alternative Presentations with Ramgen".
?embed This Ramgen option embeds the presentation in a Web page. See Chapter 20 for complete information on Web page playback.

Listing Alternative Presentations with Ramgen

With altplay, you can use a single link to stream one clip to RealPlayer G2 and later, while streaming older clips to RealPlayer 5 and earlier. Suppose that you have a RealVideo 5 clip and a RealVideo 9 clip laid out using SMIL. You link to the SMIL file using Ramgen as described in the preceding section, and you include altplay to list the older clip:

<a href="http://.../ramgen/media/sample.smil?altplay=old_sample.rm">

This link instructs Helix Universal Server to point RealPlayer G2 or later to sample.smil. Earlier versions of RealPlayer receive the URL to old_sample.rm. Helix Universal Server uses the streaming protocol appropriate for each RealPlayer version, whether RTSP or the older PNA.

Note: Because altplay specifies the clip, not a Ram file, the older clip must reside in the same directory as the new content.

Tip: A Ram file gives you more flexibility for specifying different clips for different versions of RealPlayer. For more information, see "Streaming Different Clips to Different RealPlayers".

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 and separate the remaining options with ampersands (&). The order of options does not matter. For example, the following link uses altplay and embed:

<a href="http://.../ramgen/media/sample.smil?embed&altplay=old_sample.rm">

You can use the ? operator to include earlier Ram file options when using altplay. If your Ram file URL for a RealVideo 5 clip specified an end time, for example, include that option in the Ramgen URL after altplay. The following example shows an end time set for old_sample.rm:

<a href="http://.../ramgen/media/sample.smil?altplay=old_sample.rm&end=7:45">

Hosting Clips on a Web Server

If you do not have access to Helix Universal Server, you can host your presentation on a Web server. Although not as robust as Helix Universal Server streaming, Web server playback provides a reasonable method for delivering simple presentations to a small number of viewers. The following sections describe features available with Web servers, and discuss limitations you may encounter when using a Web server instead of Helix Universal Server.

Web Server MIME Types

To download a RealOne Player presentation from a Web server, you must configure the server with the MIME types listed in the following table. The Web server administrator can configure the MIME types properly.

Web Server MIME Types for RealOne Player Files
File Type Extension MIME Type
Ram .ram audio/x-pn-realaudio
embedded Ram .rpm audio/x-pn-realaudio-plugin
SMIL .smil and .smi application/smil
RealAudio .ra audio/x-pn-realaudio
RealVideo .rm application/x-pn-realmedia
Flash .swf application/x-shockwave-flash
RealPix .rp image/vnd.rn-realpix
RealText .rt text/vnd.rn-realtext

GZIP Encoding for Large Text Files

Some Web servers support GZIP encoding for delivering large text files, cutting download time for these files 30% or more. RealPlayer 8 and RealOne Player on any operating system can decode a GZIP file automatically. This helps speed the playback of presentations that include large text files. Refer to your Web server documentation for information about creating GZIP files from text files.

Tips for Using GZIP

Limitations on Web Server Playback

Because Web servers are not designed to manage bandwidth or keep multiple clips synchronized, presentations delivered by a Web server are more likely to stall than when streamed by Helix Universal Server. To ensure that a presentation hosted by a Web server plays as smoothly as possible, observe the following points.

No SureStream Clips Encoded for Multiple Bandwidths

A Web server cannot send just one stream from a SureStream clip encoded for several bandwidths. Instead, it downloads the entire clip, causing a very high preroll. You must therefore encode each RealAudio or RealVideo clip for just one bandwidth. When using Helix Producer, select the option for Web server playback and choose your target audience. To support multiple bandwidths, encode separate clips for various bandwidths, and use SMIL to let RealOne Player choose which clip to play.

For More Information: For more on using SMIL to list clip choices, see "Switching Between Bandwidth Choices".

No Secure RealAudio and RealVideo Clips

When you encode RealAudio and RealVideo clips with Helix Producer, you have an option to prevent RealOne Player users from recording the streamed clips to their computers. This feature works only when Helix Universal Server streams the clips. When a Web server delivers the clips, users still cannot record the clips through RealOne Player, but their Web browsers will cache the clips. Additionally, any user can click on your Web page hypertext links and use Save as... commands to download the clips from the Web server.

Limited Ability to Keep Parallel Clips Synchronized

A Web server does not consider clip timelines when downloading data. Nor does it receive feedback from RealOne Player about the presentation's progress. Web server playback therefore makes it harder for RealOne Player to keep clips synchronized. A presentation that plays large clips in parallel may stall when the RealOne Player connection has little bandwidth to spare.

No Way to Set Image Streaming Speeds

As the section "Setting a Clip's Streaming Speed" explains, you can set an image clip's streaming speed with a <param/> tag when you use Helix Universal Server. This SMIL attribute has no effect on presentations delivered with a Web server, however. A Web server will download the image as quickly as possible, which may interfere with other clips that display at the same time.

RealPix Presentations Require Clip Size Information

Helix Universal Server determines when to stream each RealPix image based on the image's place in the presentation timeline. Because a Web server cannot do this, you must indicate each image's file size in the RealPix markup. This enables RealOne Player to calculate when to request an image from the Web server so that all image data has arrived by the time the image displays. If the file size information is missing, RealOne Player requests all images when the presentation starts, causing a high preroll. For more information, see "Indicating the Image Size for Web Servers".

SMIL File Optional

When delivering a single clip or a few clips played in sequence, you do not need a SMIL file. Instead, you can simply list the clips in order when writing your Ram file, as described in "Launching RealOne Player with a Ram File". However, you can also have your Ram file specify a SMIL file that lists the clip locations, creates a layout, times the presentation, and so on.

Note: RealNetworks does not recommend using long or complex SMIL files when delivering presentations with a Web server. Limit your SMIL file to a few clips played in sequence or in parallel.

SMIL Internal Timing Commands Do Not Work

Although you can use SMIL to lay out and time your presentation, you should not use the clipBegin and clipEnd attributes. A Web server cannot begin to download a clip at a certain point in its timeline. With clipBegin="5min", for example, RealOne Player must wait until it has received the first 5 minutes of clip data before it can play the clip. This results in an unacceptably long wait.

For More Information: "Setting Internal Clip Begin and End Times" describes these SMIL commands.

No Presentation Seeking

Because a Web server cannot jump to a new position in a clip's timeline, the RealOne Player position slider cannot fast-forward the clip. If the viewer moves the slider forward, playback pauses as the clip continues to download at its normal rate. RealOne Player resumes playback once the clip data reaches the specified timeline position.

No RTSP URLs

Because Web servers do not support RTSP, all URLs in presentations hosted by Web servers should begin with http://. This includes all URLs in a SMIL file or Ram file.

No Live Broadcasting

Live broadcasting is not possible because Web servers can download only clips that are stored on disk.

Testing Your Presentation

Use the following guidelines to make sure your presentation works well and reaches its target audience:

Advertising on RealGuide

Every day, thousands of people visit RealGuide, RealNetworks' online guide for streaming media sites and live events (http://realguide.real.com). If you regularly host streaming media presentations of interest to the public, or if you have a live event you want to advertise, you can submit your listing to RealNetworks. Simply complete the following online form to list your site or live event:

In the form, you provide the site or event name, the URL, a short description, and the name of a contact person. A RealGuide staff member then verifies your site or event before including it on RealGuide. (RealNetworks reserves the right to edit or refuse submissions.) For live events, please submit your request at least one business day in advance. If you have questions or need to change a listing, please contact RealGuide from this Web page:

Using RealNetworks Logos

When you create RealOne Player content, RealNetworks encourages you to add RealOne Player logos to your Web page. You can provide a RealOne Player download link button, for example, so that users can get RealOne Player from RealNetworks' Web site and view your content. You can read RealNetworks' trademark policies and get RealOne Player logos at the following address:

http://www.realnetworks.com/company/logos/index.html


RealNetworks, Inc. ©2002 RealNetworks, Inc. All rights reserved.
For more information, visit RealNetworks
Click here if the Table of Contents frame is not visible at the left side of your screen.
previous next