cs 414 - spring 2012 cs 414 – multimedia systems design lecture 26 – synchronization issues...

33
CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Upload: lenard-shields

Post on 12-Jan-2016

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

CS 414 - Spring 2012

CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues

Klara Nahrstedt

Spring 2012

Page 2: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Administrative MP2 posted MP2 Deadline – April 7, Saturday, 5pm.

CS 414 - Spring 2012

Page 3: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Covered Aspects of Multimedia

Image/VideoCapture

MediaServerStorage

Transmission

CompressionProcessing

Audio/VideoPresentationPlaybackAudio/Video

Perception/ Playback

Audio InformationRepresentation

Transmission

AudioCapture

A/V Playback

Image/Video InformationRepresentation

CS 414 - Spring 2012

Page 4: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Internet Multimedia Protocol Stack

CS 414 - Spring 2012

AAL3/4

IP Version 4, IP Version 6

UDP

Media encaps(H.264, MPEG-4)

RTP

ATM/Fiber Optics Ethernet/WiFi

TCP

SIP RTSP RSVP RTCP

AAL5

KE

RN

EL

AP

PLIC

AT

ION

Layer 4(Transport)

Layer 3(Network)

Layer 2(Link/MAC)

Layer 5(Session)

MPLS

DCCP

DASH

HTTP

Synchronization Service

Page 5: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Outline

Synchronization Specification Interval-based SpecificationTimeline Specification Control Flow based Specification Event-based Specification

CS 414 - Spring 2012

Page 6: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Requirements on Synchronization Specs

Object consistency and maintenance of sync specifications Media objects should be kept as one LDU in spec

Temporal relations must be specify-able Easy Description of Sync Relations Definition of QoS requirements Integration of time-dependent and independent

media Hierarchical levels of synchronization

CS 414 - Spring 2012

Page 7: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Sync Spec Models

Interval Timeline Flow-control

Hierarchical Reference points

Event-based

Common threads provide language to

express relationships runtime system to

monitor relationships policies to enforce

relationships

CS 414 - Spring 2012

Page 8: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Interval-based Specification (1) Presentation duration of an object is

specified as interval Types of temporal relations:

A before B, A overlaps B, A starts B, A equals B, A meets B, A finishes B, A while B

Enhanced interval-based model includes 29 interval relations, 10 operators handle temporal relations (e.g., before(δ1),…)

CS 414 - Spring 2012

Page 9: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Interval Model (2)

13 relationships between two intervals

BeforeA B

MeetsA B

While A

B

Overlaps A

B

Starts A

B

Ends A

BEqual A

B

CS 414 - Spring 2012

Page 10: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Example (3) Audio1 while(0,0) Video

Audio1 before(0) RecordedInteraction

RecordedInteraction before(0) P1

P1 before(0) P2

P2 before(0) P3

P3 before(0) Interaction

P3 before(0) Animation

Animation while(2,5) Audio2

Interaction before(0) P4

CS 414 - Spring 2012

Page 11: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Interval-based Specification (4)

Advantages: Easy to handle open LDUs (i.e., user

interactions)Possible to specify additional non-deterministic

temporal relations by defining intervals for durations and delays

Flexible model that allows specification of presentations with many run-time presentation variations

CS 414 - Spring 2012

Page 12: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Interval-based Specification (5)

Disadvantages:Does not include skew specDoes not allow specification of temporal

relations directly between sub-units of objectsFlexible spec leads to inconsistencies

Example:A NOT in parallel with B

A while(2,3) I

I before(0) B

CS 414 - Spring 2012

Page 13: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Timeline Axis-based Specification Presentation events like start and end of

presentation are mapped to axes that are shared by presentation objects

All single medium objects are attached to time axis that represents abstraction of real-time

This sync specification is very good for closed LDUs

CS 414 - Spring 2012

Page 14: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Timeline Model (2)

Uses a single global timeline

Actions triggered when the time marker reaches a specific point along timeline

CS 414 - Spring 2012

Page 15: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Example (3)

Define a timed sequence of images, each image has a caption that goes with it

I1

C1

t1

I2

C2

t2

I3

C3

t3

CS 414 - Spring 2012

Page 16: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Example (4)

Rule language

At (t1), show (I1, C1) At (t2), show (I2, C2) At (t3), show (I3, C3)

Visual environment

CS 414 - Spring 2012

Page 17: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Control Flow-based Spec - Hierarchical Model (1) Possibility to specify concurrent presentation threads at

predefined points of presentation Basic hierarchical spec types:

Serial synchronization Parallel synchronization of actions

Actions: atomic or compound Atomic action handles presentation of single media object, user

input, delay Compound actions are combinations of sync operators and

atomic actions Delay is atomic action – allows modeling of delays in serial

presentations

CS 414 - Spring 2012

Page 18: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Hierarchical Model (SMIL)

Based on sequential and parallel

Apply operators to only the start/end points of each media object

I1 I2 I3 I1 T1

CS 414 - Spring 2012

Page 19: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Example (3)

Narrated slide show image, text, audio on each slideselect link to move to the next slide

S1 A1 T1

I1 S2 A2 T2 I2

CS 414 - Spring 2012

Page 20: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Example (4) (and Comparison with Interval-based Spec)

CS 414 - Spring 2012

Audio1 while(0,0) Video

Audio1 before(0) RecordedInteraction

RecordedInteraction before(0) P1

P1 before(0) P2

P2 before(0) P3

P3 before(0) Interaction

P3 before(0) Animation

Animation while(2,5) Audio2

Interaction before(0) P4

Page 21: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Control Flow-based Spec – Hierarchy (5) Advantages

Easy to understand Natural support for

hierarchies Integration of

interactive object easy

Disadvantage Need additional

descriptions of skews and QoS

No duration description

CS 414 - Spring 2012

Page 22: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Control Flow-based Spec – Reference Points (1)

Time-dependent single medium objects are regarded as sequences of closed LDUs

Start/stop times of object presentation are reference points

Connected reference point is synchronization point

Temporal relations specified between objects without explicit reference to time

CS 414 - Spring 2012

Page 23: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Example (2)

CS 414 - Spring 2012

Page 24: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Control Flow-based Spec – Reference Points (3) Advantages:

Sync at any time during presentation of objects

Easily integrated object presentation with unpredictable duration

Intuitive type of synchronization spec Disadvantages:

Not easy way to detect inconsistenciesCannot specify delays in presentation

CS 414 - Spring 2012

Page 25: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Event-based Specification

Presentation actions initiated by synchronization events

Example: Start presentationStop presentationPrepare presentation

Events initiating presentation External or internal

CS 414 - Spring 2012

Page 26: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Event-based Spec

Advantage: Easily extended to new sync typesEasy integration of interactive objects

Disadvantage: Difficult to handle in case of realistic scenariosToo complex specificationNeed separate description of skew/QoSDifficult use of hierarchies

CS 414 - Spring 2012

Page 27: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Associate actions with expressions Expressions may contain scalars, clocks,

variables, relations, and connectives When the expression becomes TRUE,

invoke associated action

When “Time > Q.end + 5 && !Response” Answer=WRONG

Event Model (Nsync)

Source: B. Bailey et al. “Nsync- A Toolkit for Building Interactive Multimedia Presentations”, ACM Multimedia 1998CS 414 - Spring 2012

Page 28: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

OverviewOverview

NoNo

YesYes

MoreMoreInfo?Info?

DetailedDetailedNarrationNarration

More InfoMore InfoMore InfoMore Info

Example: Delayed Transition

CS 414 - Spring 2012

Page 29: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Model SpecificationWhen “Narration >= Overview &&

!MoreInfo” NextSlideWhen “Narration >= Overview && MoreInfo” PlayDetails

When “Narration >= Overview + Details” NextSlide

Narration: narration’s logical timeline

Overview: normal transition point

Details: additional narrative details

MoreInfo: records kitchen info statusCS 414 - Spring 2012

Page 30: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Reactive Interface

CS 414 - Spring 2012

Page 31: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Model Specification

When “Video >= 0 && Video < T1” Select Kitchen

When “Video >= T1 && Video < T2” Select Deck

When “Video >= T2 && Video <= T3” Select Yard

CS 414 - Spring 2012

Page 32: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Synchronization/Editing Tool in CS/UIUC Vegas Video http://www.sonycreativesoftware.com/vegaspro

CS 414 - Spring 2012

Page 33: CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 26 – Synchronization Issues Klara Nahrstedt Spring 2012

Conclusion

Synchronization Specifications Important for different authoring tools for

complex presentationBe careful as you go from one spec to

anotherCarefully consider which spec closest allows

you to specify sync requirements in your application

CS 414 - Spring 2012