10.02.2013 Views

Distributed Multimedia Systems - BSCW Shared Workspace Server

Distributed Multimedia Systems - BSCW Shared Workspace Server

Distributed Multimedia Systems - BSCW Shared Workspace Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong><br />

9. <strong>Multimedia</strong> Adaptation<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 1


• Best effort<br />

• Reservation<br />

• Adaptation<br />

Resource Management<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 2


• Enough food: do nothing<br />

• Not enough food<br />

Adaptation in general<br />

a) Learn to live with few<br />

(defensive adaptation)<br />

b) Learn to find better place<br />

(offensive adaptation)<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 3


The Adaptation Principle<br />

• In the case of shortage of resources<br />

– Be creative, instead of giving up<br />

• Stream-level (defensive) adaptivity<br />

– We adapt – typically reduce – the quality of the<br />

streams to the given constraints<br />

– E.g. usage of layered encoding or priority information<br />

• System-level (offensive) adaptivity<br />

– We try to acquire more or better resources<br />

– Components migrate/replicate in the network<br />

• Application-level adaptivity<br />

– E.g. use a smaller window, a different representation<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 4


Media <strong>Server</strong><br />

LAN<br />

Meta-Database<br />

LAN<br />

DMMS architecture<br />

Streaming video<br />

LAN<br />

Router<br />

WAN<br />

Business Users<br />

“Last<br />

mile“<br />

Proxy <strong>Server</strong><br />

Business Users<br />

Home Users<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 5<br />

LAN


What is wrong with video streaming?<br />

• video ≠ video<br />

1. We may get the wrong video<br />

– Bad search facilities<br />

2. We may get the wrong quality-variation<br />

– E.g too high quality level for a PDA<br />

3. We may get the proper variation in bad quality<br />

– E.g jitter is too high<br />

4. We may get the video at the wrong time<br />

– E.g. too high start-up delay<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 6


What can be done better?<br />

• WYNWYG: What You Need is What You Get<br />

– A kind of context-awareness<br />

1. Provide good semantic search<br />

– CODAC project, MPEG-7<br />

2. Acquire the client’s QoS capabilities and<br />

requirements and adapt the videos to them<br />

– Covered by our QBIX project, MPEG-21<br />

3. Bring the video as near to the client as necessary<br />

– Covered by our ADMS video server and X2X projects<br />

4. Monitor and predict client behavior and try to act<br />

proactively<br />

– Covered by our ADMS video server and X2X projects<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 7


Stream Scaling<br />

• Temporal Scaling<br />

– Only a subset of all video data is used<br />

• Spatial Scaling<br />

– Reduction of the resolution<br />

• Frequency Scaling<br />

– Reduction of the DCT coefficients (per block)<br />

• Quantization Scaling<br />

• Color Scaling<br />

– Chrominance information is reduced (by FS or QS)<br />

• Transcoding<br />

– Transformation between compression formats<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 8


Adaptive Video <strong>Server</strong><br />

� # of nodes changes dynamically<br />

� Replicate/Migrate functions<br />

Data Manager<br />

New DC<br />

Data Collector<br />

� Host recommendation<br />

� Offensive adaptation<br />

Cluster <strong>Server</strong><br />

New DMs<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 9


AMS Component Architecture<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 10


Advantages compared to static distribution<br />

• Increased scalability due to proactive server-level<br />

adaptations by regarding<br />

– client locality, client request parameters and variations in<br />

object popularities<br />

• Reduced startup delay and network traffic<br />

– due to near-to-client service<br />

• Increased load-balancing by<br />

– dynamically allocating nodes for DMs and DCs<br />

• Increased resource usage by sharing idle nodes<br />

with other types of adaptive applications<br />

– e.g. adaptive web-server<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 11


Video Proxy Caching - Motivation<br />

• Original motivation for Caching<br />

1. Reduce network traffic<br />

2. Reduce server load and<br />

3. Reduce response time<br />

• Special motivation for the future<br />

– <strong>Multimedia</strong> content increases<br />

– Video data will dominate<br />

• Problem<br />

– Actual caching mechanisms are designed for typical<br />

web pages (web objects)<br />

– Videos are big<br />

+ But videos follow the WORM-principle<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 12


• Caches popular data<br />

– <strong>Server</strong> for clients<br />

– Client for servers<br />

What is a Proxy Cache?<br />

• Adaptive MPEG-4 Proxy<br />

– Caches MPEG-4 videos<br />

– Change properties of the cached videos:<br />

• bit rate, frame rate,<br />

• size, color, …<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 13


Video Caching Proposals<br />

• Full Caching (Original Caching)<br />

– Not efficient (store small number of videos)<br />

– But: Companies do it (Real Networks, Inktomi etc.)<br />

• Partial Caching (cache specific parts)<br />

– Prefix Caching (reduce start-up latency)<br />

– Cache whole videos, remove parts from the tail<br />

– Cache variable parts (bursts)<br />

– Popularity based partial caching etc.<br />

• Problems<br />

– Overhead, Interactivity, loose original advantages<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 14


Video Caching Proposals<br />

• Quality-based caching<br />

– Use different quality levels at replacement<br />

1. Quality reduction (replacement)<br />

2. Quality adaptation (reduce and restore quality)<br />

– Number of videos (hits) increases<br />

– Can be time and<br />

resource (CPU)<br />

consuming<br />

– Proper range of quality<br />

adaptation<br />

– Reload (modeling,<br />

realization)<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 15


User<br />

constraints<br />

QBIX - Design<br />

Video<br />

variations<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 16


Read from IO<br />

Adaptation Engine<br />

Adapt<br />

Write to IO<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 17


Session Management<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 18


Proxy Gateway Scenario<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 19


Quality Based Intelligent ProXy (QBIX)<br />

• QBIX tailors videos to the requirements of the<br />

client and caches the result<br />

– Must be supported on client side by providing metadata,<br />

such as<br />

• Terminal Capabilities, User Preferences (MPEG-21)<br />

– Caching (LRU)<br />

• Finding the best version for a client<br />

– Maximize Q for reasonable costs<br />

• Gain<br />

– Gateway functionality<br />

– Request filtering<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 20


• Feature Set<br />

Calculating Quality<br />

– Visual: F={dimX, avgBitRate, color, fps}<br />

• dimY can be calculated from the aspect ratio<br />

– Audio: F={samplingRate, numOfChannels, avgBitRate}<br />

– Other: F={avgBitRate}<br />

• Request<br />

– A request R specifies for each feature x ⊂ F an<br />

acceptance range with an associated weight for<br />

importance:<br />

[min, best, max] / weight<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 21


Calculating Quality<br />

• A request R specifies for each feature x ε F an acceptance range with<br />

associated weight (importance)<br />

range X =[min, best, max] / weight<br />

– val x is the feature value of a stream for feature x<br />

• Q(val x,range x,imp. x)=<br />

– Max. if, val x = best<br />

– Q x = weight, if best<br />

– Q x = 0, if val x outside<br />

• Quality (F)=<br />

Q(<br />

F ) =<br />

0,<br />

∃x<br />

∈<br />

| F |<br />

∑<br />

x=<br />

1<br />

Q(<br />

val<br />

x<br />

F<br />

|<br />

, range<br />

Q<br />

x<br />

x<br />

=<br />

0<br />

∧<br />

, weight<br />

x<br />

weight<br />

) ,<br />

else<br />

x<br />

><br />

0<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 22


Cost Function - Requirements<br />

• QoS control doesn’t work without a notion of cost<br />

• The higher the actual load of a resource, the<br />

higher is the price to use that resource<br />

• Cache hits should be preferred over cache misses<br />

• It should be possible to assign weights to<br />

resources, according to their importance<br />

• Maximize quality if enough resources are<br />

available<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 23


Cost Function<br />

• For a given timepoint t, the load of the resources network<br />

(NET), disk (HD) and CPU (CPU) is known.<br />

• Each resource has a price<br />

– p net , p hd , p cpu<br />

• Each request r consumes on average a certain percentage of<br />

each resource per second<br />

– net r , hd r , cpu r<br />

• AdmissionControl<br />

NET+net r < 1, CPU + cpu r


Example<br />

• Source: dimX=352, bitrate=750000 bps,<br />

color=true, framerate=30.00 fps<br />

• Request:<br />

– dimX: (256, 320, 352)/0.20<br />

– bitrate: (300000,512000, 768000)/0.20<br />

– color: (1,1,1)/0.20<br />

– framerate: (15.00, 25.00, 30.00)/0.20<br />

– maximum delay: (0,0,1000)/0.20<br />

• 10 Mbit/sec network, 10MB/sec disk, 75*10^6<br />

pixels/sec CPU<br />

• Price for all resources=10, Cache Miss<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 25


• First check source<br />

Example (2)<br />

• Then check all versions that can be created<br />

according to stream creation rules<br />

– (264,456184,{15,20,25,30})<br />

– (308,{310460,620920},{15,20,25,30})<br />

– (352, 405504,{15,20,25,30})<br />

– 16 versions in total (+ source)<br />

• Color always true<br />

• Let’s assume two cases<br />

a) CPU-load is 0, load on net and HDD is 0<br />

b) CPU-load is 80%, load on net and HDD is 0<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 26


Example (check possible variants)<br />

• Load on CPU is 0 (top) resp. 0.8 (bottom)<br />

Features Res.Cost Quality FinalCost<br />

(264,456184,25.0)<br />

(308,620920,25.0)<br />

(352,405504,25.0)<br />

(352,750000,30.0)<br />

Features<br />

(264,456184,25.0)<br />

(308,620920,25.0)<br />

(352,405504,25.0)<br />

(352,750000,30.0)<br />

3.260879<br />

3.847359<br />

4.009895<br />

2.259521<br />

Res.Cost<br />

15.820722<br />

27.648633<br />

74.245014<br />

2.259521<br />

0.695109<br />

0.789666<br />

0.629579<br />

0.372656<br />

Quality<br />

0.695109<br />

0.789666<br />

0.629579<br />

0.372656<br />

0.994212<br />

0.809232<br />

1.485350<br />

1.417497<br />

FinalCost<br />

4.823595<br />

5.815458<br />

27.501922<br />

1.417497<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 27


Advantages of QoS aware proxy-ing<br />

• Automatically adjusts itself to request pattern<br />

– can act as dynamic gateway<br />

• Considers costs, quality and resource usage<br />

• Adaptation in the decompressed domain is<br />

feasible when combined with admission control<br />

and cost/quality function<br />

– Layered encoding will help<br />

– few devices will request adaptation<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 28


<strong>Multimedia</strong> Presentations (Scenes)<br />

• Scenes are composed of media objects<br />

– Video, audio, text, images,…<br />

• Scene Description specifies the content of the scene to be<br />

presented<br />

• Spatial and temporal model<br />

is interpreted by the player<br />

• Interaction with the user is<br />

possible<br />

• Standards like SMIL,<br />

MPEG-4 (BIFS, XM-T)<br />

• LASeR<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 29


IOD<br />

MPEG-4 content access example<br />

Scene Description Stream<br />

Object Descriptor Stream<br />

Visual Stream<br />

Visual Stream<br />

Visual Stream<br />

Audio Stream<br />

...<br />

Interactive Scene Description<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 30


Scene-based Adaptation<br />

• Goal: A single presentation should<br />

be dynamically optimized according<br />

to<br />

1. The available resources of dev. +<br />

nw. (Adaptation)<br />

2. The preferences of the user<br />

(Personalization)<br />

� Possible Adaptations<br />

� Low Bandwidth<br />

- Replace with still images<br />

� Small Screen faces<br />

- Zoom active person<br />

- Switch between persons<br />

- Enlarge text<br />

� Muted Device<br />

- Provide subtitles<br />

• Quality metrics for multimedia<br />

presentations and performance of<br />

adaptations<br />

• Generic approach for adaptation<br />

and personalization of scenes<br />

and presentations<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 31


State-of-the art Streaming<br />

• Client/<strong>Server</strong><br />

– Scalability is poor, single point of failure<br />

– The distance of source and destination is fix<br />

• P2P<br />

– Too fragile: streaming may take longer than usual<br />

connectivity time of client nodes<br />

– Not transparent to the clients<br />

• Content Distribution Networks (CDN)<br />

– Static configuration<br />

– Expensive and proprietary solutions<br />

– Not transparent to the content providers<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 32


CDN-Example (Akami)<br />

• Client requests are redirected to “best” Akamai<br />

server<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 33


ProXy-to-ProXy (X2X) Streaming<br />

• Content is replicated/migrated to proxies<br />

– Full resp. partial replication, the latter in different domains:<br />

time, quality, semantics…<br />

• Proxies are usually always on<br />

• Proxies build layered networks covering small<br />

“geographic” regions<br />

• Clients are redirected to the nearest group, resp.<br />

new group is created if necessary<br />

• Combination of P2P and CDN technology<br />

– Low cost, high availability<br />

– Transparent both to provider and client<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 34


X2X Architecture<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 35


X2X Architecture and Affinity<br />

• Groups are built based on group<br />

affinity<br />

– Weighted ∑ of Network Closeness,<br />

Semantic Closeness and load balance<br />

• Clients find their group of client affinity<br />

– Weighted ∑ of NW, SC and load lightness<br />

• Videos are replicated to groups to<br />

they have a content affinity<br />

• Affinity function descr. in XML<br />

– The behavior of the system can be<br />

dynamically “reprogrammed”<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 36


Multiple Source Streaming<br />

� Increase number of serviceable requests<br />

� May solve some last mile problems<br />

E.g. ADSL: download bandwidth<br />

>> upload bandwidth<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 37


Advantages of X2X + QBIX together<br />

• QBIX realizes a defensive adaptation strategy<br />

and adapts the multimedia data to the clients’<br />

need<br />

– For QBIX a reactive mode is sufficient,<br />

– especially if layered coding available<br />

• X2X realizes offensive adaptation strategy and<br />

brings the resources near to their clients<br />

– X2X adaptation itself can be time consuming (we copy<br />

entire videos)<br />

– Proactive mode is advisable:<br />

– Client behavior prediction<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 38


Client behavior prediction (1)<br />

• Client behavior is periodically monitored<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 39


Client behavior prediction (2)<br />

• Video is proactively replicated<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 40


General Conclusions<br />

• State-of-the art video delivery is insufficient<br />

1. Videos must be adapted to the available<br />

resources and the user requirements<br />

2. Videos must be brought to the proper place to<br />

provide smooth streaming<br />

3. Client behavior prediction enables proactive<br />

offensive and defensive adaptation<br />

László Böszörményi <strong>Distributed</strong> <strong>Multimedia</strong> <strong>Systems</strong> <strong>Multimedia</strong> Adaptation - 41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!