Incorporating RealAudio into the SMIL File
March 22, 1999
Once the file is encoded it is ready to be incorporated into the
SMIL file. In our original example the SMI file did not contain
any RealAudio because the video had sound with it. However
adding RealAudio is very easy because there is no need to place
it on the screen using regions. It is simply placed in body of
the SMI file. Let's look at our original SMI file with the
RealAudio code added.
<smil>
<head>
<meta name = "title"
content = "WDVL Demo" />
<meta name = "author"
content = "jrule@ruleweb.com" />
<meta name = "copyright"
content = "©1999" />
<layout type = "text/smil-basic-layout">
<region id = "VideoChannel"
title = "VideoChannel"
left = "0"
top = "0"
height = "120"
width = "160"
background-color="#888888"
fit = "fill"/>
<region id = "PixChannel"
title = "PixChannel"
left = "160"
top = "0"
height = "120"
width = "160"
background-color="#888888"
fit = "fill"/>
<region id = "TextChannel"
title = "TextChannel"
left = "0"
top = "120"
height = "50"
width = "320"
background-color="#888888"
fit = "hidden"/>
</layout>
</head>
<body>
<par title = "multiplexor">
<video src = "wdvl.rm"
id = "Video"
region = "VideoChannel"
title = "Video"/>
<img src = "wdvl.rp"
id = "Headline Pix"
region = "PixChannel"
title = "Headline Pix"/>
<text src = "wdvl.rt"
id = "Ticker"
region = "TextChannel"
title = "Ticker"/>
<audio src = "audio/news.ra"
begin = "0.0s"
dur = "123.0s"/>
</par>
</body>
</smil>
In this example the RealAudio file is called news.ra and resides
in the audio directory. It will begin when the presentation
begins and will play for 123 seconds.
Encoding RealAudio has become much easier over the years. Real
has drastically improved the tools and now even gives away their
low-end tool RealProducer. In addition, compression has become
more and more sophisticated and better sound quality is now
available. RealAudio has also received a new boost by being
included in Real's version of SMIL. Having an audio background
track with slides moving is a great way to give a low bandwidth
slide show on even old 28.8 modems. These new advancements mean
that Real will continue to dominate the market for streaming
media.
Additional Resources:
Jeff Rule is a principal at
RuleWeb Development
specializing in DHTML, SMIL, WebTV Interactive TV and Java
based multimedia enhancements for advanced media sites. His
first book,
Dynamic HTML: The HTML Developer's Guide
was published in December 1998 by Addison Wesley Longman.
It features many DHTML multimedia examples from his popular
DHTML Demo's web site.
The Process of Encoding RealAudio
RealAudio
|