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
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
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
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
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
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)
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
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
(MPEG Video Compression)(MPEG Video Compression)
(MPEG Video Compression)(MPEG Video Compression)
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
(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
(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
(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
(MPEG Frame Ordering)(MPEG Frame Ordering)
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
Real-Time Real-Time TrafficTraffic
ExampleExampleIn the computer
Examples of Real-Time Traffic Examples of Real-Time Traffic ProfilesProfiles
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
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
Example of real-time Example of real-time applicationapplication
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)
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
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
SIP ComponentsSIP Components
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
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
identifies a resource within a SIP networkidentifies a resource within a SIP network eg. user, mailbox, phone number, groupeg. user, mailbox, phone number, group
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
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
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)
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
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
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
(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
RTP Data Transfer HeaderRTP Data Transfer Header
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
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
RCTP PacketsRCTP Packets
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)