Real-tme nteractve applcatons PC-2-PC phone PC-2-phone Dalpad Net2phone vdeoconference Webcams Now we look at a PC-2-PC Internet phone example n detal
Internet phone over best-effort (1) Best effort packet delay, loss and jtter Internet phone example now examne how packet delay, loss and jtter are often handled n the context of an IP phone example. Internet phone applcatons generate packets durng talk spurts bt rate s 64 kbps durng talk spurt durng talk spurt, every 20 msec app generates a chunk of 160 bytes = 8 kbytes/sec * 20 msec header s added to chunk; then chunk+header s encapsulated nto a UDP packet and sent out some packets can be lost and packet delay wll fluctuate. recever must determne when to playback a chunk, and determne what do wth mssng chunk
Internet phone (2) packet loss UDP segment s encapsulated n IP datagram datagram may overflow a router queue TCP can elmnate loss, but retransmssons add delay TCP congeston control lmts transmsson rate Redundant packets can help end-to-end delay accumulaton of transmsson, propagaton, and queung delays more than 400 msec of end-to-end delay serously hnders nteractvty; the smaller the better delay jtter consder two consecutve packets n talk spurt ntal spacng s 20 msec, but spacng at recever can be more or less than 20 msec removng jtter sequence numbers tmestamps delayng playout
Internet phone (3): fxed playout delay Recever attempts to playout each chunk at exactly q msecs after the chunk s generated. If chunk s tme stamped t, recever plays out chunk at t+q. If chunk arrves after tme t+q, recever dscards t. Strategy allows for lost packets. Tradeoff for q: large q: less packet loss small q: better nteractve experence
Internet phone (4): fxed playout delay Sender generates packets every 20 msec durng talk spurt. Frst packet receved at tme r Frst playout schedule: begns at p Second playout schedule: begns at p packets packets generated loss packets receved playout schedule p - r playout schedule p' - r tme r p p'
t r p r t d Adaptve playout delay (1) Estmate network delay and adjust playout delay at the begnnng of each talk spurt. Slent perods are compressed and elongated. Chunks stll played out every 20 msec durng talk spurt. = tmestamp of the th packet = the tme packet s receved by recever = the tme packet s played at recever = network delay for th packet = estmate of average network delay after recevng th packet Dynamc estmate of average delay at recever: d = ( 1 u) d 1 + u( r t ) where u s a fxed constant (e.g., u =.01).
Adaptve playout delay (2) Also useful to estmate the average devaton of the delay, v : v = ( 1 u) v 1 + u r t d The estmates d and v are calculated for every receved packet, although they are only used at the begnnng of a talk spurt. For frst packet n talk spurt, playout tme s: p = t + d + Kv where K s a postve constant. For ths same packet, the play out delay s: q = p t For packet j n the same talk spurt, play packet out at p = t + j j q
Adaptve playout (3) How to determne whether a packet s the frst n a talkspurt: If there were never loss, recever could smply look at the successve tme stamps. Dfference of successve stamps > 20 msec, talk spurt begns. But because loss s possble, recever must look at both tme stamps and sequence numbers. Dfference of successve stamps > 20 msec and sequence numbers wthout gaps, talk spurt begns.
Recovery from packet loss (1) Loss: packet never arrves or arrves later than ts scheduled playout tme forward error correcton (FEC): smple scheme for every group of n chunks create a redundant chunk by exclusve OR-ng the n orgnal chunks send out n+1 chunks, ncreasng the bandwdth by factor 1/n. can reconstruct the orgnal n chunks f there s at most one lost chunk from the n+1 chunks Playout delay needs to fxed to the tme to receve all n+1 packets Tradeoff: ncrease n, less bandwdth waste ncrease n, longer playout delay ncrease n, hgher probablty that 2 or more chunks wll be lost
Recovery from packet loss (2) 2nd FEC scheme pggyback lower qualty stream send lower resoluton audo stream as the redundant nformaton for example, nomnal stream PCM at 64 kbps and redundant stream GSM at 13 kbps. Sender creates packet by takng the nth chunk from nomnal stream and appendng to t the (n-1)st chunk from redundant stream. Whenever there s non-consecutve loss, the recever can conceal the loss. Only one packets need to be receved before playback Can also append (n-1)st and (n-2)nd low-bt rate chunk
Recovery from packet loss (3) Interleavng chunks are broken up nto smaller unts for example, 4 5 msec unts per chunk nterleave the chunks as shown n dagram packet now contans small unts from dfferent chunks Reassemble chunks at recever f packet s lost, stll have most of every chunk
Recovery from packet loss (4) Recever-based repar of damaged audo streams produce a replacement for a lost packet that s smlar to the orgnal can gve good performance for low loss rates and small packets (4-40 msec) smplest: repetton more complcated: nterpolaton