Multimedia Networking. Goals of Today’s Lecture r Digital audio and video m Sampling, quantizing, and compressing r Multimedia applications m Streaming.

Slides:



Advertisements
Similar presentations
Multimedia and Streaming
Advertisements

Introduction 2 1: Introduction.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
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 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
Application layer (continued) Week 4 – Lecture 2.
Multimedia Applications
1 CSE 401N Multimedia Networking Lecture Multimedia, Quality of Service: What is it? Multimedia applications: network audio and video network provides.
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.
Introduction to the Application Layer Computer Networks Computer Networks Spring 2012 Spring 2012.
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é.
Computer Networking Multimedia.
CS640: Introduction to Computer Networks
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.
Ch 7. Multimedia Networking Myungchul Kim
Advance Computer Networks Lecture#14
ECE242 L30: Compression ECE 242 Data Structures Lecture 30 Data Compression.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot October 2010 October 2010 Ref: Computer Networking:
Jaringan Komputer Dasar OSI Transport Layer Aurelio Rahmadian.
Computer Networks: Multimedia Applications Ivan Marsic Rutgers University Chapter 3 – Multimedia & Real-time Applications.
Streaming Stored Audio and Video (1) and Video (1) Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot.
What makes a network good? Ch 2.1: Principles of Network Apps 2: Application Layer1.
Quality of Service in the Internet The slides of part 1-3 are adapted from the slides of chapter 7 published at the companion website of the book: Computer.
Chapter 5: Summary r principles behind data link layer services: m error detection, correction m multiple access protocols m link layer addressing, ARP.
1 How Streaming Media Works Bilguun Ginjbaatar IT 665 Nov 14, 2006.
1 Lecture 17 – March 21, 2002 Content-delivery services. Multimedia services Reminder  next week individual meetings and project status report are due.
CS640: Introduction to Computer Networks Aditya Akella Lecture 19 - Multimedia Networking.
Multimedia, Quality of Service: What is it?
Sockets process sends/receives messages to/from its socket
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.
Beyond Best-Effort Service Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot November 2010 November.
1 o characteristics – From an application-level API to the physical layer – CBR, VBR, ABR and UBR – Cell: bytes – Virtual circuits: virtual channel.
Making the Best of the Best-Effort Service (2) Advanced Multimedia University of Palestine University of Palestine Eng. Wisam Zaqoot Eng. Wisam Zaqoot.
1 End-user Protocols, Services and QoS. 2 Layering: logical communication application transport network link physical application transport network link.
ﺑﺴﻢﺍﷲﺍﻠﺭﺣﻣﻥﺍﻠﺭﺣﻳﻡ. Group Members Nadia Malik01 Malik Fawad03.
Transport Layer COM211 Communications and Networks CDA College Theodoros Christophides
03/11/2015 Michael Chai; Behrouz Forouzan Staffordshire University School of Computing Streaming 1.
Chapter 28. Network Management Chapter 29. Multimedia
Packet switching network Data is divided into packets. Transfer of information as payload in data packets Packets undergo random delays & possible loss.
Multimedia streaming Application Anandi Giridharan Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India Querying.
Multimedia and Networks. Protocols (rules) Rules governing the exchange of data over networks Conceptually organized into stacked layers – Application-oriented.
Multimedia Streaming Jennifer Rexford COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
Multimedia Networking Quality of Services Hongli Luo, IPFW.
Computer Networking Multimedia. 11/15/20052 Outline Multimedia requirements Streaming Phone over IP Recovering from Jitter and Loss RTP QoS Requirements.
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
Ch 6. Multimedia Networking Myungchul Kim
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 7 Multimedia Networking
19 – Multimedia Networking
Networking Applications
Multimedia Applications
Chapter 2 Introduction Application Requirements VS. Transport Services
Networking Applications
Multimedia networking: outline
Multimedia networking: outline
Presentation transcript:

Multimedia Networking

Goals of Today’s Lecture r Digital audio and video m Sampling, quantizing, and compressing r Multimedia applications m Streaming audio and video for playback m Live, interactive audio and video r Multimedia transfers over a best-effort network m Tolerating packet loss, delay, and jitter m Forward error correction and playout buffers r Improving the service the network offers m Marking, policing, scheduling, and admission control

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

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

Audio Compression r Audio data requires too much bandwidth m Speech: 64 kbps is too high for a dial-up modem user m Stereo music: Mbps exceeds most access rates r Compression to reduce the size m Remove redundancy m Remove details that human tend not to perceive r Example audio formats m Speech: GSM (13 kbps), G.729 (8 kbps), and G (6.4 and 5.3 kbps) m Stereo music: MPEG 1 layer 3 (MP3) at 96 kbps, 128 kbps, and 160 kbps

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

The 320 x 240 hand The 2272 x 1704 hand

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

Video Compression: Across Images r Compression across images m Exploit temporal redundancy across images r Common video compression formats m MPEG 1: CD-ROM quality video (1.5 Mbps) m MPEG 2: high-quality DVD video (3-6 Mbps) m Proprietary protocols like QuickTime and RealNetworks

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

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

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

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

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

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

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

TCP is Not a Good Fit r Reliable delivery m Retransmission of lost packets m … even though it may not be useful r Adapting the sending rate m Slowing down after a packet loss m … even though it may cause starvation at the client r Protocol overhead m TCP header of 20 bytes in every packet m … which is large for sending audio samples m Sending ACKs for every other packet m … which may be more feedback than needed

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

Recovering From Packet Loss r Loss is defined in a broader sense m Does a packet arrive in time for playback? m A packet that arrives late is as good as lost m Retransmission is not useful if the deadline has passed r Selective retransmission m Sometimes retransmission is acceptable m E.g., if the client has not already started playing the data m Data can be retransmitted within the time constraint

Forward Error Correction (FEC) r Forward error correction m Add redundant information to the packet stream m So the client can reconstruct data even after a loss r Send redundant chunk after every n chunks m E.g., extra chunk is an XOR of the other n chunks m Receiver can recover from losing a single chunk r Send low-quality version along with high quality m E.g., 13 kbps audio along with 64 kbps version m Receiver can play low quality version if the high-quality version is lost

Interactive Audio and Video r Two or more users interacting m Telephone call m Video conference m Video game r Strict delay constraints m Delays over msec are very noticeable m … and delays over 400 msec are a disaster for voice r Much harder than streaming applications m Receiver cannot introduce much playout delay m Difficult if the network does not guarantee performance

Voice Over IP (VoIP) r Delivering phone calls over IP m Computer to computer m Analog phone to/from computer m Analog phone to analog phone r Motivations for VoIP m Cost reduction m Simplicity m Advanced applications Web-enabled call centers Collaborative white boarding Do Not Disturb, Locate Me, etc. Voic sent as

Traditional Telecom Infrastructure External line Telephone switch Private Branch Exchange Another switch Corporate/Campus Internet Corporate/Campus LAN

VoIP Gateways External line PBX Corporate/Campus Internet LAN PBX Another campus LAN IP Phone Client VoIP Gateway

VoIP With an Analog Phone r Adapter m Converts between analog and digital m Sends and receives data packets m Communicates with the phone in standard way

Skype  Niklas Zennstr ö m and Janus Friis in 2003 r Developed by KaZaA r Instant Messenger (IM) with voice support r Based on peer-to-peer (P2P) networking technology

Login server is the only central server (consisting of multiple machines) Both ordinary host and super nodes are Skype clients Any node with a public IP address and having sufficient resources can become a super node Skype maintains their own super nodes Skype Network Architecture

Data Transfer r UDP directly between the two hosts m Both hosts have public IP address m Neither host’s network blocks UDP traffic m Easy: the hosts can exchange UDP packets directly r UDP between an intermediate peer m One or both hosts with a NAT m Neither host’s network blocks UDP traffic m Solution: direct UDP packets through another node r TCP between an intermediate peer m Hosts behind NAT and UDP-restricted firewall m Solution: direct TCP connections through another node

Skype Data Transfer r Audio compression m Voice packets around 67 bytes m Up to 140 packets per second m Around 5 KB/sec (40 kbps) in each direction r Encryption m Data packets are encrypted in both directions m To prevent snooping on the phone call m … by someone snooping on the network m … or by the intermediate peers forwarding data

VoIP Quality r The application can help m Good audio compression algorithms m Avoiding hops through far-away hosts m Forward error correction m Adaptation to the available bandwidth r But, ultimately the network is a major factor m Long propagation delay? m High congestion? m Disruptions during routing changes? r Leads to an interest in Quality of Service

Principles for QoS Guarantees r Applications compete for bandwidth m Consider a 1 Mbps VoIP application and an FTP transfer sharing a single 1.5 Mbps link m Bursts of FTP traffic can cause congestion and losses m We want to give priority to the audio packets over FTP r Principle 1: Packet marking m Marking of packets is needed for the router m To distinguish between different classes

Principles for QoS Guarantees r Applications misbehave m Audio sends packets at a rate higher than 1 Mbps r Principle 2: Policing m Provide protection for one class from other classes m Ensure sources adhere to bandwidth restrictions m Marking and policing need to be done at the edge

Principles for QoS Guarantees r Alternative to marking and policing m Allocate fixed bandwidth to each application flow m But, this can lead to inefficient use of bandwidth m … if one of the flows does not use its allocation r Principle 3: Link scheduling m While providing isolation, it is desirable to use resources as efficiently as possible m E.g., weighted fair queuing or round-robin scheduling

Principles for QoS Guarantees r Cannot support traffic beyond link capacity m If total traffic exceeds capacity, you are out of luck m Degrade the service for all, or deny someone access r Principle 4: Admission control m Application flow declares its needs in advance m The network may block call if it cannot satisfy the needs

Quality of Service r Significant change to Internet architecture m Guaranteed service rather than best effort m Routers keeping state about the traffic r A variety of new protocols and mechanisms m Reserving resources along a path m Identifying paths with sufficient resources m Link scheduling and buffer management m Packet marking with the Type-of-Service bits m Packet classifiers to map packets to ToS classes…

Conclusions r Digital audio and video m Increasingly popular media on the Internet m Video on demand, VoIP, online gaming, IPTV, … r Interaction with the network m Adapt to delivering the data over a best-effort network m Adapt the network to offer better quality-of- service