This appendix will help you utilize the many features of RealSystem G2 and SMIL. Before following the production tips given here, make sure you have a good understanding of SMIL as described in Chapter 7.
Using the SMIL <par> tag, you can mask preroll for high-bandwidth clips by streaming it while low-bandwidth, introductory clips play. The following, SMIL example, which omits the header that defines the region layout and base URL, shows how to do this:
<body>
<par><seq><par><!-- group 1: introductory group masking preroll -->
<audio src="intro.ra"/>
<textstream src="titles.rt" region="left"/>
<textstream src="credits.rt" region="right"/>
</par><par><!-- group 2: main group with masked preroll -->
<ref src="graphics.rp" region="left"/>
<video src="story.rm" region="right"/>
</par></seq></par></body>
Group 1 consists of two RealText clips and a RealAudio clip played in parallel. Because of the <seq> tag, the group 1 clips precede the RealPix and RealVideo clips in group 2. If the <seq> tag were the highest level of organization, RealServer would stream the group 1 clips without regard to group 2, streaming data for group 2 clips only after group 1 finished. Viewers would experience a delay after group 1 clips finished as RealServer streamed preroll for group 2 clips.
The outer <par> tag just below the <body> tag, however, makes RealSystem treat groups 1 and 2 as one large parallel group with subgroups played in sequence. Although this doesn't affect the order in which the clips play, the parallel grouping makes RealSystem balance bandwidth between all clips. After it starts to stream the group 1 clips, RealServer makes use of unused bandwidth by streaming data for group 2 clips while the group 1 clips play. This masks the preroll for the group 2 clips.
|
|
Additional Information |
|---|
| See "What is Preroll?" and "Developing Multiclip Presentations". |
RealPlayer creates all regions defined in a SMIL file's header section when it first reads the file. So a single SMIL presentation cannot play clips in a certain set of regions, then destroy those regions and create different regions with a new layout. To accomplish this, you can create separate SMIL files that define each region set, then play the SMIL files in sequence as described in "Creating a RAM File Manually".
An alternative is to use the z-index parameter of the SMIL <region> tag to create transparent, overlaying regions. The following SMIL header example creates a left region next to a right region. Both are in portrait orientations, their heights over twice the size of their widths. A second set of regions, top and bottom, are stacked. These regions have higher z-index values, meaning that they display in front of the left and right regions:
<head>
<layout>
<root-layout width="360" height="360"/>
<!-- first two side-by-side regions -->
<regionid="left"top="10" left="10" width="165" height="340"z-index="0"/>
<regionid="right"top="10" left="185" width="165" height="340"z-index="1"/>
<!-- second two stacked regions -->
<regionid="top"top="10" left="70" width="220" height="165"z-index="2"/>
<regionid="bottom"top="185" left="70" width="220" height="165"z-index="3"/>
</layout>
</head>
As defined in the following SMIL body, RealPix and RealText clips first play in the left and right regions, which appear beneath the top and bottom regions. Because the overlaying top and bottom regions do not use background colors, they remain transparent until clips play in them. The introductory RealPix and RealText clips disappear when they finish playback, restoring to view the root-layout default background color of black. The group 2 clips, a RealVideo clip and another RealText clip, then play in the top and bottom regions:
<body>
<par>
<seq>
<par>
<!-- group 1: side-by-side titles and credits -->
<ref src="titles.rp"region="left"fill="remove"/>
<textstream src="credits.rt"region="right"fill="remove"/>
</par>
<par>
<!-- group 2: stacked video and subtitles -->
<video src="story.rm"region="top"/>
<textstream src="subtitles.rt"region="bottom"/>
</par>
</seq>
</par>
</body>
Although the left, right, top, and bottom regions exist from the start of the SMIL file playback, the use of z-index, fill="remove", and default region transparency makes it appear as if the regions are created with each new set of clips.
|
|
Additional Information |
|---|
For more on z-index, see "Ordering Overlapping Clips
with z-index". "Laying Out Multiple Clips" discusses
SMIL layouts.
|