© De Montfort University, Protocols for multimedia transmission over the Internet Howell Istance Dept. of Computer Science De Montfort University
© De Montfort University, Overview… In order to understand differences between streaming services and download services over the Internet, it is necessary to understand the various protocols involved and the differences between them Chapter 15 – Chapman and Chapman HTTP UDPTCP IP RTSP RTP
© De Montfort University, Internet Protocol (IP) Transfer of datagrams between hosts Each host has an IP address Datagram headers contain source and destination IP addresses Each datagram treated separately – no connection between datagrams that make up a page Routers inspect destination address – if on same network modify it to native address format else pass on to another router Routers discard datagrams which have not reached their destination after a certain time
© De Montfort University, Transport Control Protocol (TCP) Clearly there is a need to order packets received from IP layer and request re-transmission of any that are missing TCP provides this service Sets up a connection between sender and receiver Uses a sliding window protocol – sender sends packets up to a limit and awaits acknowledgement from receiver – when acknowledgement received, sends more up to window limit If no acknowledgement received, packet is re-sent Transport address = IP address + port number, needed to ensure that packets is passed to appropriate application
© De Montfort University, User Datagram Protocol (UDP) No connection set up between sender and receiver No acknowledge/ retransmit procedure Packets have port number Suitable for delivery of streamed audio and video data
© De Montfort University, Realtime Transport Protocol (RTP) Adds sequence number to each packet to enable application to order packets or discard packets received out of order No guarantee of delivery Sets up a connection between sender application and receiver so that each stream is an identifiable entity Identifies payload (data) type e.g audio or video, Where several data types are to be sent, these are sent by individual RTP streams Synchronisation supported by adding timestamp to the header
© De Montfort University, Unicasting and Multicasting If several (many) users want to receive same data from same source at the same time, separate and duplicate data packets need to be sent to each user (receiver) unicasting leads to much duplication in this situation Multicasting – send a single copy from source and duplicate this en route only when necessary to ensure that each user receives it Hosts assigned to host groups, IP addresses now identify host groups rather a single hosts – range of IP addresses reserved for this
© De Montfort University, Hypertext Transfer Protocol (HTTP) Link between application (e.g. web browser) and TCP HTTP 1.0 – caused server TCP to close connection to client after each request HTTP 1.1 – client TCP closes connection to server after all requests have been processed Prescribes format of requests from client and responses from server
© De Montfort University, HTTP requests : Browser sends HTTP request GET /~hoi/index.html HTTP/1.1 Host: User-Agent: Mozilla/4.0 Accept: image/gif, image/jpeg, text/* (blank line)
© De Montfort University, HTTP Server Responses Status followed by header followed by data HTTP/ OK Server: Netscape-Enterprise/3.5.1G Date: Sat 25 Feb :27:17 GMT Content-type: text/html …..(rest of data) … Status codes <200 – informative – redirect success error
© De Montfort University, Realtime Streaming Protocol (RSTP) HTTP – runs on top of TCP, overheads incurred by reliable transmission are unacceptable for streamed media RTP – does not provide functionality to start, stop, pause RTSP – provides these services, Internet VCR remote control Syntactically similar to HTTP, but requests require an absolute url – no Host header No data in RTSP responses, all data carried in RTP responses Used primarily by Streaming Quicktime, RealPlayer G2
© De Montfort University, Setting up a streaming session Before session is set up, client needs to obtain a presentation description – details of how presentation is to be controlled Typically contains media announcements including transport address and protocol (e.g RTP), type of data and type of encoding used Each stream will have a rtsp://URL Information to client about where to get presentation description passed to it somehow (usually by HTTP) –QuickTime – small movie –RealPlayer 5.0 and below -.ram file –RealPlayer 6.0 and above -.smil file
© De Montfort University, Setting up a streaming session (server)(player) DESCRIBE request to url provided Presentation description SETUP request Session identifier (arbitrary string) PLAY session request PAUSE session request TEARDOWN session request
© De Montfort University, Protocol Rollover Firewalls can prevent clients accessing external servers via ports or protocolls that have been disabled The player can attempt to access the server using a succession of protocols (protocol roll-over) Client Server Local Area Network firewall multicast HTTP RTSP/TCP? RTSP/UDP?
© De Montfort University, Sequence in a streaming session urls in.smil files reference RealServer Server sends page.wav clips RealProducerRealPlayer Web Browser Access database Client requests page.smil file ram file RealServer Web Server (IIS).rm file.html..smil files Streaming server Web server Client Network
© De Montfort University, Quality of service… Delay (latency) in network will cause intervals between packet arrival to vary continuously (jitter) Why will this cause problems? In addition, there may be packet loss Delay, jitter and packet loss are all measurable – amount which an application can tolerate can be quantified These parameters + bandwidth required define Quality of Service required by application ATM (Asynchronous transfer mode) networks – high speed which offer guarantees of a level of QofS to applications which use them