previous next

Chapter 4: Clip-Encoded URLs

When you produce RealAudio or RealVideo clips using Helix Producer, you can use a utility that embeds clip information and HTML URLs directly in the clip. This lets you add many of the features available through a Ram file directly to your streaming audio or video clip.

For More Information: See Helix Producer User's Guide for information about additional parameters that you can encode into a clip. You can turn a RealVideo clip into an image map, for example. You can download Helix Producer from http://www.realnetworks.com/products/producer/index.h tml, and display the user's guide from the Help menu.

Using Clip-Encoded URLs

The RMEvents utility runs on all Windows operating systems, as well as Linux and the Macintosh. Any version of RMEvents can encode the information described in this chapter, so you can use a utility that predates RealOne Player, such as the one that comes with RealSystem Producer 8.5. The URL-encoding method is backwards-compatible with earlier versions of RealPlayer. If a viewer has RealPlayer 8, for example, the encoded URLs display in the viewer's default browser.

Because this production technique encodes URLs directly into the clip, it is not recommended if you want the HTML pages associated with clips to change. (RMEvents preserves the original copy of your clip, though, so you can always change the URLs by running RMEvents again.) Additionally, it's easier to use SMIL links, as described in Chapter 6, if your RealAudio or RealVideo clip will be part of a multiclip presentation.

Writing an Events File

To use RMEvents, you first create an events file, which is a plain text file that uses the standard text extension of .txt. This file describes events that occur as the clip plays. You write each event on a separate line, and you can use a pound sign (#) to start a comment line. Each event line follows this format:

flag start_time end_time event_syntax

The flag indicates the type of event, which can be either to display clip information, or to open a URL in an HTML pane automatically. The starting time and ending time are relative to the start of clip playback. You indicate the time value with the following format, in which only the seconds field is required:

dd:hh:mm:ss.x

Note: As with a Ram file, define each event on a single line within the events text file. Do not press Enter to wrap long lines manually.

Specifying URL Events

When opening a URL automatically in an HTML pane, you use the u event flag. The event syntax looks like this:

u start_time end_time &&target&&URL?parameters

The URL must be a fully qualified HTTP URL. For the parameters, you can use rpcontextheight and rpcontextwidth when sending a URL to the related info pane. For target, use one of the following:

_rpcontextwin Display the URL in the related info pane.
_rpbrowser Display the URL in the media browser pane.
_rpexternal Display the URL in a secondary browsing window.

Tip: The rpcontextheight and rpcontextwidth parameters are described in the table "Parameters for Opening HTML Pages as a Clip Plays". You cannot use rpvideofillcolor as a parameter.

The following is a sample events file that opens two URLs in the related info pane at different times, and two URLs in the media browser pane at different times:

# Open a URL in the related info pane when the clip starts, and size the pane.
u 00:00:00.0 00:01:59.9 &&_rpcontextwin&&http://www.example.com/info1.html?rpcontextheight=250&rpcontextwidth=280
#
# Open a URL in the media browser pane at the 1-minute mark.
u 00:01:00.0 00:01:59.9 &&_rpbrowser&&http://www.example.com/index.html
#
# Open a second URL in the related info pane at the 2-minute mark.
u 00:02:00.0 00:04:00.0 &&_rpcontextwin&&http://www.example.com/info2.html
#
# Open a second URL in the media browser pane at the 3-minute mark.
u 00:03:00.0 00:04:00.0 &&_rpbrowser&&http://www.example.com/index2.html

Note the following about this sample:

Adding Clip Information

Using RMEvents, you can encode the Ram file clipinfo parameters described in "Setting Clip Information". As with a Ram file, separate the subvalues with vertical lines, or "pipes." The following example shows an events file line that specifies clip information, using i as the event flag:

i 00:00:00.0 00:00:10.0 clipinfo:title=My Presentation|artist name=Pat Morales|...

For clip information, you can specify the start time as the clip's starting time (00:00:00.0). Specifying an end time is required, but the actual end time doesn't matter because the clip information will display throughout the length of the clip playback. In the example above, the end time is set to 10 seconds after the clip starts.

Note: You can also encode into a clip the title, author, and copyright information described in "Overriding Title, Author, and Copyright Information". Typically, you add this information through the Helix Producer interface when encoding a clip, but you an also add it later through the RMEvents utility. For more information, see Helix Producer User's Guide.

Merging the Events File with the Clip

After you write your events file, you use the RMEvents utility to merge the events file with your clip. The following are instructions for doing this on Windows operating systems. For instructions on running RMEvents on Linux or the Macintosh, as well as for information about additional command options, refer to your Helix Producer User's Guide.

To merge an events file with a RealAudio or RealVideo clip on Windows:

  1. Open a command line prompt from the Start menu.
  2. Move to the main Helix Producer directory. The default main directory is C:\Program Files\Real\Helix Producer Basic or C:\Program Files\Real\Helix Producer Plus.
  3. Here is an example:

    C:\>cd "C:\Program Files\Real\Helix Producer Basic"
    

  4. Enter the following command, which uses three flags to indicate the input clip, output clip, and events file:
  5. rmevents -i input.rm -o output.rm -e events.txt
    

    where:

Streaming the Clip

After you have encoded events into your RealAudio or RealVideo clip, you can stream the clip by transferring it to your server and linking it to a Web page through a Ram file, as described in Chapter 3. Note that you can also add parameters to the Ram file. If you have encoded HTML URLs or clipinfo information into your clip, you shouldn't also use these parameters in the Ram file. But you may want to use other Ram file parameters, such as screensize=double, for instance, to open the clip at twice its encoded size.


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