Multimedia Streaming Jennifer Rexford COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101

Slides:



Advertisements
Similar presentations
Multimedia and Streaming
Advertisements

Streaming Video over the Internet
CCNA – Network Fundamentals
29.1 Chapter 29 Multimedia Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
29.1 Chapter 29 Multimedia Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
19 – Multimedia Networking. Multimedia Networking7-2 Multimedia and Quality of Service: What is it? multimedia applications: network audio and video (“continuous.
User Control of Streaming Media: RTSP
Chapter 6 outline r 6.1 Multimedia Networking Applications r 6.2 Streaming stored audio and video m RTSP r 6.3 Real-time, Interactive Multimedia: Internet.
Application layer (continued) Week 4 – Lecture 2.
1 CSE 401N Multimedia Networking Lecture Multimedia, Quality of Service: What is it? Multimedia applications: network audio and video network provides.
CSc 461/561 CSc 461/561 Multimedia Systems 0. Introduction.
Multimedia Applications r Multimedia requirements r Streaming r Phone over IP r Recovering from Jitter and Loss r RTP r Diff-serv, Int-serv, RSVP.
TCP/IP Protocol Suite 1 Chapter 25 Upon completion you will be able to: Multimedia Know the characteristics of the 3 types of services Understand the methods.
1 Multimedia Networking Reading: Sections 3.1.2, 3.3, 4.5, and 6.5 COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Jennifer Rexford.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
Multimedia Computer Networks 10/02/02 Xavier Appé.
Multicast and Anycast Mike Freedman COS 461: Computer Networks
CS640: Introduction to Computer Networks
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
CS 218 F 2003 Nov 3 lecture:  Streaming video/audio  Adaptive encoding (eg, layered encoding)  TCP friendliness References: r J. Padhye, V.Firoiu, D.
RTSP Real Time Streaming Protocol
1 CMSCD1011 Introduction to Computer Audio Lecture 10: Streaming audio for Internet transmission Dr David England School of Computing and Mathematical.
CIS679: RTP and RTCP r Review of Last Lecture r Streaming from Web Server r RTP and RTCP.
6: Multimedia Networking6a-1 Chapter 6: Multimedia Applications r Multimedia requirements r Streaming r Phone over IP r Recovering from Jitter and Loss.
Multimedia and QoS#1#1 Multimedia Applications. Multimedia and QoS#2#2 Multimedia Applications r Multimedia requirements r Streaming r Recovering from.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 14 Multimedia Networking.
ECE242 L30: Compression ECE 242 Data Structures Lecture 30 Data Compression.
Jaringan Komputer Dasar OSI Transport Layer Aurelio Rahmadian.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 7: Transport Layer Introduction to Networking.
Computer Networks: Multimedia Applications Ivan Marsic Rutgers University Chapter 3 – Multimedia & Real-time Applications.
2.02G Publishing Animated Videos 2.02 Develop Computer Animations.
Streaming Stored Audio and Video (1) and Video (1) Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot.
1 How Streaming Media Works Bilguun Ginjbaatar IT 665 Nov 14, 2006.
TCP/IP Protocol Suite 1 Chapter 25 Upon completion you will be able to: Multimedia Know the characteristics of the 3 types of services Understand the methods.
1 Lecture 17 – March 21, 2002 Content-delivery services. Multimedia services Reminder  next week individual meetings and project status report are due.
Fundamentals of Computer Networks ECE 478/578 Lecture #19: Transport Layer Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
CS640: Introduction to Computer Networks Aditya Akella Lecture 19 - Multimedia Networking.
Multimedia, Quality of Service: What is it?
Chapter 6 outline r 6.1 Multimedia Networking Applications r 6.2 Streaming stored audio and video m RTSP r 6.3 Real-time Multimedia: Internet Phone Case.
1 o characteristics – From an application-level API to the physical layer – CBR, VBR, ABR and UBR – Cell: bytes – Virtual circuits: virtual channel.
1 End-user Protocols, Services and QoS. 2 Layering: logical communication application transport network link physical application transport network link.
03/11/2015 Michael Chai; Behrouz Forouzan Staffordshire University School of Computing Streaming 1.
Chapter 28. Network Management Chapter 29. Multimedia
Multimedia streaming Application Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India Querying.
Multimedia Networking Quality of Services Hongli Luo, IPFW.
Internet multimedia: simplest approach audio, video not streamed: r no, “pipelining,” long delays until playout! r audio or video stored in file r files.
Ch 6. Multimedia Networking Myungchul Kim
TCP/IP Protocol Suite 1 Chapter 25 Upon completion you will be able to: Multimedia Know the characteristics of the 3 types of services Understand the methods.
Ch 6. Multimedia Networking Myungchul Kim
Tutorial 11 Solutions. Question 1 Q1. What is meant by interactivity for streaming stored audio/video? What is meant by interactivity for real-time interactive.
Multimedia Streaming I. Fatimah Alzahrani. Introduction We can divide audio and video services into three broad categories: streaming stored audio/video,
Multimedia Networking. Goals of Today’s Lecture r Digital audio and video m Sampling, quantizing, and compressing r Multimedia applications m Streaming.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 4: Multimedia.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Chapter 13: Multimedia and Networking BITM1113- Multimedia Systems.
Chapter 7 Multimedia Networking
19 – Multimedia Networking
Chapter 29 Multimedia Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Networking Applications
Multimedia Applications
Chapter 2 Introduction Application Requirements VS. Transport Services
Networking Applications
Multimedia networking: outline
CSE679: Multimedia and Networking
Process-to-Process Delivery:
Multimedia networking: outline
Process-to-Process Delivery: UDP, TCP
Streaming multimedia CS 352, Lecture 22
Presentation transcript:

Multimedia Streaming Jennifer Rexford COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101

Digital Audio and Video Data 2

3 Challenges for Media Streaming Large volume of data – Many sound or image samples per second Volume of data may vary over time – Due to compression of the data Cannot tolerate much delay – For interactive applications (e.g., VoIP and gaming) Cannot tolerate much variation in delay – Once playout starts, need to keep playing Though some loss is acceptable

Digital Audio Sampling the analog signal – Sample at some fixed rate – Each sample is an arbitrary real number Quantizing each sample – Round each sample to one of a finite # of values – Represent each sample in a fixed number of bits 4 4 bit representation (values 0-15)

Audio Examples Speech – Sampling rate: 8000 samples/second – Sample size: 8 bits per sample – Rate: 64 kbps 5 Compact Disc (CD) – Sampling rate: 44,100 samples/sec – Sample size: 16 bits per sample – Rate: kbps for mono, Mbps for stereo

6 Audio Compression Audio data requires too much bandwidth – Speech: 64 kbps is too high for some connections – Stereo music: Mbps exceeds most access rates Compression to reduce the size – Remove redundancy, and details user don’t perceive Example audio formats – Speech: GSM (13 kbps), G.729 (8 kbps), and G (6.4 and 5.3 kbps) – Stereo music: MPEG 1 layer 3 (MP3) at 96 kbps, 128 kbps, and 160 kbps

7 Digital Video Sampling the analog signal – Sample images at fixed rate (e.g., 30 times per sec) Quantizing each sample – Representing an image as array of picture elements – Each pixel is a mix of colors (red, green, and blue) – E.g., 24 bits, with 8 bits per color

Video Compression: Within Image Image compression – Exploit spatial redundancy (e.g., regions of same color) – Exploit aspects humans tend not to notice Common image compression formats – Joint Pictures Expert Group (JPEG) – Graphical Interchange Format (GIF) 8 Uncompressed: 167 KBGood quality: 46 KBPoor quality: 9 KB

Video Compression: Across Images Compression across images – Exploit temporal redundancy across images Common video compression formats – MPEG 1: CD-ROM quality video (1.5 Mbps) – MPEG 2: high-quality DVD video (3-6 Mbps) 9

10 Streaming Over the Internet

Transferring Audio and Video Data Simplest case: just like any other file – Audio and video data stored in a file – File downloaded using conventional protocol – Playback does not overlap with data transfer A variety of more interesting scenarios – Live vs. pre-recorded content – Interactive vs. non-interactive – Single receiver vs. multiple receivers 11

Streaming Stored Audio and Video Client-server system – Server stores the audio and video files – Clients request files, play them as they download, and perform VCR-like functions (e.g., rewind, pause) Playing data at the right time – Server divides the data into segments – … and labels each segment with frame id Avoiding starvation at the client – The data must arrive quickly enough 12

Playout Buffer Client buffer – Store the data as it arrives from the server – Play data for the user in a continuous fashion Playout delay – Client typically waits a few seconds to start playing – … to allow some data to build up in the buffer – … to help tolerate some delays down the road 13

Influence of Playout Delay 14

Requirements for Data Transport Delay – Some small delay at the beginning is acceptable – E.g., start-up delays of a few seconds are okay Jitter – Variability of delay within the same packet stream – Client cannot tolerate high variation if buffer starves Loss – Small amount of missing data is not disruptive – Retransmitting lost packet may take too long anyway 15

Streaming From Web Servers Data stored in a file – Audio: an audio file – Video: interleaving of audio and images in a file HTTP request-response – TCP connection between client and server – Client HTTP request and server HTTP response Client invokes the media player – Content-type indicates encoding – Browser launches media player – Media player renders file 16

17 Initiating Streams from Web Servers Avoid passing all data through the Web browser – Web server returns a meta file describing the object – Browser launches media player and passes meta file – Player sets up its own connection to the Web server

18 Using a Streaming Server Avoiding the use of HTTP (and perhaps TCP, too) – Web server returns a meta file describing the object – Player requests the data using a different protocol

TCP is Not a Good Fit Reliable delivery – Retransmission of lost packets may not be useful Adapting the sending rate – Slowing down after loss may cause starve client Protocol overhead – 20-byte TCP header is large for audio samples – ACKing every other packet is a lot of overhead 19

Better Ways of Transporting Data User Datagram Protocol (UDP) – No automatic retransmission of lost packets – No automatic adaptation of sending rate – Smaller packet header UDP leaves many things to the application – When to transmit the data – Whether to retransmit lost data – Whether to adapt the sending rate – … or adapt quality of the audio/video encoding 20

Recovering From Packet Loss Loss is defined in a broader sense – Does a packet arrive in time for playback? – A packet that arrives late is as good as lost Selective retransmission – Sometimes retransmission is acceptable – E.g., if client has not already started playing data – Data can be retransmitted within time constraint Could do Forward Error Correction (FEC) – Send redundant info so receiver can reconstruct 21

YouTube: HTTP, TCP, and Flash Flash videos – All uploaded videos converted to Flash format – Nearly every browser has a Flash plug-in – … avoids need for users to install players HTTP/TCP – Implemented in every browser – Easily gets through most firewalls Keep It Simple, Stupid – Simplicity more important than video quality 22

23 Interactive Audio and Video Two or more users interacting – Telephone call, video conference, video game Strict delay constraints – Delays over msec are very noticeable – … delays over 400 msec are a disaster for voice Much harder than streaming applications – Receiver cannot introduce much playout delay – Difficult if network doesn’t guarantee performance

24 Quality of Interactive Applications The application can help – Good audio compression algorithms – Forward error correction – Adaptation to the available bandwidth But, ultimately the network is a major factor – Long propagation delay? – High congestion? – Disruptions during routing changes?

Multicast 25

Multicast Many receivers – Receiving the same content Applications – Video conferencing – Online gaming – IP television (IPTV) – Financial data feeds 26

Iterated Unicast Unicast message to each recipient Advantages – Simple to implement – No modifications to network Disadvantages – High overhead on sender – Redundant packets on links – Sender must maintain list of receivers 27

IP Multicast Embed receiver-driven tree in network layer – Sender sends a single packet to the group – Receivers “join” and “leave” the tree Advantages – Low overhead on the sender – Avoids redundant network traffic Disadvantages – Control-plane protocols for multicast groups – Overhead of duplicating packets in the routers 28

Multicast Tree 29 A B G D E c F

Single vs. Multiple Senders Source-based tree – Separate tree for each sender – Tree is optimized for that sender – But, requires multiple trees for multiple senders Shared tree – One common tree – Spanning tree that reaches all participants – Single tree may be inefficient – But, avoids having many different trees 30

Multicast Addresses Multicast “group” defined by IP address – Multicast addresses look like unicast addresses – to Using multicast IP addresses – Sender sends to the IP address – Receivers join the group based on IP address – Network sends packets along the tree 31

Example Multicast Protocol Receiver sends a “join” messages to the sender – And grafts to the tree at the nearest point 32 A B G D E c F

IP Multicast is Best Effort Sender sends packet to IP multicast address – Loss may affect multiple receivers 33 A B G D E c F

Challenges for Reliable Multicast Send an ACK, much like TCP? – ACK-implosion if all destinations ACK at once – Source does not know # of destinations How to retransmit? – To all? One bad link effects entire group – Only where losses? Loss near sender makes retransmission as inefficient as replicated unicast Negative acknowledgments more common 34

Scalable Reliable Multicast Data packets sent via IP multicast – Data includes sequence numbers Upon packet failure – If failures relatively rare, use Negative ACKs (NAKs) instead: “Did not receive expected packet” – Sender issues heartbeats if no real traffic. Receiver knows when to expect (and thus NAK) 35

Handling Failure in SRM Receiver multicasts a NAK – Or send NAK to sender, who multicasts confirmation Scale through NAK suppression – If received a NAK or NCF, don’t NAK yourself – Add random delays before NAK’ing Repair through packet retransmission – From initial sender – From designated local repairer 36

37 Conclusions Digital audio and video – Increasingly popular media on the Internet – Video on demand, VoIP, online gaming, IPTV… Many challenges – Best-effort network vs. real-time applications – Unicast routing vs. multi-party applications Friday’s precept – Hashing and partitioning to balance load