`FROM A WEB SERVER
`RealNetworks Technical Blueprint Series
`
`BTN0006822
`
`BTN0006822
`
`1
`
`NEULION 1013
`
`
`
`Information in this document is subject to change without notice. Companies, names, and data used in
`examples herein are fictitious unless otherwise noted. No part of this document may be reproduced or
`transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written
`permission of RealNetworks, Inc.
`©1998 RealNetworks, Inc.
`RealAudio, RealVideo, and RealPlayer are registered trademarks of RealNetworks, Inc.
`The Real logo, RealServer, RealPlayer Plus, RealText, RealPix, RealAudio Encoder, RealVideo Encoder,
`RealEncoder, RealPublisher, RealProducer, RealProducer Plus, RealProducer Pro, SureStream, RealBroadcast
`Network, and RealSystem are trademarks of RealNetworks, Inc.
`Macromedia is a registered trademark and Flash and Shockwave are trademarks of Macromedia, Inc.
`STiNG is a trademark of Iterated Systems, Inc.
`ACELP-NET codec used under license from Université de Sherbrooke. Sipro Lab Télécom, Inc. Copyright ©1994-
`1997. All rights reserved.
`DolbyNet is a trademark of Dolby Laboratories, Inc.
`Dolby Digital AC-3 audio system manufactured under license from Dolby Laboratories.
`Apple, Macintosh, and Power Macintosh are registered trademarks of Apple Computer, Inc.
`Microsoft, MS-DOS, Windows, and Windows NT are registered trademarks and ActiveX is a trademark of
`Microsoft Corporation.
`Netscape and Netscape Navigator are registered trademarks of Netscape Communications Corporation.
`Pentium is a registered trademark and MMX and the Intel Optimizer Logo are trademarks of Intel Corporation.
`Sonic Foundry and Sound Forge are registered trademarks of Sonic Foundry, Inc.
`Other product and corporate names may be trademarks or registered trademarks of other companies. They are
`used for explanation only, with no intent to infringe.
`
`RealNetworks, Inc.
`2601 Elliott Avenue
`Seattle, WA 98121 USA
`
`http://www.realnetworks.com
`
`BTN0006823
`
`BTN0006823
`
`2
`
`
`
`CONTENTS
`
`HOSTING CLIPS ON A WEB SERVER...............................................1
`Limitations on Web Server Playback..................................... 1
`No SureStream Clips........................................................ 1
`No RealPlayer Seeking...................................................... 2
`Configuring Web Server MIME Types ................................... 2
`
`ENCODING CLIPS...........................................................................3
`
`SETTING BANDWIDTH CHOICES THROUGH SMIL........................3
`Choosing Target Bit Rates ................................................... 4
`Writing the SMIL File........................................................... 5
`SMIL File Extension.......................................................... 6
`Pointers on Creating a SMIL File....................................... 6
`
`CREATING A RAM FILE ...................................................................8
`How RealPlayer Interacts with a Web Server ......................... 9
`
`REALSYSTEM MANUALS ...............................................................10
`
`iii
`
`BTN0006824
`
`BTN0006824
`
`3
`
`
`
`HOSTING CLIPS ON A WEB SERVER
`
`It’s easy to host RealAudio or RealVideo clips on a Web server. RealProducer
`encoding tools have wizards for creating clips and Web pages, as well as for
`uploading files to your Web server. This technical blueprint gives you
`information about putting RealAudio or RealVideo clips on a Web server in
`case the wizards do not meet your needs, or you prefer a “hands on” method
`for managing your clips.
`
`Additional Information
`You can download and purchase RealProducer tools at
`http://www.realnetworks.com/products/index.html.
`
`Note
`You should be familiar with HTML authoring and Web
`server URLs before following the instructions in this
`technical blueprint. This blueprint does not cover how
`to embed clips in a Web page.
`
`Limitations on Web Server Playback
`Although RealServer has better streaming capabilities, Web server playback
`provides a reasonable method for delivering clips to a small number of users.
`It is not recommended for lengthy or complicated presentations, however, or
`for clips viewed simultaneously by large numbers of people. Also note the
`following limitations when hosting clips on a Web server.
`
`NNNNo o o o SSSSuuuurrrreeeeSSSSttttrrrreeeeaaaam m m m CCCClilililippppssss
`When encoding a RealAudio or RealVideo clip, create a single-rate clip rather
`than a SureStream clip. A SureStream clip contains multiple encodings for
`different bandwidths. It can have, for example, encodings for 28 Kbps
`modems, 56 Kbps modems, and ISDN connections. Only RealServer can
`stream SureStream clips, however. When delivered by a Web server, each clip
`must be encoded for just one bandwidth.
`
`1
`
`BTN0006825
`
`BTN0006825
`
`4
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`Additional Information
`To support multiple bandwidths through a single
`hypertext link, you can encode multiple versions of the
`clip and use a SMIL file to list the bandwidth choices.
`See “Setting Bandwidth Choices through SMIL” on
`page 3.
`
`NNNNo o o o RRRReeeeaaaallllPPPPllllaaaayyyyeeeer r r r SSSSeeeeeeeekkkkiiiinnnngggg
`Because a Web server cannot jump to a new position in a clip timeline, the
`RealPlayer position slider cannot fast-forward the clip. If the user moves the
`slider forward, playback pauses as the clip continues to download at its
`normal rate. RealPlayer resumes playback once the clip data reaches the
`requested timeline position.
`
`Configuring Web Server MIME Types
`To download RealSystem clips to RealPlayer, a Web server must be configured
`with the following MIME types. Ask the Web server administrator to
`configure the MIME types listed in the following table.
`
`Web Server MIME Types for RealSystem Clips and Files
`File Type
`Extension
`MIME Type
`.ram
`audio/x-pn-realaudio
`Ram
`Embedded Ram .rpm
`audio/x-pn-realaudio-plugin
`.smil and .smi
`application/smil
`SMIL
`.ra
`audio/x-pn-realaudio
`RealAudio
`.rm
`application/x-pn-realmedia
`RealVideo
`.rp
`image/vnd.rn-realpix
`RealPix
`.rt
`text/vnd.rn-realtext
`RealText
`
`Note
`This technical blueprint does not include information
`on RealPix or RealText. RealPix Authoring Guide and
`RealText Authoring Guide explain how to create these
`clips. See page 10 for more information.
`
`2
`
`BTN0006826
`
`BTN0006826
`
`5
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`Encoding Clips
`Create your RealAudio and RealVideo clips with RealProducer (a free product)
`or RealProducer Plus. These tools have easy-to-use, wizard-driven interfaces
`that let you quickly produce a streaming clip from a standard audio or video
`input format, such as WAV, AVI, or QuickTime. They encode files as
`RealAudio or RealVideo, both of which use the .rm file extension.
`
`Additional Information
`You can download and purchase RealProducer tools at
`http://www.realnetworks.com/products/index.html.
`
`When you run the wizards to encode a file, be sure to choose a single-rate clip
`for Web server hosting. As described in “Limitations on Web Server Playback”
`on page 1, Web servers cannot host SureStream clips encoded for multiple
`playback rates. Also note that single-rate clips support only RealPlayer G2 or
`higher. Earlier versions of RealPlayer, such as RealPlayer 5.0, cannot play these
`clips.
`
`Choosing Single-Rate Clips in the Recording Wizard
`
`Additional Information
`For background on preparing video and audio files for
`encoding, as well as improving audio quality with a
`sound editor, see the audio and video production
`chapters in RealSystem G2 Production Guide.
`
`Setting Bandwidth Choices through SMIL
`Pronounced “smile,” SMIL stands for Synchronized Multimedia Integration
`Language. It is an international standard for delivering multimedia
`
`3
`
`BTN0006827
`
`BTN0006827
`
`6
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`presentations, providing many features for laying out and timing clips. Using
`SMIL when delivering RealAudio or RealVideo clips from a Web server is
`optional, but it can provide many useful features such as the bandwidth
`selection feature described here.
`
`Additional Information
`For a full explanation of SMIL and its many features, see
`the SMIL chapter in RealSystem G2 Production Guide.
`
`When you encode a set of single-rate clips for different bandwidths, you can
`use SMIL to specify the bandwidths. Your Web page then needs just one link
`to the SMIL file rather than a separate link to each clip. When a visitor to your
`Web page clicks the SMIL link, that user’s RealPlayer reads the bandwidth
`choices and chooses the clip to play based on its bandwidth preference. This
`preference is set during RealPlayer installation and is also available on the
`Connection tab under the Options>Preferences command.
`
`RealPlayer Bandwidth Preference
`
`Choosing Target Bit Rates
`When you encode a RealAudio or RealVideo clip, you choose a clip bandwidth
`in the RealProducer wizard dialog. Encode as many clips from the same source
`
`4
`
`BTN0006828
`
`BTN0006828
`
`7
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`file as necessary to support the bandwidths you want to target. You might
`encode a clip for 28 Kbps modems, another for 56 Kbps modems, and a third
`for dual-ISDN connections, for example. Save each clip with a different file
`name. Once you have encoded all the clips you want, you are ready to create
`your SMIL file.
`
`Target Audience Dialog in RealProducer Recording Wizard
`
`Writing the SMIL File
`Write your SMIL file with any word processor or text editor that can save files
`as plain text. Base your file on the following example, which shows a complete
`SMIL file that enables RealPlayer to choose between six clips encoded for
`different bandwidths:
`<smil>
` <body>
` <switch>
` <ref src=“myclipcm.rm” system-bitrate=”220000”/>
` <ref src=“myclipcl.rm” system-bitrate=”150000”/>
` <ref src=“myclipdi.rm” system-bitrate=”80000”/>
` <ref src=“myclipsi.rm” system-bitrate=”45000”/>
` <ref src=“myclip56.rm” system-bitrate=”32000”/>
` <ref src=“myclip28.rm” system-bitrate=”20000”/>
` </switch>
` </body>
`</smil>
`
`The following table explains this example. It shows that myclipcm.rm is for fast
`cable modems. The “SMIL File Bit Rate Specification” column lists the figures
`to use as the system-bitrate values. For a 28.8 Kbps clip, for example, use 20000
`
`5
`
`BTN0006829
`
`BTN0006829
`
`8
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`to indicate that 20,000 bits per second is the minimum bandwidth needed to
`play the clip. This is below the full connection speed (28.8 Kbps, which equals
`29491 bps) because a clip does not consume the entire connection bandwidth.
`Some bandwidth is reserved for network overhead, data loss, and so on.
`
`Example Clips and Bandwidth Targets
`Clip File Name Connection Type
`Clip Bandwidth SMIL File Bit Rate Specification
`myclipcm.rm
`xDSL/cable modem 220 Kbps
`220000
`myclipcl.rm
`Corporate LAN
`150 Kbps
`150000
`myclipdi.rm
`Dual ISDN
`80 Kbps
`80000
`myclipsi.rm
`Single ISDN
`45 Kbps
`45000
`myclip56.rm
`56.0 Kbps modem 32 Kbps
`32000
`myclip28.rm
`28.8 Kbps modem 20 Kbps
`20000
`
`Of course, your SMIL file can support a different number of bandwidths and
`use different file names. For example, the following SMIL file supports 28
`Kbps and 56 Kbps modem connections:
`<smil>
` <body>
` <switch>
` <ref src=“audio56.rm” system-bitrate=”32000”/>
` <ref src=“audio28.rm” system-bitrate=”20000”/>
` </switch>
` </body>
`</smil>
`
`In this example, users with 28.8 Kbps modems receive the clip audio28.rm.
`Users with 56 Kbps modems or faster connections receive the clip audio56.rm.
`
`SSSSMMMMIIIIL L L L FFFFilililile e e e EEEExxxxtttteeeennnnssssiiiioooonnnn
`Save your SMIL file with the file extension .smil (recommended) or .smi. The
`file can have any name, such as myclips.smil. Make sure that when you save the
`SMIL file as plain text, your text editor does not add the extension .txt. If this
`happens, rename the file from the operating system.
`
`PPPPooooiiiinnnntttteeeerrrrs s s s oooon n n n CCCCrrrreeeeaaaattttiiiinnnng g g g a a a a SSSSMMMMIIIIL L L L FFFFilililileeee
`Keep the following important points in mind when creating a SMIL file.
`
`6
`
`BTN0006830
`
`BTN0006830
`
`9
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`AAAAllllwwwwaaaayyyys s s s LLLLiiiisssst t t t SSSSyyyysssstttteeeem m m m BBBBananananddddwwwwiiiiddddtttth h h h OOOOppppttttiiiioooonnnns s s s ffffrrrroooom m m m HHHHiiiigggghhhheeeesssst t t t tttto o o o LLLLoooowwwweeeesssstttt
`RealPlayer evaluates SMIL bandwidth options in the order listed, selecting the
`first viable option even if subsequent options suit it better. Therefore, always
`list clips from highest bandwidth to lowest, as shown in the examples above. If
`a 28.8 Kbps option is first, for example, a RealPlayer with a fast dual-ISDN
`connection will choose that option because it is the first viable option listed.
`Also ensure that the last option satisfies the lowest bandwidth connection you
`want to support. If you do not list an option suitable for 28.8 Kbps modems,
`for example, RealPlayers connected through those modems will not play any
`of the clips.
`
`GGGGiiiivvvve e e e FFFFuuuull ll ll ll UUUURRRRLLLLs s s s iiiif f f f CCCClllliiiipppps s s s aaaannnnd d d d SSSSMMMMIIIIL L L L FFFFilililile e e e aaaarrrre e e e iiiin n n n DDDDiiiiffffffffeeeerrrreeeennnnt t t t DDDDiiiirrrreeeeccccttttoooorrrriiiieeeessss
`The src attributes in the SMIL file examples above list only the clip file names,
`as shown here:
`<ref src=“audio56.rm” system-bitrate=”32000”/>
`
`These examples assume that the clips and the SMIL file are in the same Web
`server directory. If your clips are not in the same directory as the SMIL file,
`give the full URL to the clips within the SMIL file. Here’s an example:
`<ref src=“http://www.company.com/media/audio56.rm” system-bitrate=”32000”/>
`
`FFFFoooolllllllloooow w w w SSSSMMMMIIIIL L L L SSSSyyyynnnnttttaaaax x x x RRRRuuuulllleeeessss
`SMIL has a more rigid syntax than HTML. Using authoring practices
`common to HTML can create an unusable SMIL file. Observe these syntax
`pointers when writing a SMIL file:
`
`• All text except for file names must be lowercase. For example, the
`following line, which uses uppercase and mixed case text, causes an error
`message in RealPlayer:
`<REF SRC=“audio56.rm” System-Bitrate=”32000”/>
`
`• The src values in the SMIL file must match the referenced file names
`exactly. Differences in case will cause an error. For example, if the file on
`the Web server is actually AUDIO56.RM, a reference to audio56.rm causes an
`error message.
`
`Tip
`RealNetworks recommends that you always use
`lowercase file names for clips and the SMIL file.
`
`7
`
`BTN0006831
`
`BTN0006831
`
`10
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`• All attribute values must be quoted. For example, a SMIL file that
`contains the following line will not play in RealPlayer:
`<ref src=audio56.rm system-bitrate=32000/>
`
`• Note that the ref tags end with a forward slash. Leaving out this slash, as
`in the following examples, makes the SMIL file unplayable:
`<ref src=“audio56.rm” system-bitrate=”32000”>
`
`Additional Information
`For more on SMIL file syntax, see the technical
`blueprint, RealSystem G2 Syntax Style Guide.
`
`Creating a Ram File
`A Ram file lists the location of your clip or SMIL file. You then link your Web
`page to the Ram file. When visitors click this link, their RealPlayers launch
`and play the clip or clips listed in the Ram file or SMIL file.
`
`Ram File Refers to Clips or SMIL File
`
`TTTTo o o o ccccrrrreeeeaaaatttte e e e a a a a RRRRaaaam m m m ffffilililileeee::::
`
`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 the media clip. Specify the
`HTTP protocol and the Web server name, along with the SMIL file or
`media clip. Here is an example of a link to a single clip:
`http://www.company.com/media/video1.rm
`This example shows a link to a SMIL file:
`http://www.company.com/media/myclips.smil
`
`8
`
`BTN0006832
`
`BTN0006832
`
`11
`
`(cid:228)
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`To deliver a few clips or SMIL files in sequence, list the URLs in their
`playback order. You might list three clips, two SMIL files, a clip and then a
`SMIL file, or any other combination. For example:
`
`http://www.company.com/media/video1.rm
`http://www.company.com/media/video2.rm
`http://www.company.com/media/morevids.smil
`
`Note
`Keep in mind that each clip needs to be specified in
`either a SMIL file or the Ram file, but not both.
`
`2. Add comments to the Ram file (optional).
`You can add a comment to a Ram file by using a pound sign (“#”) as the
`first character on a line. The following example shows two lines
`commented out of a Ram file:
`
`# Two videos and a SMIL presentation
`# streamed from my Web server.
`http://www.company.com/media/video1.rm
`http://www.company.com/media/video2.rm
`http://www.company.com/media/morevids.smil
`
`3. Save the Ram file as plain text with a .ram extension, such as myclips.ram.
`
`4. Move the Ram file, as well as your clips or SMIL file, to your Web server by
`your standard method, such as FTP. Contact your Web server
`administrator if you need help doing this.
`
`5. Link your Web page to the Ram file with an HTML hyperlink such as this:
`<a href=”http://www.company.com/media/myclips.ram”>click for video</a>
`Be sure to tell your Web page visitors that they need RealPlayer G2 or
`higher to play your clips. You can also include a RealPlayer download link
`button so that visitors can get RealPlayer from RealNetworks. You can
`read RealNetworks’ trademark policy and get RealSystem G2 logos from
`http://www.realnetworks.com/company/guide/index.html.
`
`How RealPlayer Interacts with a Web Server
`The following figure illustrates the process of requesting a presentation from
`a Web server. This shows how all the pieces (Ram file, SMIL file, and clips) fit
`together to deliver your clips from the Web server to RealPlayer G2.
`
`9
`
`BTN0006833
`
`BTN0006833
`
`12
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`Requesting Clips from a Web Server
`
`1. When the user clicks the link to the Ram file in your Web page, the user’s
`browser requests the Ram file from the Web server.
`
`2. The Web server downloads the Ram file to the browser.
`
`3. The Ram file extension (.ram) causes the Web browser to launch
`RealPlayer as a helper application.
`
`4. RealPlayer receives the Ram file and requests the contents of the Ram file
`from the Web server. This may be a SMIL file, a single clip, or a sequential
`group of clips.
`
`5. If you’re using a SMIL file that lists clips for different bandwidths,
`RealPlayer evaluates the choices and determines which clip to receive. It
`then requests and plays back that clip from the Web server.
`
`RealSystem Manuals
`For full information on producing content for RealSystem G2, get the
`following manuals. You can download HTML and PDF versions of these
`manuals from http://service.real.com/help/library/encoders.html.
`
`• RealSystem G2 Production Guide
`This guide explains the basics of creating content for RealSystem G2,
`covering RealAudio, RealVideo, Flash, SMIL, bandwidth, presentation
`URLs, and more.
`
`10
`
`BTN0006834
`
`BTN0006834
`
`13
`
`
`
`RealNetworks Technical Blueprint Series
`
`Delivering RealAudio or RealVideo from a Web Server
`
`• RealPix Authoring Guide
`This guide explains how to create a RealPix presentation to stream still
`images in JPEG or GIF format.
`
`• RealText Authoring Guide
`This guide tells how to create and stream RealText.
`
`11
`
`BTN0006835
`
`BTN0006835
`
`14
`
`