SMIL Manousos Bouloukakis 26/05/2001 What does SMIL mean? Synchronized Multimedia Integration...
-
Upload
letitia-anderson -
Category
Documents
-
view
217 -
download
0
Transcript of SMIL Manousos Bouloukakis 26/05/2001 What does SMIL mean? Synchronized Multimedia Integration...
26/05/2001SMILManousos Bouloukakis
What does SMIL mean?
Synchronized Multimedia Integration Language Pronounce it "smile" !
26/05/2001SMILManousos Bouloukakis
The Synchronized Multimedia Integration Language (SMIL) is a recommendation from the World Wide Web Consortium (W3C)
that allows for the creation of time-based multimedia delivery over the web.
Based on XML, it allows developers to mix many types of media, text, video, graphics, audio and vector based animation together and to
synchronize them to a timeline.With the advent of faster connections to the Web, DSL and Cable
Modems. The next step in communications is synchronized multimedia. The language SMIL is as easy to publish as HTML
Introduction
26/05/2001SMILManousos Bouloukakis
What is SMIL ?
The new SMIL language is a powerful tool for creating synchronized multimedia presentations on the web
over low bandwidth connections. It is mainly meant to work with linear presentations where several types of media can be synchronized to one timeline. It does not work well with non-linear presentations and its
ability to skip around in the timeline is buggy at best. However, for slideshow style mixed media
presentations it the best the web has to offer
26/05/2001SMILManousos Bouloukakis
Companies Support for SMIL
SMIL's most vocal proponent is currently Real Networks who have built the
SMIL functionality into their Real G2 Player software.
Allaire is also supporting SMIL with a collection of SMIL tags for their popular Homesite HTML Editor
Netscape, Microsoft and Macromedia have all decided to withhold support from this standard
However, Microsoft, Macromedia and Compaq are currently developing another standard that more closely integrates synchronized multimedia with HTML. This standard is call HTML+TIME and has been proposed to the W3C as a competing standard. The W3C has characterized this standard as "extending SMIL into the browser" so learning SMIL won't be a dead end
26/05/2001SMILManousos Bouloukakis
A Sample Presentation
26/05/2001SMILManousos Bouloukakis
A Sample Presentation
26/05/2001SMILManousos Bouloukakis
A Sample Presentation
26/05/2001SMILManousos Bouloukakis
A Sample SMIL file
<smil>
<head>
<meta name="copyright" content="Your Name" />
<layout>
<!-- layout tags --> </layout>
</head>
<body>
<!-- media and synchronization tags -->
</body>
</smil>
26/05/2001SMILManousos Bouloukakis
Making of a SMIL
The making of a SMIL presentation is basically, these three things:
Create the areas for your media.
Fill in those areas with media objects.
Determine the order, in which to play them in sequence, parallel or combination of bothof both
26/05/2001SMILManousos Bouloukakis
How to write a SMIL document
What you need to create a SMIL document is... a simple text editor! SMIL is XML-based and is very similar with HTML and this makes the language easy to read and understand.
There are however differences between SMIL and HTML
SMIL is case-sensitive. All tags must be written in lower case.
SMIL is XML-based. Tags have to be ended.
26/05/2001SMILManousos Bouloukakis
So what do we need to specify?
26/05/2001SMILManousos Bouloukakis
Content — Instance of Media Item
26/05/2001SMILManousos Bouloukakis
Media Object Elements
26/05/2001SMILManousos Bouloukakis
Specification of part of media item
26/05/2001SMILManousos Bouloukakis
Clips in time
26/05/2001SMILManousos Bouloukakis
Spatial Layout
26/05/2001SMILManousos Bouloukakis
A Sample SMIL file
<smil>
<head>
<meta name="copyright" content="Your Name" />
<layout>
<!-- layout tags --> </layout>
</head>
<body>
<!-- media and synchronization tags -->
</body>
</smil>
26/05/2001SMILManousos Bouloukakis
The Layout Element
The layout element determines how the elements in the document's body are positioned on an abstract rendering surface (either visual or acoustic).
The layout element must appear before any of the declared layout is used in the document. If present, the layout element must appear in the head section of the document. If a document contains no layout element, the positioning of the body elements is implementation-dependent.
26/05/2001SMILManousos Bouloukakis
root-layout element
The root-layout element determines the value of the layout properties of the root element, which in turn determines the size of the window in which the SMIL
presentation is rendered.
26/05/2001SMILManousos Bouloukakis
root-layout element attributes
Background-Color Note that the default background color is transparent, which implies that, by default, the implementation-dependent window background will be shown.
height
Sets the height of the root element. Only length values are allowed.
width
Sets the width of the root element. Only length values are allowed.
Element content
The root-layout element is an empty element.
26/05/2001SMILManousos Bouloukakis
root-layout element example
<layout>
<root-layout width="320" height="480“ background-color="white" />
</layout>
26/05/2001SMILManousos Bouloukakis
Region Element
26/05/2001SMILManousos Bouloukakis
Regions in our Example
26/05/2001SMILManousos Bouloukakis
Layout Adaptation in SMIL
26/05/2001SMILManousos Bouloukakis
The <img> Tag
<smil> <head> <layout>
<root-layout width="300" height="200" background-color="white" />
<region id="vim_icon" left="75" top="50" width="32" height="32" />
</layout> </head>
<body>
<img src="vim32x32.gif" alt="The vim icon" region="vim_icon" />
</body>
</smil>
26/05/2001SMILManousos Bouloukakis
<img> tag example
26/05/2001SMILManousos Bouloukakis
Clips in Space
26/05/2001SMILManousos Bouloukakis
Make your medium fill its area
<smil> <head> <layout> <root-layout width="147" height="116" background-color="yellow" /> <region id="region_1" left="8" top="10" width="116" height="81“
background-color="white" fit="fill" /> </layout> </head> <body> <!-- this image is smaller than its region --> <img src="madewithcss.gif" region="region_1" /> </body> </smil>
26/05/2001SMILManousos Bouloukakis
Make your medium meet its area
<layout> <root-layout width="147" height="116" background-color="yellow" />
<region id="region_1" left="8" top="10" width="116" height="81"
background-color="white" fit="meet" /></layout>
26/05/2001SMILManousos Bouloukakis
Make your medium scroll within its area
<layout> <root-layout width="147" height="116" background-color="yellow" /> <region id="region_1" left="8" top="10" width="116" height="81"
background-color="white" fit="scroll"/></layout>
26/05/2001SMILManousos Bouloukakis
The fourth dimension: time!
26/05/2001SMILManousos Bouloukakis
Which Time?
26/05/2001SMILManousos Bouloukakis
Duration of a media object element
26/05/2001SMILManousos Bouloukakis
Duration of a Media Object Element ctd.
26/05/2001SMILManousos Bouloukakis
Start Time of elements - par
26/05/2001SMILManousos Bouloukakis
Start Time of elements - seq
26/05/2001SMILManousos Bouloukakis
Par’s and seq’s can be nested
26/05/2001SMILManousos Bouloukakis
Explicit start time in a par element
26/05/2001SMILManousos Bouloukakis
Start time relative to another element
26/05/2001SMILManousos Bouloukakis
End time of media object element
26/05/2001SMILManousos Bouloukakis
End time of par element— first
26/05/2001SMILManousos Bouloukakis
Alternate Content
26/05/2001SMILManousos Bouloukakis
Adaptation Issues
26/05/2001SMILManousos Bouloukakis
Specifying Adaptation in SMIL
26/05/2001SMILManousos Bouloukakis
SMIL Test Attributes
26/05/2001SMILManousos Bouloukakis
Specifying alternative behaviour
switch
• At most one of the children of a switch element is played.
• The first acceptable element is chosen, so ordering should be best first.
<switch>
<audio system- bitrate=" 44000" src=" hi-res. aiff" /><audio system- bitrate=" 16000" src=" low- res. aiff" />
</ switch>
• Test attributes can be combined.
26/05/2001SMILManousos Bouloukakis
New Content Control in 2.0
Prefetch
• Control, timing, and adaptation of pre- loading media before its presentation
• Helps whole presentations progress with fewer hitches
Custom Test Attributes
• Anyone can define adaptive test attributes for use in SMIL
26/05/2001SMILManousos Bouloukakis
Prefetch example
<smil>
<body>
<seq>
<par>
<prefetch id="endimage" src="http://www.example.org/logo.gif"/>
<text id="interlude" src=http://www.example.org/pleasewait.html fill="freeze"/>
</par> <video id="main-event" src="rtsp://www.example.org/video.mpg"/>
<image src="http://www.example.org/logo.gif" dur="5s"/>
</seq>
</body>
</smil>
26/05/2001SMILManousos Bouloukakis
Linking
26/05/2001SMILManousos Bouloukakis
Link from element to presentation
26/05/2001SMILManousos Bouloukakis
Link from element to element
26/05/2001SMILManousos Bouloukakis
Link from element to subpart of media object
26/05/2001SMILManousos Bouloukakis
Areas as source and destination of a link
26/05/2001SMILManousos Bouloukakis
Media object element revisited
<video id=" vid1" region=" R_ video"src=" rtsp:// www. w3. org/ CoolStuff. rm"clip- begin=" smpte= 00: 01: 19: 20"clip- end=" smpte= 00: 01: 38: 40"begin=" 3s"dur=" 22s"end=" 21s"alt=" Video of Joe chatting to Tim"longdesc=" Joe and Tim are in a meeting room. Joe
is ontheleft and Tim is on the right"title=" Joe greets Tim"system- bitrate=" 28800">
<area id=" joe" begin=" 0s" end=" 5s" coords=" 0%, 0%, 50%, 50%"
href=" http:// www. w3. org/" /> <area id=" tim" begin=" 5s" end=" 10s" coords=" 50%, 50%, 50%, 50%"href=" http:// www. w3. org/ Tim" /></ video>
26/05/2001SMILManousos Bouloukakis
Semantic annotations
SMIL meta element defines properties of a document
• The name attribute is the property and the content attribute gives the value.
<meta name=" title" content=" Web News, 15th June 1998" />
<meta name=" base" content=" http:// www. cwi. nl/ SMIL/ webnews/" />
• The list of properties (values of name attribute) are open- ended.
Attributes on par , seq and media object elements
abstract , author , copyright , title (recommended)
Attributes on media object elements
alt (contains alternative text, recommended),
longdesc (supplement to alt , but longer and should include descriptions
of areas)
Attributes on region elements
title (recommended)
26/05/2001SMILManousos Bouloukakis
Dynamic generated SMIL
Because of the text format of a SMIL document, it’s easy to be generated (like html) using standard technologies such as
CGI’s, PHP, Servlets. So we can have a SMIL document driven by a RDBMS or by User’s Selections.We will see an example of using
Java Servlets and Webmacro.
26/05/2001SMILManousos Bouloukakis
WebMacro Templates
WebMacro is based in Java’s Servlet technology.It is a script language that separate content from presentation layer(Model View Controller).It can be used to generate dynamic pages (HTML pages,Wap,XML,SMIL..). User can use an ordinary editor (text editor,html editor) in order to make a page template with tags that webmacro engine evaluate on the fly. For more info visit http://www.webmacro.org
26/05/2001SMILManousos Bouloukakis
System Architecture
SERVLET ENGINE
JAVA SERVLET
WEBMACRO TEMPLATE
INTERNET
WEBSERVER
CLIENT
DATABASE
26/05/2001SMILManousos Bouloukakis
WebMacro Script Template
<body>
<par title="multiplexor">
<video src="$VIDEO" id="Video"
region="VideoChannel" title="Video"/>
<img src="$IMAGE" id="Headline Pix"
region="PixChannel" title="Headline Pix"/>
<text src="$TEXT" id="Ticker"
region="TextChannel" title="Ticker"/>
</par>
</body>
26/05/2001SMILManousos Bouloukakis
WebMacro Servlet
Handle (Webmacro context) {
context.put(“VIDEO”,” http://stream.internet.com/wdvl/wdvl.rm”);
context.put(“IMAGE”,” http://stream.internet.com/wdvl/wdvl.rp”);
context.put(“TEXT”,” http://stream.internet.com/wdvl/wdvl.rt”);
return getTemplate(“SMILDEMO.smil”);
}
You call here any Java Object in order to put the right content px a Result Set from a DB
26/05/2001SMILManousos Bouloukakis
Extensions to SMIL
www.real.com has develop some formats for Pictures, Text,Video that help to create powerful presentations.
•RealText
•RealAudio
•RealPix
26/05/2001SMILManousos Bouloukakis
The RealPix Format
•Based on XML
•Support Dynamic Image Effects (wipe,fade,cross fade)
•One RealPix file combine many images.
•Time information can be included.
•Used by RealPlayer product.
26/05/2001SMILManousos Bouloukakis
A Sample RealPix file
<imfl>
<head
timeformat="dd:hh:mm:ss.xyz“ duration="0:20“ bitrate="12000“ preroll="0:10"
width="256"
height="256"
aspect="true"/>
<image handle="1" name="mosque.jpg"/>
<fadein start="0:01" duration="0:03" target="1"/>
<!-- Zoom in. -->
<viewchange start="0:05" duration="0:03" srcx="32" srcy="32"
srch="192"/>
<!-- Zoom in even more. -->
<viewchange start="0:10" duration="0:03" srcx="64" srcy="64" "
srch="128"/>
<viewchange start="0:15" duration="0:03" srcx="0" srcy="0" "
srch="256"/> <!-- Zoom out. -->
</imfl>
26/05/2001SMILManousos Bouloukakis
The previous example
26/05/2001SMILManousos Bouloukakis
Deployment
There are many ways to publish a SMIL presentation to WEB:
•If the browser support SMIL (hope to) then just add a link to the web page as usual
•Through a link and automatically open a SMIL compatible application (Real Player,..).
•Include a small applet (SOYA-http://www.helio.org) and pass the SMIL file as an parameter.
26/05/2001SMILManousos Bouloukakis
Using SOJA Applet
Inside your HTML code add this
<APPLET CODE="org.helio.soja.SojaApplet.class"
ARCHIVE="soja.jar" CODEBASE="../tutorial/"
WIDTH="400" HEIGHT="300">
<PARAM NAME="source" VALUE="demo.smil">
<PARAM NAME="bgcolor" VALUE="#000066">
</APPLET>
Location of Soja
SMIL file
Other parameters to applet
26/05/2001SMILManousos Bouloukakis
Embedded SMIL in HTML
Ordinary HTML Code
SMIL presentation
26/05/2001SMILManousos Bouloukakis
HTML+TIME
•Based on SMIL 2.0 Recommendation•Embedded in Internet Explorer 5.5
<HTML XMLNS:t ="urn:schemas-microsoft-com:time"> <HEAD> <STYLE> .time {behavior: url(#default#time2);} </STYLE> <?IMPORT namespace="t" implementation="#default#time2"> </HEAD> <BODY> <t:SEQ> <DIV CLASS="time" DUR="2">First line of text.</DIV> <DIV CLASS="time" DUR="2">Second line of text.</DIV> <DIV CLASS="time" DUR="2">Third line of text.</DIV> <DIV CLASS="time">Fourth line of text.</DIV> </t:SEQ> </BODY> </HTML>
26/05/2001SMILManousos Bouloukakis
End of presentation
Useful Links
•http://www.w3.org/AudioVideo/•http://www.xsmiles.org/•http://www.w3.org/TR/smil20/•http://www.helio.org/
Authoring Tools•Ezer by SMIL Media •Fluition by Confluent Technologies •Grins by Oratrix •HomeSite by Allaire •MAGpie, a captioning tool by WGBH •Perly SMIL, a SMIL 1.0 Perl module •RealSlideshow 2.0 by RealNetworks •SMIL Composer SuperToolz by HotSausage •Smilme by Aurora •TAG Editor 2.0 - G2 release by Digital Renaissance ??? •VeonStudio by Veon •Validator: SMIL 1.0, SMIL 2.0, SMIL 2.0 Basic and XHTML+SMIL by CWI.