Real-Time Course Video Streaming Over network 1
Home network example Internet Internet Internet in Ethernet switch 2
QoS chains Quality of video Size of video bit/s network Quality of network Bandwidth, delay Quality of renderer Processing power Quality of experience Perception by user 3
Network stream video transport frames 1.5-10 Mbit/s 0.1 % loss 30 % loss link packets Ethernet switch 80 Mbit/s 5-24 Mbit/s 4
MPEG2 video Divide picture in 16*16 macroblocks Each macroblock is 4 blocks 8*8 block 5
MPEG2 video Frame types a) I frames b) P frames c) B frames d) Group of Pictures (GOP): Set of frames between two I frames IBBPBBPBBI or IPPPI, or II 6
MPEG2 video General scheme of encoder Original video + - DCT Quantization Q VLC + Inverse DCT Motion Compensation Inverse Quantization Q -1 Frame Memory Motion Estimation Motion vectors 7
MPEG2 video General scheme of decoder VLD Inverse Quantization Q -1 Inverse DCT Frame Memory + Motion Compensation 8
MPEG2 video Encoding of macroblock 9
Two Internet Protocols Transmission Control Protocol, and Real-Time Transport Protocol TCP A receiver that accepted a packet, accepted all preceding packets in the sending order RTP All accepted packets are consumed in time 10
The Real-Time Transport Protocol (a) The position of RTP in the protocol stack. (b) Packet nesting. 11
The Real-Time Transport Protocol UDP header Source port UDP length 32 bits Destination port UDP checksum Control info Sequence number TimeStamp Synchronization source identifier 32 bits 12
The Transmission Control Protocol TCP header 32 bits Source port Destination port Sequence number Acknowledgement number Header length Window size Checksum Urgent pointer 13
TCP (2) Separation of acknowledgements and permission to send leads to variable sized windows Use of selective repeat (NAK) 14
TCP (3) sender Write 2K Write 2K blocked Write 1K Seq 0, data 2K Ack 2K, Win 2K Seq 2K, data 2K Ack 4K, Win 0 Ack 4K, Win 2K Seq 4K, data 1K receiver 0 4k empty 2k 4k Read 2K 2k 1K 2k 15
TCP (4) Congestion control Assumption: packets are not lost over wires. Consequently, transmission time-outs are due to congestion Two windows maintained: 1. Receiver window 2. Congestion window And take minimum of both. 16
TCP (5) Congestion control Determine congestion window size: (slow start) Start with maximum segment After acknowledgement set window size to two Send n segments After acknowledgement set congestion window size to 2n Stop at 2n = treshold or no acknowledgement before time-out When treshold add one segment at the time 17
TCP (6) Congestion control When timeout Half treshold size And start slow algorithm 18
TCP (7) 19
Single loss TCP RTP smooth Intermittent losses 20
TCP versus RTP behavior 52 16 34 41 5 23 3 4 12 24 3 1 TCP Single loss A1 34 56 2 4 3 5 6 1 2 4 4 5 2 1 3 3 4 1 2 34 1 2 52 6 34 1 41 5 23 3 4 12 24 3 1 RTP 13 45 62 5 6 1 2 4 4 5 1 2 2 4 3 1 24 1 21
Bursty loss TCP RTP Intermittent delays Intermittent losses 22
TCP hick-up 21 4 3 1 3 2 32 1 41 TCP Loss burst 43 3 41 2 2 1 1 3 21 26 5 13 4 15 42 3 43 12 43 2 1 RTP 65 43 61 45 2 5 24 1 4 12 3 41 2 23
Bursty loss RTP-RTM Combines RTP and TCP properties 1. Allows the dropping of late packets 2. Allows retransmission of lost packets 24
TCP-RTM behavior Loss burst 42 13 31 2 23 1 14 3 4 2 1 2 1 1 3 45 23 1 34 12 23 1 12 4 A4 5 3 5 4 2 1 4 2 1 2 1 3 TCP 2 1 TCP-RTM 4 12 25
IEEE 802.11 Link QoS Every received packet is immediately acknowledged Unacknowledged packet is repeated sending failed after n unacknowledged repetitions 0 < n <9 Conclusion: under packet-loss, bandwidth decreases 26
IEEE 802.11 Protocol Interframe spacing in 802.11. 27
Scalable video code Enhancement layer transmit Base layer 28
Perturbed wireless streaming Microwave on RTP unlayered RTP layered 29
Sending layers EL BL E1 E2 E3 E4 1 E1 E2 E3 2 E2 E1 3 E1 4 B1 B2 B3 B4 1 B1 B2 B3 2 B2 B1 3 B1 4 Layered video BL: Base layer EL: Enhancement layer B4 B3 B2 B1 E3 E4 E1 EL BL E4 1 E1 E3 2 E1 3 B2 B3 B1 B4 1 B2 B1 B3 2 B1 B2 3 23 1 30
Time scales MPEG2 codec sender Layered MPEG2 controller TCP-RTM Transp-RI Ethernet switch 31