AnswersSearchHelp
Boston University home page
Creating Multimedia with SMIL
 
 
   
    SMIL Concepts
 
 
 
 
 
    Layout
 
 
 
 
 
    Timing
 
 
 
 
    Practice
 
 
 
 
    Also See
   
   
    A/V Tutorials
   
   
   
   
   
   
   
   
    Vendor Sites
   
   

Begin and End Times For Clips

You can specify when a particular clip or group of clips will begin to play within the presentation, as well as when it should end. Note: if you specify an end time that is longer than the length of the actual clip, you will need to decide what happens within the clip's region after it finishes.

The begin attribute is added to the media source tag:

<audio src="rtsp://realserver.bu.edu:554/a/v/av/nis/training/smil/driving.rm" begin="20.5s" />

This clip will start to play 20.5 seconds after the start of the presentation.

Were this clip in a <par> group, the begin attribute would start the clip playing back 20.5 seconds after the group becomes active.

If the clip were in a <seq> group, the attribute would delay the clip's normal playback by inserting 20.5 seconds of blank time before the clip starts (and thus delaying all the other items within the group). Timing is relative to the start of the <seq> or <par> group, not the start of the overall presentation.

Additionally, you can set an end attribute:

<audio src="rtsp://realserver.bu.edu:554/a/v/av/nis/training/smil/driving.rm" begin="20.5s" end="30.0s" />

In this example, the clip ends 30 seconds into its part of the presentation timeline, playing a total of 9.5 seconds regardless of the length of its internal timeline.

Durations

Another way to indicate the beginning and ending of a clip is the dur (duration) parameter. If you are using a sequence of still images, you set the beginning time for the first one, and use the dur parameter to indicate how long it will play. Subsequent images need only the dur parameter as each will start as soon as the previous one finishes.

Begin and End Times Within Specific Clips

The clip-begin and clip-end attributes specify a clip's internal timing marks where playback begins and ends. You can use them with clips that have internal timelines, such as audio, video, and animation. Do not use them with groups or static clips such as still images. The following example is for an audio clip:

<audio src="rtsp://realserver.bu.edu:554/a/v/av/nis/training/smil/driving.rm" clip-begin="10s" clip-end="15s"/>

Here, the clip starts playing at its internal 10-second mark rather than at its actual beginning. It stops when it reaches its 15-second mark, having played for a total of 5 seconds.

 

WebCentral UsingPublishingLearningTrainingConsultingWebCentral
AnswersSearchHelp
NIS  |  OIT  |  Boston University  |   October 24, 2002