Top Banner
Data and Computer Data and Computer Communications Communications Eighth Edition Eighth Edition by William Stallings by William Stallings Lecture slides by Lawrie Lecture slides by Lawrie Brown Brown Chapter 24 – Internet Chapter 24 – Internet Applications – Applications – Multimedia Multimedia
48

Data and Computer Communications

Jan 12, 2016

Download

Documents

yasuo

Data and Computer Communications. Chapter 24 – Internet Applications – Multimedia. Eighth Edition by William Stallings Lecture slides by Lawrie Brown. Internet Applications – Multimedia. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data and Computer Communications

Data and Computer Data and Computer CommunicationsCommunications

Eighth EditionEighth Edition

by William Stallingsby William Stallings

Lecture slides by Lawrie BrownLecture slides by Lawrie Brown

Chapter 24 – Internet Applications – Chapter 24 – Internet Applications – MultimediaMultimedia

Page 2: Data and Computer Communications

InternetInternet Applications – MultimediaApplications – Multimedia

Prior to the recent explosion of sophisticated research, scientists believed that birds required no special awareness or intelligence to perform their migrations and their navigational and homing feats. Accumulated research shows that in addition to performing the difficult tasks of correcting for displacement (by storms, winds, mountains, and other hindrances), birds integrate an astonishing variety of celestial, atmospheric, and geological information to travel between their winter and summer homes. In brief, avian navigation is characterized by the ability to gather a variety of informational cues and to interpret and coordinate them so as to move closer toward a goal.

—The Human Nature of Birds, Theodore Barber

Page 3: Data and Computer Communications

Audio and Video Audio and Video CompressionCompression

multimedia applications need efficient use multimedia applications need efficient use of transmission capacityof transmission capacity

hence audio/video compression algorithmshence audio/video compression algorithms techniques standardized by MPEGtechniques standardized by MPEG lossless compression loses no informationlossless compression loses no information

limited by redundancy in original datalimited by redundancy in original data lossy compression provides acceptable lossy compression provides acceptable

approximation to original (typically use)approximation to original (typically use)

Page 4: Data and Computer Communications

Simple Audio CompressionSimple Audio Compression

must first digitize audio signal, must first digitize audio signal, eg. PCMeg. PCM sample at sample at twice highest frequencytwice highest frequency then quantize then quantize using fixed number of bitsusing fixed number of bits

• this is, in fact, a basic compression algorithmthis is, in fact, a basic compression algorithm otherwise need unlimited number of bitsotherwise need unlimited number of bits

compress further by reducing sampling compress further by reducing sampling frequency frequency oror number of bits number of bits

or use more sophisticated approachesor use more sophisticated approaches as in MPEG Layer 3 (MP3) giving 10:1 compressionas in MPEG Layer 3 (MP3) giving 10:1 compression http://computer.howstuffworks.com/mp31.htmhttp://computer.howstuffworks.com/mp31.htm

Page 5: Data and Computer Communications

Effective Audio CompressionEffective Audio Compression

Page 6: Data and Computer Communications

Video CompressionVideo Compression

moving picture a sequence of moving picture a sequence of still imagesstill images hence can compress each individuallyhence can compress each individually but get greater efficiency by using but get greater efficiency by using

similaritiessimilarities between between adjacentadjacent images images encode encode just differences just differences between thembetween them approach used in MPEGapproach used in MPEG

Page 7: Data and Computer Communications

(MPEG Video Compression)(MPEG Video Compression)

Page 8: Data and Computer Communications

(MPEG Video Compression)(MPEG Video Compression)

Page 9: Data and Computer Communications

MPEG Video CompressionMPEG Video Compression

important features in video compressionimportant features in video compression random access random access -> needs access frames-> needs access frames fast forward / reverse fast forward / reverse -> scan stream using -> scan stream using

access framesaccess frames MPEG foundation is MPEG foundation is motion compensationmotion compensation

predictionprediction interpolationinterpolation

Page 10: Data and Computer Communications

(Prediction)(Prediction)

MPEG uses 16x16 pixel macroblocks for MPEG uses 16x16 pixel macroblocks for motion compensationmotion compensation

each block encoded separately each block encoded separately with reference to preceeding anchor frame with reference to preceeding anchor frame

most closely matching itmost closely matching it matching block not on 16-pixel boundarymatching block not on 16-pixel boundary compare against decompressed framecompare against decompressed frame

MPEG then records motion vector and MPEG then records motion vector and prediction error for current frameprediction error for current frame

Page 11: Data and Computer Communications

(Interpolation)(Interpolation)

have further compression improvement by using have further compression improvement by using two reference framestwo reference frames bidirectional interpolationbidirectional interpolation

process current against frames before and afterprocess current against frames before and after encode using:encode using:

block from before (forward prediction)block from before (forward prediction) block from after (backward prediction)block from after (backward prediction) average of blocks before and after (averaging)average of blocks before and after (averaging)

interpolation encodes more info than predictioninterpolation encodes more info than prediction

Page 12: Data and Computer Communications

(MPEG Frame Ordering)(MPEG Frame Ordering)

MPEG uses three types of frames:MPEG uses three types of frames: intraframe (I)intraframe (I) predicted (P)predicted (P) bidirectional interpolated (B)bidirectional interpolated (B)

relative frequency is configurablerelative frequency is configurable balance need for random access and FF/Rev balance need for random access and FF/Rev

with computational complexity and sizewith computational complexity and size noting B frames rely only on I and P framesnoting B frames rely only on I and P frames

Page 13: Data and Computer Communications

(MPEG Frame Ordering)(MPEG Frame Ordering)

Page 14: Data and Computer Communications

Real-Time TrafficReal-Time Traffic

increasing deployment of high-speed nets increasing deployment of high-speed nets sees increasing real-time traffic usesees increasing real-time traffic use

has different requirements has different requirements to traditional to traditional non real-time trafficnon real-time traffic traditionally throughput, delay, reliabilitytraditionally throughput, delay, reliability real-time more concerned with real-time more concerned with timing issues timing issues

and with and with deadline for delivery deadline for delivery of data blockof data block

Page 15: Data and Computer Communications

Real-Time Real-Time TrafficTraffic

ExampleExampleIn the computer

Page 16: Data and Computer Communications

Examples of Real-Time Traffic Examples of Real-Time Traffic ProfilesProfiles

Page 17: Data and Computer Communications

Real-Time Traffic Real-Time Traffic RequirementsRequirements

low jitter (variations in amplitude, phase or freq.)low jitter (variations in amplitude, phase or freq.) low latencylow latency integrate non-real-time and real-time servicesintegrate non-real-time and real-time services adapts to changing network / traffic conditionsadapts to changing network / traffic conditions good performance for large nets / connectionsgood performance for large nets / connections modest buffer requirements within the networkmodest buffer requirements within the network high effective capacity utilizationhigh effective capacity utilization low overhead in header bits per packetlow overhead in header bits per packet low processing overheadlow processing overhead

Page 18: Data and Computer Communications

Hard vs Soft Real-Time AppsHard vs Soft Real-Time Apps

soft real-time applicationssoft real-time applications tolerate loss of some datatolerate loss of some data hence impose fewer requirements on networkhence impose fewer requirements on network can focus on maximizing network utilizationcan focus on maximizing network utilization

hard real-time applicationshard real-time applications zero loss tolerancezero loss tolerance hence deterministic upper bound on jitter and hence deterministic upper bound on jitter and

high reliability take precedence over utilizationhigh reliability take precedence over utilization

Page 19: Data and Computer Communications

Example of real-time Example of real-time applicationapplication

Page 20: Data and Computer Communications

Voice-over-IP (VoIP) and IP-TVVoice-over-IP (VoIP) and IP-TVEx: service affaire de videotronEx: service affaire de videotron

https://voip.ms/ (+ android ou iPhone)https://voip.ms/ (+ android ou iPhone)

Implemented usingImplemented using SIP (Session Initiation Protocol)SIP (Session Initiation Protocol) RTP (Real-Time Protocol)RTP (Real-Time Protocol)

Introduction video : Introduction video : https://www.youtube.com/watch?v=7-https://www.youtube.com/watch?v=7-C8oPTMQSQC8oPTMQSQ

Page 21: Data and Computer Communications

Session Initiation Protocol Session Initiation Protocol (SIP)(SIP)

control protocol for setting up, modifying, control protocol for setting up, modifying, and terminating real-time sessionsand terminating real-time sessions

defined in RFC 3261defined in RFC 3261 fivefive multimedia communications facets: multimedia communications facets:

user locationuser location user availablilityuser availablility user capabilitiesuser capabilities session setupsession setup session managementsession management

Page 22: Data and Computer Communications

SIP Design ElementsSIP Design Elements

based on earlier protocolsbased on earlier protocols HTTP request/response transaction modelHTTP request/response transaction model

client invokes server method/functionclient invokes server method/function receives at least one responsereceives at least one response using most header fields, encoding rules, and using most header fields, encoding rules, and

status codes of HTTPstatus codes of HTTP ““DNS like” recursive and iterative searchesDNS like” recursive and iterative searches incorporates the use of a Session incorporates the use of a Session

Description Protocol (SDP) Description Protocol (SDP) --> set of types > set of types similar to MIMEsimilar to MIME

Page 23: Data and Computer Communications

SIP ComponentsSIP Components

Page 24: Data and Computer Communications

SIP Servers and ProtocolsSIP Servers and Protocols

servers are logical devicesservers are logical devices may be distinct servers or combined in onemay be distinct servers or combined in one

user agent uses SIP to setup sessionuser agent uses SIP to setup session initiation dialogue uses SIP involving one or initiation dialogue uses SIP involving one or

more proxies to relay to remote agentmore proxies to relay to remote agent proxies act as redirect servers if neededproxies act as redirect servers if needed

consulting location service DBconsulting location service DB protocol used here outside SIPprotocol used here outside SIP DNS also importantDNS also important

SIP uses UDP for performance reasonsSIP uses UDP for performance reasons can use TLS for security if desiredcan use TLS for security if desired

Page 25: Data and Computer Communications

Session Description Protocol Session Description Protocol (SDP)(SDP)

defined in RFC 2327defined in RFC 2327 have SDP encoded body in SIP messagehave SDP encoded body in SIP message specifies information on media encodings specifies information on media encodings

parties can and will useparties can and will use after exchange parties know IP addresses, after exchange parties know IP addresses,

transmission capacity, media typestransmission capacity, media types may then exchange data using a suitable may then exchange data using a suitable

transport protocol, eg. RTPtransport protocol, eg. RTP change session parameters with SIP messageschange session parameters with SIP messages

Page 26: Data and Computer Communications

SIP Uniform Resource SIP Uniform Resource Identifier (URI)Identifier (URI)

-analog to URL--analog to URL-

identifies a resource within a SIP networkidentifies a resource within a SIP network eg. user, mailbox, phone number, groupeg. user, mailbox, phone number, group

format based on email addressformat based on email address eg. sip:[email protected]. sip:[email protected]

may also include password, port number may also include password, port number and other parametersand other parameters

There is a version for secure transmission There is a version for secure transmission over TLS =over TLS => “SIPS”> “SIPS”

Page 27: Data and Computer Communications

SIP ExampleSIP Example(“alice” tries to reach “bob” but “bob” is not signed in)(“alice” tries to reach “bob” but “bob” is not signed in)

Page 28: Data and Computer Communications

SIP ExampleSIP Example(“alice” wants to be informed when “bob” signes in)(“alice” wants to be informed when “bob” signes in)

Page 29: Data and Computer Communications

SIP ExampleSIP Example(“bob” finally signes in and “alice” is notified)(“bob” finally signes in and “alice” is notified)

Page 30: Data and Computer Communications

SIP ExampleSIP Example(“alice” calls “bob”)(“alice” calls “bob”)

Direct communication (using RTP) after 14

Page 31: Data and Computer Communications

SIP MessagesSIP Messages

SIP a text based protocol, cf. HTTPSIP a text based protocol, cf. HTTP have request messageshave request messages

first line a method name and request-URIfirst line a method name and request-URI have response messageshave response messages

first line a response codefirst line a response code

Page 32: Data and Computer Communications

SIP RequestsSIP Requests

defined by RFC 3261defined by RFC 3261 REGISTERREGISTER INVITEINVITE ACKACK CANCELCANCEL BYEBYE OPTIONSOPTIONS

Page 33: Data and Computer Communications

SIP Request ExampleSIP Request Example

INVITEINVITE sip:[email protected] SIP/2.0 sip:[email protected] SIP/2.0

Via:Via: SIP/2.0/UDP 12.26.17.91:5060 SIP/2.0/UDP 12.26.17.91:5060

Max-Forwards:Max-Forwards: 70 70

To:To: Bob <sip:[email protected]> Bob <sip:[email protected]>

From:From: Alice <sip:[email protected]>;tag=1928301774 Alice <sip:[email protected]>;tag=1928301774

Call-ID:Call-ID: [email protected] [email protected]

CSeq:CSeq: 314159 INVITE 314159 INVITE

Contact:Contact: <sip:[email protected]> <sip:[email protected]>

Content-Type:Content-Type: application/sdp application/sdp

Content-Length:Content-Length: 142 142

Page 34: Data and Computer Communications

SIP ResponseSIP Response

Provisional (1xx)Provisional (1xx) Success (2xx)Success (2xx) Redirection (3xx)Redirection (3xx) Client Error (4xx)Client Error (4xx) Server Error (5xx)Server Error (5xx) Global Failure (6xx)Global Failure (6xx)

Page 35: Data and Computer Communications

SIP Response ExampleSIP Response Example

SIP/2.0 200 OKSIP/2.0 200 OKVia: Via: SIP/2.0/UDP server10.biloxi.comSIP/2.0/UDP server10.biloxi.comVia:Via: SIP/2.0/UDP bigbox3.site3.atlanta.com SIP/2.0/UDP bigbox3.site3.atlanta.comVia:Via: SIP/2.0/UDP 12.26.17.91:5060 SIP/2.0/UDP 12.26.17.91:5060To:To: Bob <sip:[email protected]>;tag=a6c85cf Bob <sip:[email protected]>;tag=a6c85cfFrom:From: Alice <sip:[email protected]>;tag=1928301774 Alice <sip:[email protected]>;tag=1928301774Call-ID:Call-ID: [email protected] [email protected]:CSeq: 314159 INVITE 314159 INVITEContact:Contact: <sip:[email protected]> <sip:[email protected]>Content-Type:Content-Type: application/sdp application/sdpContent-Length:Content-Length: 131 131

Page 36: Data and Computer Communications

(Session Description (Session Description Protocol) (SDP)Protocol) (SDP)

describes content of sessionsdescribes content of sessions includes information on:includes information on:

media streamsmedia streams addressesaddresses portsports payload typespayload types start and stop timesstart and stop times originatororiginator

Page 37: Data and Computer Communications

Real-Time Transport Protocol Real-Time Transport Protocol (RTP)(RTP)

TCP has disadvantages for real-time useTCP has disadvantages for real-time use is point-to-point and multicast operation not very is point-to-point and multicast operation not very

flexibleflexible includes retransmission mechanismsincludes retransmission mechanisms has has no timing mechanismsno timing mechanisms

UDP can address some needs UDP can address some needs but not allbut not all have Real-Time Transport Protocol (RTP)have Real-Time Transport Protocol (RTP)

defined in RFC 1889defined in RFC 1889 best suited to best suited to soft real-time applicationssoft real-time applications data transfer (RTP) & control (RTCP) protocolsdata transfer (RTP) & control (RTCP) protocols

Page 38: Data and Computer Communications

RTP Protocol ArchitectureRTP Protocol Architecture

have close coupling between RTP and have close coupling between RTP and application-layer functionalityapplication-layer functionality view RTP as framework used by applicationsview RTP as framework used by applications

imposes structure imposes structure and defines common and defines common functions (to meet real-time requirement)functions (to meet real-time requirement)

key concepts:key concepts: application-level framing application-level framing integrated layer processingintegrated layer processing

Page 39: Data and Computer Communications

Application-Level Framing Application-Level Framing

Recall that TCP transparently performs data Recall that TCP transparently performs data recoveryrecovery

Some scenarios where more appropriately Some scenarios where more appropriately done done by application layerby application layer when less than perfect delivery acceptablewhen less than perfect delivery acceptable when application can better provide datawhen application can better provide data

have application-level data units (ADUs)have application-level data units (ADUs) preserved by lower layer processingpreserved by lower layer processing form unit of error recoveryform unit of error recovery if lose part of ADU discard and retransmit entire if lose part of ADU discard and retransmit entire

ADUADU

Page 40: Data and Computer Communications

(Integrated Layer Processing)(Integrated Layer Processing)

layered protocols have sequential layered protocols have sequential processing of functions in each layerprocessing of functions in each layer limits parallel or re-ordered functionslimits parallel or re-ordered functions

instead integrated layer processing allows instead integrated layer processing allows tight coupling between adjacent layers for tight coupling between adjacent layers for greater efficiencygreater efficiency

concept that strict layering is inefficient is concept that strict layering is inefficient is not new, cf. RPC implementationnot new, cf. RPC implementation

Page 41: Data and Computer Communications

Integrated Layer ProcessingIntegrated Layer Processing

Video coding standard defined by ITU-T

Page 42: Data and Computer Communications

RTP Data Transfer ProtocolRTP Data Transfer Protocol

supports transfer of real-time datasupports transfer of real-time data amongst participants in a sessionamongst participants in a session define session bydefine session by

RTP port (UDP dest port)RTP port (UDP dest port) RTCP port (dest port for RTCP transfers)RTCP port (dest port for RTCP transfers) participant IP addresses (multicast or unicast)participant IP addresses (multicast or unicast)

strength is multicast transmissionstrength is multicast transmission includes identity of source, timestamp, includes identity of source, timestamp,

payload formatpayload format

Page 43: Data and Computer Communications

(RTP Relays)(RTP Relays)

relay on intermediary systemrelay on intermediary system acts as both destination and sourceacts as both destination and source to relay data between systemsto relay data between systems

mixermixer combines streams from multiple sourcescombines streams from multiple sources forwards new stream to one or more destsforwards new stream to one or more dests may change data format if neededmay change data format if needed

translatortranslator simpler, sends 1+ RTP packets for each 1 in simpler, sends 1+ RTP packets for each 1 in

Page 44: Data and Computer Communications

RTP Data Transfer HeaderRTP Data Transfer Header

Page 45: Data and Computer Communications

RTP Control Protocol (RTCP)RTP Control Protocol (RTCP)

separate control protocolseparate control protocol same transport (eg. UDP) but different portsame transport (eg. UDP) but different port packets sent periodically to all memberspackets sent periodically to all members

RTCP functions:RTCP functions: Quality of Service (QoS), congestion controlQuality of Service (QoS), congestion control identificationidentification session size estimation and scalingsession size estimation and scaling session controlsession control

Page 46: Data and Computer Communications

RTCP Packet TypesRTCP Packet Types

have multiple RTCP packets in datagramhave multiple RTCP packets in datagram Sender Report (SR)Sender Report (SR) Receiver Report (RR)Receiver Report (RR) Source Description (SDES)Source Description (SDES) Goodbye (BYE)Goodbye (BYE) Application SpecificApplication Specific

Page 47: Data and Computer Communications

RCTP PacketsRCTP Packets

Page 48: Data and Computer Communications

SummarySummary

audio and video compressionaudio and video compression real-time trafficreal-time traffic session initiation protocol (SIP)session initiation protocol (SIP) real-time transport protocol (RTP)real-time transport protocol (RTP)