36
Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems Multimedia Systems

Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Embed Size (px)

Citation preview

Page 1: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Chapter 15 Chapter 15

Multimedia and Networks

Multimedia SystemsMultimedia Systems

Page 2: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Key PointsKey Points IPIP is the is the Internet ProtocolInternet Protocol and transfers and transfers

datagramsdatagrams between hosts that are ident between hosts that are identified by ified by IP addressesIP addresses. .

TCPTCP is layered on top of IP, to provide is layered on top of IP, to provide rereliableliable delivery of sequenced packets. delivery of sequenced packets.

UDPUDP is also layered on top of IP, and pro is also layered on top of IP, and provides a more efficient method of delivervides a more efficient method of delivery, but it is y, but it is not reliablenot reliable. .

Page 3: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Key PointsKey Points RTPRTP runs on top of UDP and provides addition runs on top of UDP and provides addition

al services for al services for real-timereal-time delivery of data of diff delivery of data of different erent payloadpayload types. types.

MulticastingMulticasting cuts down network traffic by sen cuts down network traffic by sending packets to ding packets to host groupshost groups, only creating du, only creating duplicates when it is necessary. (Contrast plicates when it is necessary. (Contrast unicasunicastingting.) .)

HTTPHTTP is used to transmit data between Web se is used to transmit data between Web servers and clients. The client sends a rvers and clients. The client sends a requestrequest a and gets a nd gets a responseresponse..

Page 4: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Key PointsKey Points A A GETGET request is used to retrieve a Web page. request is used to retrieve a Web page.

The response includes the status and, if it was The response includes the status and, if it was successful, the text of the page is included in tsuccessful, the text of the page is included in the body of the response. he body of the response.

HTTP includes a HTTP includes a cacheingcacheing mechanism to help mechanism to help reduce network traffic. reduce network traffic.

RTSPRTSP is like an `Internet VCR remote control', is like an `Internet VCR remote control', providing control functions for RTP streams usproviding control functions for RTP streams used for video etc. ed for video etc.

Page 5: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Key PointsKey Points Quality of ServiceQuality of Service provides a provides a

measure of how well a network can measure of how well a network can deliver streamed data. deliver streamed data.

Server-side scriptingServer-side scripting is used to is used to enable an HTTP server to enable an HTTP server to communicate with other resources, communicate with other resources, and pass the results back to a client. and pass the results back to a client. The The Common Gateway Interface Common Gateway Interface (CGI)(CGI) provides a mechanism for this. provides a mechanism for this.

Page 6: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

IntroductionIntroduction The relationship between computer The relationship between computer

networks and multimedia is a networks and multimedia is a contradictory one:contradictory one:– they are incompatible perfect partnersthey are incompatible perfect partners

Page 7: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

MultimediaMultimedia Files are often very largeFiles are often very large Complex processing such as Complex processing such as

decompressiondecompression

may be requiredmay be required Response times must be short and Response times must be short and

tighttight Synchronization constraints must be Synchronization constraints must be

respectedrespected

Page 8: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

NetworksNetworks Networks are particularly poorly Networks are particularly poorly

placed toplaced to

satisfy those demands, because ofsatisfy those demands, because of– inherent limitations of present day inherent limitations of present day

technologytechnology– complex and unpredictable effects of complex and unpredictable effects of

the interactions between network the interactions between network components and patterns of network components and patterns of network traffictraffic

Page 9: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

ProtocolsProtocols Protocols are the rules governing Protocols are the rules governing

the exchange of data over networkthe exchange of data over network They are conceptually organized They are conceptually organized

into layers,into layers,

stacked on top of each otherstacked on top of each other The protocols on each layer are The protocols on each layer are

implemented using those on the implemented using those on the layer belowlayer below

Page 10: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

ProtocolsProtocols The lowest layer protocols deal with The lowest layer protocols deal with

the actual physical signals the actual physical signals transmissiontransmission

Higher level protocols handle the Higher level protocols handle the transfer of packets of raw data and transfer of packets of raw data and ensure they reach their correct ensure they reach their correct destinationdestination

The highest layers implement more The highest layers implement more application-oriented servicesapplication-oriented services

Page 11: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

TCP/IP NetworksTCP/IP Networks Packet-switched NetworksPacket-switched Networks

– all messages are split into small pieces, calledall messages are split into small pieces, calledpackets, which are sent separatelypackets, which are sent separately

AdvantageAdvantage– enable network bandwidth to be shared enable network bandwidth to be shared

efficiently between many messagesefficiently between many messages

DisadvantageDisadvantage– can’t guarantee network qualitycan’t guarantee network quality

Page 12: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Internet ProtocolInternet Protocol

IPIP is the is the Internet ProtocolInternet Protocol, which makes , which makes the Internet possiblethe Internet possible

All that All that IPIP does is attempt to deliver indi does is attempt to deliver individual datagrams from one host to anotvidual datagrams from one host to another. It doesnher. It doesn''t even guarantee to succeet even guarantee to succeedd

Page 13: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Transmission Control ProtocolTransmission Control Protocol TCPTCP , the , the Transmission Control Transmission Control

ProtocolProtocol, is layered on top of IP, is layered on top of IP TCPTCP provides reliable delivery of provides reliable delivery of

sequence packets. It does this using sequence packets. It does this using a system of acknowledgementa system of acknowledgement

Page 14: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Transmission Control ProtocolTransmission Control Protocol AcknowledgementAcknowledgement

– when the destination receives a when the destination receives a packet, it sends an acknowledgement packet, it sends an acknowledgement to senderto sender

– if the acknowledgement is not received if the acknowledgement is not received within a specified period of time (the within a specified period of time (the time-outtime-out), the packet is sent again), the packet is sent again

– the mechanism of acknowledgement the mechanism of acknowledgement achieves the reliability of transmissionachieves the reliability of transmission

Page 15: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Transmission Control ProtocolTransmission Control Protocol Sliding windowSliding window

– instead of sending a single packet and waiting instead of sending a single packet and waiting for an acknowledgement, it allows the sender for an acknowledgement, it allows the sender to transmit multiple packets before waiting for to transmit multiple packets before waiting for an acknowledgementan acknowledgement

12345678

Initial window 12345678

window slide910

910

Acknowledgement 12

Page 16: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Transmission Control ProtocolTransmission Control Protocol TCTCP is less efficient than IP, because it P is less efficient than IP, because it

adds extra overheads in adds extra overheads in acknowledgements and acknowledgements and retransmissionretransmission

For some networked multimedia For some networked multimedia applications, the possibility of lost applications, the possibility of lost packet is more acceptable than the packet is more acceptable than the overhead of overhead of TCPTCP

Page 17: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

User Datagram ProtocolUser Datagram Protocol UDPUDP, the , the User Datagram ProtocolUser Datagram Protocol, is built on , is built on

top of IP, like TCP, but is much simplertop of IP, like TCP, but is much simpler Like IP, Like IP, UDPUDP only tries its best to deliver data only tries its best to deliver data

grams, it does not offer reliable delivery provgrams, it does not offer reliable delivery provided by TCPided by TCP

UDPUDP is a suitable basis for delivering data suc is a suitable basis for delivering data such as streamed video and audio, for which reah as streamed video and audio, for which real-time constraints are more important than tl-time constraints are more important than totally reliable deliveryotally reliable delivery

Page 18: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Real-time Transport ProtocolReal-time Transport Protocol The low-cost delivery of The low-cost delivery of UDPUDP is not is not

enough for delivering streamed enough for delivering streamed video and audiovideo and audio

The The Real-time Transport ProtocolReal-time Transport Protocol ((RTPRTP) typically runs on top of ) typically runs on top of UDPUDP, , adding extra features that are adding extra features that are needed for sequencing identifying needed for sequencing identifying and synchronizationand synchronization

Page 19: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Real-time Transport ProtocolReal-time Transport Protocol sequence numbersequence number

– Each packet has a sequence number to enable Each packet has a sequence number to enable applications to applications to reconstruct a sequence of packets and detect reconstruct a sequence of packets and detect whether any are missingwhether any are missing

timestamptimestamp– It records the instant at which the first byte It records the instant at which the first byte

contained in a packet was sampledcontained in a packet was sampled– Synchronization can be collated with the Synchronization can be collated with the

timestamps to ensure that simultaneously timestamps to ensure that simultaneously sampled data is played back at the same instantsampled data is played back at the same instant

Page 20: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

MulticastingMulticasting A common situation where data is unnecesA common situation where data is unneces

sarily duplicated arises when a group of Intsarily duplicated arises when a group of Internet users require access to the same resernet users require access to the same resource at the same timeource at the same time

Conventional (unicast) transmission requirConventional (unicast) transmission require that the server from which the video is bee that the server from which the video is being streamed send a copy of it to everyboding streamed send a copy of it to everybody who has set up a connectiony who has set up a connection

Page 21: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

MulticastingMulticasting In multicasting, a single packet is In multicasting, a single packet is

sent and is duplicated along the sent and is duplicated along the way whenever routes to different way whenever routes to different users divergeusers diverge

Page 22: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Application Protocols for MultimediaApplication Protocols for Multimedia

Higher level protocols must run on Higher level protocols must run on top of the network and transport top of the network and transport protocols to provide services protocols to provide services suitable for distributed multimedia suitable for distributed multimedia applicationsapplications– HTTP (HTTP (Hypertext Transfer ProtocolHypertext Transfer Protocol))

the basis of the World Wide Webthe basis of the World Wide Web

– RTSP (RTSP (Real Time Streaming ProtocolReal Time Streaming Protocol))a newer protocol designed to control a newer protocol designed to control

streamed mediastreamed media

Page 23: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

HTTPHTTP Interaction between a Web client and Interaction between a Web client and

server over HTTPserver over HTTP ::– ClientClient/Server model/Server model

To start things off, the client opens a TCP To start things off, the client opens a TCP connection to a serverconnection to a server

the client sending requests, which are met the client sending requests, which are met by responses from the serverby responses from the server

Page 24: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

HTTPHTTP HTTP requests and responses are HTTP requests and responses are

collectively known as messagescollectively known as messages Both consists of a string of 8-bits Both consists of a string of 8-bits

characters, so they can be treated characters, so they can be treated as text by programs that read themas text by programs that read them

Page 25: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

HTTPHTTP Messages conform to a simple rigid Messages conform to a simple rigid

structurestructure– initial lineinitial line

request line (for a request)request line (for a request)status line (for a response)status line (for a response)

– one or more headersone or more headerscontaining various parameters and containing various parameters and

modifiersmodifiers

– bodybodycontaining data, such as the contents of a containing data, such as the contents of a

file being sent by the serverfile being sent by the server

Page 26: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

HTTPHTTP A A request linerequest line comprises three elements comprises three elements

– methodmethod identifies the service being requested, the identifies the service being requested, the most commonly used method is most commonly used method is GETGET

– identifieridentifier tells the server which resource is being re tells the server which resource is being requestedquested

– HTTP HTTP versionversion indicates which protocol version the indicates which protocol version the client is usingclient is using

GET /compbooks/chapman/index.html HTTP/1.1GET /compbooks/chapman/index.html HTTP/1.1

Page 27: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

HTTPHTTP HeadersHeaders take the form of a header take the form of a header

name followed by a colon and some name followed by a colon and some argumentsarguments

Host: www.wiley.comHost: www.wiley.comUser-Agent: Mozilla/4.0User-Agent: Mozilla/4.0

One of the most commonly seen One of the most commonly seen headers in headers in GETGET requests is requests is AcceptAccept, , which indicates the range of types of which indicates the range of types of data that the browser can deal withdata that the browser can deal with

Accept: image/gif, image/jpegAccept: image/gif, image/jpegAccept: */*Accept: */*

Page 28: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

HTTPHTTP Status lineStatus line also comprises three also comprises three

componentscomponents– protocol versionprotocol version tells the client which tells the client which

HTTP version the server is usingHTTP version the server is using– status codestatus code – short phraseshort phrase explains to human readers explains to human readers

what the status code meanswhat the status code means

HTTP/1.1 200 OKHTTP/1.1 200 OK

Page 29: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

RTSPRTSP RTP does not provide all the RTP does not provide all the

necessary functionality required for necessary functionality required for streamed datastreamed data– we usually want to be able to we usually want to be able to

start, stop and pause them, and possibly go start, stop and pause them, and possibly go to a particular point in the stream (for to a particular point in the stream (for streams that are not being transmitted live)streams that are not being transmitted live)

for live streams, we might want to schedule for live streams, we might want to schedule a time at which to start the displaya time at which to start the display

Page 30: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

RTSPRTSP RTSP is intended to provide these RTSP is intended to provide these

services. It is often described as services. It is often described as “Internet VCR remote control “Internet VCR remote control protocol”protocol”

Syntactically, RTSP closely Syntactically, RTSP closely resembles HTTP with request and resembles HTTP with request and status lines and headersstatus lines and headers

Page 31: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

RTSPRTSP In the simplest mode of operation, In the simplest mode of operation,

an RTSP client sends an RTSP client sends – PLAY PLAY requests to cause the server to requests to cause the server to

begin sending databegin sending data– PAUSE PAUSE requests to temporarily halt itrequests to temporarily halt it

Note that the media data is Note that the media data is transmitted separately, often using transmitted separately, often using RTP; RTSP merely coordinates the RTP; RTSP merely coordinates the transmissiontransmission

Page 32: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Relationships between TCP/IP Relationships between TCP/IP protocols used for multimediaprotocols used for multimedia

IP

TCP UDP

RTSPHTTP

RTP

Page 33: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Quality of ServiceQuality of Service DelayDelay Variation in delay is called jitterVariation in delay is called jitter

– Two problemsTwo problems Variation in time between packets can Variation in time between packets can

result in time base errorsresult in time base errors Loss of synchronization of several streamsLoss of synchronization of several streams

– Lip-syncLip-sync

LossLoss Measurable quantitiesMeasurable quantities

– delay, jitter, lossdelay, jitter, loss

Page 34: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

ATMATM Asynchronous Transfer ModeAsynchronous Transfer Mode

– Offer guarantees about the quality of servicesOffer guarantees about the quality of services– Much more like a circuit-switched networkMuch more like a circuit-switched network

Integrated Services ArchitectureIntegrated Services Architecture– Different classes of servicesDifferent classes of services

Best effortBest effort GuaranteedGuaranteed

RSVPRSVP– Resource Reservation ProtocolResource Reservation Protocol

Page 35: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

Server-side ComputationServer-side Computation Client-side scriptingClient-side scripting Server-side scriptingServer-side scripting

– Common Gateway Interface (CGI)Common Gateway Interface (CGI)

Page 36: Chapter 15 Chapter 15 Multimedia and Networks Multimedia Systems

CGICGI A mechanism for server to pass on A mechanism for server to pass on

data in a client’s request to a scriptdata in a client’s request to a script– CGI scriptCGI script

Three placesThree places– Headers in HTTP requestHeaders in HTTP request– Query stringQuery string– POSTPOST