24
Distributed Video Streaming Distributed Video Streaming Over Internet Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Distributed Video Streaming Distributed Video Streaming Over InternetOver Internet

Thinh PQ Nguyen and Avideh Zakhor

Berkeley, CA, USA

Presented By Sam

Page 2: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

AgendaAgenda

MotivationsMotivations AssumptionsAssumptions System overviewSystem overview

ProtocolProtocol Rate allocation algorithmRate allocation algorithm Packet partition algorithmPacket partition algorithm

SimulationsSimulations CommentsComments ConclusionConclusion

Page 3: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

MotivationMotivation

Many existing schemes assume a single Many existing schemes assume a single fixed route between the receiver and the fixed route between the receiver and the sendersender

Page 4: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

MotivationMotivation

Make content available at multiple sourcesMake content available at multiple sources Smooth video deliverySmooth video delivery No single sender can support the required bit rateNo single sender can support the required bit rate

Page 5: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

AssumptionsAssumptions

1.1. Available bandwidth from all the senders Available bandwidth from all the senders to the receiver exceeds the required to the receiver exceeds the required video bit rate.video bit rate.

2Mbps

0.8Mbps0.4Mbps

Page 6: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

AssumptionsAssumptions

2.2. The routes from a client to the senders do The routes from a client to the senders do not share the same congestion linknot share the same congestion link

Page 7: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

AssumptionsAssumptions

3.3. Broadband connection. Broadband connection.

Last hop physical bandwidth limitation Last hop physical bandwidth limitation (dial-up modem) is of little use in this (dial-up modem) is of little use in this situationsituation

Page 8: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Contributions OverviewContributions Overview

Protocol Protocol that allows simultaneous streaming of video that allows simultaneous streaming of video from multiple mirror sites to a single client, with smooth from multiple mirror sites to a single client, with smooth sending rates so as to reduce jittersending rates so as to reduce jitter

An algorithm that runs on the receiverAn algorithm that runs on the receiver to specify the to specify the sending rate for each sender in order to minimize the sending rate for each sender in order to minimize the total loss ratetotal loss rate

A distributed algorithm that runs on each senderA distributed algorithm that runs on each sender to to partition packets so as to minimize the probability of partition packets so as to minimize the probability of packet arriving latepacket arriving late

Page 9: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

ScenarioScenario

Receiver-drivenReceiver-driven1.1. Each sender estimates and sends its round trip time Each sender estimates and sends its round trip time

to the receiverto the receiver2.2. Receiver receive it and estimates sender’s loss rates Receiver receive it and estimates sender’s loss rates

for each sender.for each sender.3.3. Based on 2 factors, receiver calculates and decide Based on 2 factors, receiver calculates and decide

each sender’s sending rateseach sender’s sending rates4.4. Receiver sends an identical control packet to each Receiver sends an identical control packet to each

sender.sender.5.5. Sender will determine the next packet to be sent Sender will determine the next packet to be sent

based on the control packet based on the control packet

Protocol

Receiver algorithm

Sender algorithm

Page 10: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Bandwidth EstimationBandwidth Estimation

TCP Friendly rate control algorithm (TFRC)

B : The current available TCP-friendly bandwidth between each sender and the receiver

(Upper bound for the TCP-friendly sending rate)

Trto : TCP timeout

R : estimated round-trip time in seconds (using moving average of RRT over a fixed interval)

P : estimated loss rate (number of lost packets / total number of packets sedting over a fixed interval)

S : TCP segment size in bytes

Page 11: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Rate Allocation Algorithm

Receiver computes the optimal sending rate for each sender based on its loss rate and estimated available bandwidth.

During the interval (t, t + ∆) F(t) total number of loss packet

L(I, t) estimated loss rates S(I, t) estimated sending rates

Sreq(t) is the required bit rate for the encoded video

B(I, t) TCP-friendly estimated bandwidth

Page 12: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Rate Allocation Algorithm

1. Sort the senders according to their estimated loss rates from lowest to highest.

2. Assign each sender its available bandwidth, beginning with the ones with lowest loss rates and moving to the ones with higher loss rates, until the sum of their available bandwidths exceeds the bit rate of the encoded video.

Page 13: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Systolic windowSystolic window

If B(I, t) changes rapidly, S(I, t) needs to be recomputed more frequently, and more control packets have to be sent from the receiver to all the senders, resulting in inefficiencies.

Systolic Window Periodic compute B(I, t) in a fixed interval Periodic compute B(I, t) in a fixed interval ФФ If B(I, t) > S(I, t) + w, If B(I, t) > S(I, t) + w, countcount + 1 + 1 If B(I, t) < S(I, t) - w, If B(I, t) < S(I, t) - w, countcount – 1, otherwise – 1, otherwise countcount remains remains If If count count > > γγOR OR countcount < - < -γγ, rate allocation algorithm is run, rate allocation algorithm is run

Page 14: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Packet Partition Algorithm

Each Sender receive control packet from the Each Sender receive control packet from the receiver through a reliable protocol in the receiver through a reliable protocol in the following format: following format:

•Assume 5 Senders and entire copies are resided in each senders

•Dx : Estimated delay from sender x to receiver (1 byte field)

•Sx : Sending rate in packets/second for sender x (2 bytes field)

•Sync : Sequence number that determines the next packet to send

Page 15: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Packet Partition Algorithm

If the reference time Tk’, the estimated arrival time of the kth packIf the reference time Tk’, the estimated arrival time of the kth packet sent by sender j is net sent by sender j is n j,kj,kσσ(j)+2D(j)(j)+2D(j)

nnj,k j,k : Number of packets already sent since k’ to packet k: Number of packets already sent since k’ to packet k

σσ(j): Sending interval between packets for sender j(j): Sending interval between packets for sender j

D(j) : Estimated delay from the sender j to the receiverD(j) : Estimated delay from the sender j to the receiver

AAkk(j, k) = T(j, k) = Tkk’(k) – [’(k) – [nnj,kj,kσσ(j)+2D(j)](j)+2D(j)]

TTkk’(k) Playback time for kth packet with respect to Tk’’(k) Playback time for kth packet with respect to Tk’

Time difference between arrival and playback time of kth packetTime difference between arrival and playback time of kth packetIf AIf Akk(j, k) > 0, kth packet is on time, otherwise kth packet is late(j, k) > 0, kth packet is on time, otherwise kth packet is late

Therefore, maximizeing ATherefore, maximizeing Akk(j, k) to minimize the probability that the kth packet is late(j, k) to minimize the probability that the kth packet is late

Page 16: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Packet Partition Algorithm

Only the sender who maximizes AOnly the sender who maximizes Ak’k’(j, k) will be (j, k) will be

assigned to send kth packetassigned to send kth packet Each sender computes AAk’k’(j, k) for each packet k for (j, k) for each packet k for

itself and all other sendersitself and all other senders

AAkk(j, k) = T(j, k) = Tkk’(k) – [’(k) – [nnj,kj,kσσ(j)+2D(j)](j)+2D(j)] D(j) in the D field D(j) in the D field σσ(j)=P/S(j) (P : packet size)(j)=P/S(j) (P : packet size) TTkk’(k) not affect the value’(k) not affect the value

Page 17: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Packet Partition Algorithm

Ak(j, k) = TAk(j, k) = Tkk’(k) – [n’(k) – [nj,kj,kσσ(j)+2D(j)](j)+2D(j)] nj,k = 0 for all senders.

+1 after each sending data

Page 18: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Packet Partition Algorithm Synchronization problem occurs when control packet is Synchronization problem occurs when control packet is

late/losslate/lossSolutionSolution 5 identical control packets are sent each time5 identical control packets are sent each time If none of the control packets is acknowledged with 2 If none of the control packets is acknowledged with 2

RTT from a particular sender, another 5 identical RTT from a particular sender, another 5 identical control packets are sent until acknowledgedcontrol packets are sent until acknowledged

Probability that sender does not receive in 2n RTT is Probability that sender does not receive in 2n RTT is pp5n5n

If p is 0.1, then 2n RTT failure probability is 10If p is 0.1, then 2n RTT failure probability is 10-6-6

Page 19: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

Choice of Synchronization Sequence Number

• Control packet arrival time varies between senders

• AAkk(j, k) = T(j, k) = Tk’k’(k) – [n(k) – [nj,kj,kσσ(j)+2D(j)](j)+2D(j)]

• Choose min. k’, resulting large buffer overhead

Page 20: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

SimulationSimulation

Delay for sender 1Delay for sender 1 40ms40ms ww 0.1*S(i)0.1*S(i)

Delay for sender 2Delay for sender 2 50ms50ms ФФ 100ms100ms

Packet sizePacket size 500bytes500bytes γγ 2020

Page 21: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

SimulationsSimulationsT = 0 to 2s. Starts sending control packets

T = 25s, senders send using the algorithms

T = 200s, 25 of 100 TCP sources from 1 stop sending

T = 400s, 10 new TCP sources start and stop at random

Page 22: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

ComparisonComparison

Page 23: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

CommentsComments

Simple/Good flow for distributed video Simple/Good flow for distributed video streamingstreaming

Further work should be done to tackle theFurther work should be done to tackle the assumption assumption

Not involve schedulingNot involve scheduling Large buffer overhead in the receiverLarge buffer overhead in the receiver

Page 24: Distributed Video Streaming Over Internet Thinh PQ Nguyen and Avideh Zakhor Berkeley, CA, USA Presented By Sam

ConclusionConclusion

Framework for Simultaneously streaming Framework for Simultaneously streaming video from multiple senders to a single video from multiple senders to a single receiverreceiver

Using TCP-friendly protocolUsing TCP-friendly protocol Propose a new protocol, rate allocation Propose a new protocol, rate allocation

algorithm and packet partition algorithmalgorithm and packet partition algorithm