previous next

Appendix B: Quick Steps for Streaming Clips

This appendix provides examples that show how to set up simple streaming presentations quickly. Once you are familiar with the basic steps for hosting RealSystem presentations, you can easily create more complex presentations.

Note
You will need to get the correct URLs for media clips from the RealServer or Web server administrator. Substitute those values for the URLs given in the following examples.

Streaming a RealAudio or RealVideo Clip

It's simple to add a RealAudio or RealVideo clip to your Web page. Following the instructions below, you can either stream the clip from RealServer or download it from a Web server. Either way, the clip plays back in RealPlayer.

Note
Before using a Web server, read "Limitations on Web Server Playback".

To create the clip:

  1. Prepare your audio or video source file for encoding. This can include normalizing the audio source file, for example, or setting the video's window size.

    Additional Information
    See "Optimizing Audio" and "Digitizing Video".

  2. Use RealProducer to encode the RealAudio or RealVideo clip from your audio or video source file. Both RealVideo and RealAudio clips use the file extension .rm.

    Note
    RealProducer Basic and RealProducer Plus are available at http://www.realnetworks.com/products/index.html.

To stream the clip from RealServer using Ramgen:

  1. Transfer the clip to the RealServer directory prepared by the RealServer administrator.

  2. Link your Web page to the clip with an HTML hyperlink that begins with http://, and that specifies the RealServer address along with the ramgen parameter. You can get this information from the RealServer administrator. In your HTML source file, the link will look like the following example:
    
    <a href="http://realserver.example.com:8080/ramgen/videos/myclip.rm">
    Click here</a> to see my RealVideo presentation.

    Additional Information
    See "Streaming Clips from RealServer".

  3. In your Web browser, click the link to verify that it works. RealPlayer will launch as a helper application and, after a few seconds of buffering, will play the streaming clip.

To play the clip back from a Web server:

  1. With any text editor, open a new file and enter the URL your clip will have on the Web server, as in the following example:
    
    http://www.example.com/media/myclip.rm
    

  2. Save this file as plain text with the file extension .ram. This is your Ram file.

    Additional Information
    See "Creating a Ram File Manually".

  3. Transfer the media clip and the Ram file to the appropriate directory on the Web server.

  4. Link your Web page to the Ram file (not the media clip) with a standard HTML hyperlink such as the following:
    
    <a href="http://www.example.com/media/myclip.ram">
    Click here</a> to see my RealVideo presentation.

  5. In your Web browser, click the link to verify that it works. RealPlayer will launch as a helper application and, after a few seconds of buffering, will play the clip.

    Additional Information
    See "Playing Clips from a Web Server".

Embedding a RealVideo Clip in a Web Page

Using RealPlayer's Netscape plug-in, you can embed a RealVideo clip directly in your Web page. The following procedure assumes that the video is 176 pixels wide by 132 pixels high. It places the video window and the full RealPlayer control panel in your Web page.

Additional Information
See "Chapter 8: Playing Clips in a Web Page".

To embed the clip in your Web page:

  1. In your Web page, add the <EMBED> tag with the RealVideo URL, window size, and ImageWindow control. The following example assumes that RealServer will stream the presentation:
    
    <EMBED WIDTH=176 HEIGHT=132 
    SRC="http://realserver.example.com:8080/ramgen/videos/myclip.rm?embed"
    CONTROLS=ImageWindow CONSOLE=one NOJAVA=true>

    If you intend to play the clip back from a Web server, use an HTTP URL and link to a Ram file with the extension .rpm, as in the following example:

    
    <EMBED WIDTH=176 HEIGHT=132 
    SRC="http://www.example.com/media/myclip.rpm"
    CONTROLS=ImageWindow CONSOLE=one NOJAVA=true>

  2. You can then add RealPlayer controls by inserting additional <EMBED> tags that all use the same URL for the SRC parameter. The following example, which assumes that RealServer will stream the presentation, embeds the full RealPlayer control panel in the Web page, linking it to the image window through the same console:
    
    <EMBED WIDTH=375 HEIGHT=100 
    SRC="http://realserver.example.com:8080/ramgen/videos/myclip.rm?embed"
    CONTROLS=All CONSOLE=one NOJAVA=true>

    As in the following example, use an <EMBED> tag when playing the clip back from a Web server:

    
    <EMBED WIDTH=375 HEIGHT=100 
    SRC="http://www.example.com/media/myclip.rpm"
    CONTROLS=All CONSOLE=one NOJAVA=true>

    Tip
    Because you can place each <EMBED> tag anywhere on your Web page, you can use HTML to lay out the image window and controls any way you want.

  3. Transfer the clip to the appropriate RealServer or Web server directory. When streaming from RealServer, you are now ready to test the clip, because the Web page already contains the link to the RealVideo clip.

To create the Ram file when playing the clip back from a Web server:

  1. With any text editor, open a new file and enter the URL your clip will have on the Web server, as in the following example:
    
    http://www.example.com/media/myclip.rm
    

  2. Save this file as plain text with the file extension .rpm. This is your Ram file.

  3. Transfer the Ram file to the appropriate directory on the Web server.

  4. In your Web browser, click the link to verify that it works.

URL Reference

As explained in "RTSP and HTTP", URLs to files and clips vary depending on what kind of file or clip you link to and what type of file contains the link. The following table provides a quick reference that shows which protocol is used for each of the various types of links. It also shows whether or not each link type should use RealServer's Ramgen utility.

Quick URL Reference
Link from Link to Located on Protocol Ramgen? Reference
Web page Media clip RealServer http:// Yes click here
Web server http:// No click here
Web page SMIL file RealServer http:// Yes click here
Web server http:// No click here
Web page Ram file (.ram or .rpm) RealServer http:// No click here
Web server http:// No click here
SMIL file Media clip RealServer rtsp:// No click here
Web server http:// No click here
Local host file:// No click here
SMIL file SMIL file RealServer rtsp:// No click here
Web server http:// No click here
Local host file:// No click here
Ram file (.ram or .rpm) Media clip RealServer rtsp:// No click here
Web server http:// No click here
Local host file:// No click here
Ram file (.ram or .rpm) SMIL file RealServer rtsp:// No click here
Web server http:// No click here
Local host file:// No click here


Copyright © 1998-2000 RealNetworks
For information on RealNetworks' technical support, click here.
Comments on this document? Click here.
This file last updated on 12/12/00 at 15:34:16.
previous next