TSIN02 - Internetworking

Similar documents
TSIN02 - Internetworking

Internet Streaming Media. Reji Mathew NICTA & CSE UNSW COMP9519 Multimedia Systems S2 2006

Multimedia Protocols. Foreleser: Carsten Griwodz Mai INF-3190: Multimedia Protocols

Transporting Voice by Using IP

Real Time Protocols. Overview. Introduction. Tarik Cicic University of Oslo December IETF-suite of real-time protocols data transport:

Internet Streaming Media

Internet Streaming Media. Reji Mathew NICTA & CSE UNSW COMP9519 Multimedia Systems S2 2007

CS519: Computer Networks. Lecture 9: May 03, 2004 Media over Internet

Outline. Multimedia is different Real Time Protocol (RTP) Session Description Protocol (SDP) Session Initiation Protocol (SIP)

RTP. Prof. C. Noronha RTP. Real-Time Transport Protocol RFC 1889

CSCD 433/533 Advanced Networks Fall Lecture 14 RTSP and Transport Protocols/ RTP

Internet Streaming Media

Multimedia Communication

Multimedia in the Internet

Kommunikationssysteme [KS]

Popular protocols for serving media

Real-time Services BUPT/QMUL

Lecture 6: Internet Streaming Media

Lecture 7: Internet Streaming Media. Reji Mathew NICTA & CSE UNSW COMP9519 Multimedia Systems S2 2007

Lecture 7: Internet Streaming Media

Digital Asset Management 5. Streaming multimedia

On the Scalability of RTCP Based Network Tomography for IPTV Services. Ali C. Begen Colin Perkins Joerg Ott

Mohammad Hossein Manshaei 1393

in the Internet Andrea Bianco Telecommunication Network Group Application taxonomy

Multimedia networks. Additional references. Jargon. Analog to Digital (S5 4.3) KR: Kurose and Ross chapter 7 (KR3: 3 rd ed)

Real-time Services BUPT/QMUL

RTP: A Transport Protocol for Real-Time Applications

EDA095 Audio and Video Streaming

Multimedia Applications. Classification of Applications. Transport and Network Layer

13. Internet Applications 최양희서울대학교컴퓨터공학부

RTP/RTCP protocols. Introduction: What are RTP and RTCP?

4 rd class Department of Network College of IT- University of Babylon

Real-Time Transport Protocol (RTP)

CSC 4900 Computer Networks: Multimedia Applications

Lecture 14: Multimedia Communications

Multimedia Networking

Introduction to Networked Multimedia An Introduction to RTP p. 3 A Brief History of Audio/Video Networking p. 4 Early Packet Voice and Video

CS 218 F Nov 3 lecture: Streaming video/audio Adaptive encoding (eg, layered encoding) TCP friendliness. References:

Computer Networks. Wenzhong Li. Nanjing University

Outline. QoS routing in ad-hoc networks. Real-time traffic support. Classification of QoS approaches. QoS design choices

Overview. Slide. Special Module on Media Processing and Communication

Transporting Voice by Using IP

Multimedia networking: outline

EDA095 Audio and Video Streaming

AIMD (additive-increase, multiplicative-decrease),

Streaming (Multi)media

Z24: Signalling Protocols

CS640: Introduction to Computer Networks. Application Classes. Application Classes (more) 11/20/2007

Transport protocols Introduction

RTP: A Transport Protocol for Real-Time Applications

RTP Profile for TCP Friendly Rate Control draft-ietf-avt-tfrc-profile-03.txt

Department of Computer Science. Burapha University 6 SIP (I)

Multimedia Networking

EDA095 Audio and Video Streaming

Using RTSP with Firewalls, Proxies, and Other Intermediary Network Devices

Telecommunication Services Engineering Lab. Roch H. Glitho

Protocols for Multimedia on the Internet

File transfer. Internet Applications (FTP,WWW, ) Connections. Data connections

Video Streaming and Media Session Protocols

RTP model.txt 5/8/2011

Quality of Service. Qos Mechanisms. EECS 122: Lecture 15

Today. March 7, 2006 EECS122 Lecture 15 (AKP) 4. D(t) Scheduling Discipline. March 7, 2006 EECS122 Lecture 15 (AKP) 5

Multimedia Networking

Transport Protocols. ISO Defined Types of Network Service: rate and acceptable rate of signaled failures.

TSIN02 - Internetworking

Networking Applications

Session Initiation Protocol (SIP) Overview

Real-Time Control Protocol (RTCP)

Voice over IP (VoIP)

Multimedia! 23/03/18. Part 3: Lecture 3! Content and multimedia! Internet traffic!

Part 3: Lecture 3! Content and multimedia!

Transporting audio-video. over the Internet

Request for Comments: 5109 December 2007 Obsoletes: 2733, 3009 Category: Standards Track. RTP Payload Format for Generic Forward Error Correction

CS High Speed Networks. Dr.G.A.Sathish Kumar Professor EC

Provide a generic transport capabilities for real-time multimedia applications Supports both conversational and streaming applications

Chapter 9. Multimedia Networking. Computer Networking: A Top Down Approach

Chapter 28. Multimedia

Service/company landscape include 1-1

Request for Comments: dynamicsoft H. Schulzrinne Columbia University August 2001

MISB RP 1302 RECOMMENDED PRACTICE. 27 February Inserting KLV in Session Description Protocol (SDP) 1 Scope. 2 References

ETSF10 Internet Protocols Transport Layer Protocols

Lecture 9: Media over IP

Mul$media Networking. #5 Real- Time Transport Protocol Semester Ganjil 2012 PTIIK Universitas Brawijaya

Real-Time Protocol (RTP)

Advanced Communication Networks

Internet Technologies for Multimedia Applications

Congestion Feedback in RTCP

Multimedia Networking

Advanced Computer Networks

Session Initiation Protocol (SIP) Overview

MRCP Version 1. A.1 Overview

Multimedia Networking Communication Protocols

IP Telephony. Course scope - lecture scope

Socket Programming Assignment 6: Video Streaming with RTSP and RTP

Series Aggregation Services Routers.

Session Initiation Protocol (SIP)

Media server and QoS (so far)

Multimedia Streaming Protocols RTSP/RTP RTCP. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC

Lec 17 Multimedia Transport: RTP, TCP/HTTP and QUIC

Multimedia Communications

Transcription:

Lecture 7: Real-time Streaming Literature: Fouruzan ch. 28 RFC3550 (Real-time Protocol) RFC2327 (Session Description Protocol) RFC2326 (Real-time Streaming Protocol) Lecture 7: Real-time Streaming Goals: Understand real-time Be aware of the problems of Synchronization Jitter and their solutions Understand the RTP architecture of senders, receivers, mixers and translators Understand some uses for the sister protocol. Understand how synchronization is achieved in RTP Know about SDP and RTSP 2004 Image Coding Group, Linköpings Universitet Ver 1.00 Jonas Svanberg 2 Lecture 7: Real-time Streaming Outline: Real-time definition What means real-time? Real-time communication in general Synchronization RTP (Real-time Control Protocol) RTP Synchronization Model Real-time communication: No noticeable delay Real-time application: An application able to have a sustained processing of a temporal data stream Without having queues building up Terminology Header structure Transport Interleaving SDP Session Description Protocol RTSP Real-time Streaming Protocol With reasonable sustained quality level But - there is of course always delay to some extent! Different communication scenarios may have different sensitiveness to delay. 3 4

Real-time Communication Real-time Scenario Real-time communication involving humans typically fall into at least one of the following two categories: Dialog situation - when a user has some kind of a interaction with other user(s) or machines Telephony TV query shows where you may phone. Transmitter Reference Clock 02:05:00124 Jitter makes the packets arrive irregularly Receiver Reference Clock 02:06:16126 Some dialogs like controlling a VCR is not so delay sensitive... Coder Buffer Decoder Moment sharing the feeling of me sharing a unique event with possibly other humans. Notion of being among the select few who first know what's going on. TV sports broadcast 5 Frames created regularly at frequency f Network induces delay and jitter Buffer smooths out the effect of jitter 6 Typical Design Decisions Technical Issues When having real-time communication we usually Skip retransmission The time it takes to send ACK:s/NACK:s upstream and wait for the lost packet may cost to much in delay. Skip flow control Receiver should be a real-time application being able to cope with the (bounded) rate the sender transmits at. Also if we have a broadcast scenario no or little upstream communication can be had. There are two fundamental issues when designing a real-time communications system: 1) Synchronization. Sender and receiver needs to be synchronized to each other to avoid re-occurring buffer over-flows and under-runs Essentially having the sender and receiver following a clock at exactly the same frequency. 2) Jitter. Jitter is the varying of the packet-delay around the mean delay. Jitter is usually caused by the network, but could also result from processing stages in the sender that varies in time. The larger the jitter the larger the buffer at the receiver-side has to be. 7 8

Achieving Synchronization Implicit Synchronization - Example 1) Implicit synchronization The receiver buffer level is used to control the speed of play-out. The most simplistic approach is to throw away suitable input at buffer over-flow and interpolate at buffer under-run 2) Global synchronization Transmitter and receiver can be part of a global synchronization system like NTP (Network Time Protocol) 3) Point-to-point synchronization Receiver need to now from the syntax of the received data stream when certain bits should have been sent in relation to other synchronization points. Using the arrival-times of these bits the receiver employs a smoothing algorithm like PLL (Phase Locked Loop) to slave a local clock to the transmitter's system clock. 9 Assume the receiving buffer is of size N bytes Assume data is sent isochronously in packets of size M<Nbytes. Buffer utilization Packets do not arrive at regular time instants = jitter Receiver starts play-out M time Receiver empties buffer too slowly due to a lower frequency of the system clock Buffer overflow: Receiver throws away this packet! Packets are moved forward in buffer Here the discarded packet was supposed to be played-out N 10 Point-to-point Synchronization IETF Audio/Video Transport Example MPEG Systems 27MHz Program Clock Reference (PCR) Coder Coder Coder Coder 33bit 90kHz 9bits 299 000 A PCR time stamp is inserted in header at least every 100ms. (Once every 1700 packet is enough when wehavea40mbit/sts) MUX MPEG Transport Stream (MPEG-TS) at 40 Mbit/s 188 bytes The avt working group has defined the Real-Time Protocol (RTP) for multimedia transport (RFC3550) Collect common fields for synchronization, packet ordering and data format in one header. Different applications may reuse same RTP-stack with respect to the above mentioned parameters Thanks to the type identifier a library or a host may safely determine the format of incoming streams and provide the same service for various formats. See translation and mixing 11 12

RTP does not... RTP Terminology RTP Session...guarantee Bandwidth Low jitter The set of communicating entities which may via RTP and know of each other's identities. Synchronization Source The origin of a stream where RTP-packets are generated. Identified by a 32-bit number: SSRC. Translation RTP is strictly an end-to-end protocol. Network guarantees on bandwidth, jitter etc is up to separate quality-of-service mechanisms. 13 The act of converting a stream to another format and/or rate. Mixing The act of adding two or more streams together and encode the result into a new stream (with new SSRC). 14 RTP Oneway Unicast Example RTP Translation Example SSRC:1 sending a single media stream to SSRC:2 SSRC:1 RTP There will be three streams. The RTP stream carries the media. SSRC:2 Two (Real-Time Control Protocol) in each direction carries extra control information. It is recommended that the traffic only adds an extra 5% to the RTP bandwidth. 15 This server is a SIP-proxy and also redirects RTP session ports to go through the server instead (thereby passing the firewall). The server can then add Privacybyencryption Translation services. I.e., - transcoding of formats not understood by client - bit-rate conversion firewall weak terminals only supporting low quality rates. Terminals only supporting H.263 video 16

RTP Mixing Example RTP Header SSRC: 2 This machine is mixing together the separate video streams into one video stream which is multicast back to members SSRC: 4 ver P X CC M type sequence number Fixed part SSRC: 10 CSRC: (2,4,5,12) SSRC: 5 SSRC: 12 17 18 Synchronization Source Identifier Contributing Source Identifiers Every RTP packet is market with 32-bit number identifying a single timing and sequence number space ver P X CC M type sequence number When a mixer creates a new streamoutofothersitmayinclude thessrc:sofupto15ofthe contributing sources. ver P X CC M type sequence number SSRC provides a transport layer independent tag. RTP may run over various protocols (Ipv4, Ipv6, ATM) SSRC must be unique among all hosts taking part in the RTP session CC-field denotes the number of source identifiers in CSRC field. Using CSRC is a safety measure against loops in a RTP streaming session SSRC is picked randomly, but sender must in case of a detected collision issue a BYE message over the control channel and change SSRC. 19 20

Payload RTP Payload Types (RFC3551) The type (7 bits) indicate the format of the media put into the area. Compared to the number of codecs out there one realizes that assigning the type from the dynamic range might be common. It is then up to the session handling mechanism to inform parties about the type used. A flow can only carry one type. But the type can change. Each type has a reference clock frequency associated with it. ver P X CC M type sequence number PT A/V Clock Freq Channels MIME-type Description 3 audio 8000Hz 1 audio/gsm 13.2bps speech coder 10 audio 44100Hz 2 audio/l16 two-channel CD-style 11 audio 44100Hz 1 audio/l16 one-channel CD-style 14 audio 90kHz special audio/mpa MPEG audio layer 1,2,3 26 video 90kHz - video/jpeg Motion-JPEG 32 video 90kHz - video/mpv MPEG-1,2 elementary stream 33 a/v 90kHz special video/mp2t MPEG-2 transport stream 34 video 90kHz - video/h263 H.263 video telephony 35-71 unassigned 72-76 reserved 77-95 unassigned 96-127 dynamic Upcoming: AMR / AMR-WB speech codec used in 3G mobile system Motion-JPEG2000 H.264videocodec(ThenewMPEG-4AVCprofile) DV audio/video MPEG-4 Elementary streams etc. etc. 21 22 Timestamp Sequence Number 32-bit resolution Indicates the sampling instant of first octet of data. The mapping from transmitter's reference clock to is defined by type. Initial value is random Clock resolution should be enough to support synchronization and jitter measurements based on alone. ver P X CC M type sequence number Note that sender also transmits s of wall clock time in sender reports. These are needed to synchronize two or more streams with each other Each packet has a 16-bit sequence number Increases with one for each new sent packet. Starts with a random value Used to detect packet loss. Need not be related to play-out order Basic RTP does not provide error correction FEC extensions exist limited ARQ profile exist ver P X CC M type sequence number 23 24

Marker bit RTP Embedding Marksthispacketasspecialinasense defined by type. May be set in speech formats for indicating talk starts again after a period of silence (or comfort noise) Most video formats specify the marker bit to be set to 1 in the last packet for a frame. This gives a simple indication that it is time to display. ver P X CC M type sequence number RTP is designed to run over any packet switched network. On Internet we use UDP/IP. IP-header 20 8 12 UDP header RTP header The overhead per RTP packet will be 40 bytes. This is sometimes seen as too excessive and several header compression techniques have been suggested: RObust Header Compression (ROHC) RFC3095 Enhanced Compressed RTP (CRTP)- RFC3545 IP Header Compression RFC2507 (LuTH) 25 26 RTP Interleaving How to mix audio and video? Real-time Control Protocol () Some of the functions of the sister-protocol are: Same session, different SSRC Provide feed-back of the reception quality Does not support different QoS profiles Carry a persistent identifier for a RTP source. Impossible in a multicast scenario to join just the audio stream (for instance) Carry NTP s enabling inter-media synchronization. Different sessions, same SSRC works ok. SSRC:s totally unrelated Different sessions, different SSRC works ok. SSRC:s totally unrelated 27 Keep track of number of participants so that can scale (i.e., lower the rate at which control messagesissent) Optional minimal session control. Note: If RTP data is sent to the UDP-port P (should be even) messages should be sent on port P+1. 28

Compound Packets Sender Report (SR) Several packets are concatenated to form one compound packet. These will at least contain two individual packets (SR/RR and a SDES). No of receiver reports ver P RC M PT = SR = 200 length SSRC of sender NTP (most significant word) Sender OR Receiver Report (SR/RR) (Additional Receiver Reports)... sender info NTP (least significant word) RTP sender's packet cound sender's octet count. SSRC_1 (SSRC of first source) Source Description (SDES) fraction lost cumulative number of packets lost BYE or APP packet (optional) Receiver report block 1 extended highest sequence number received inter-arrival jitter last sender report NTP (middle 32 bits) There is a also an encryption option which is skipped here delay since last sender report (65536Hz accuracy) 29 30 Receiver Report (RR) Source Description (SDES) No of SSRC/CSRC chunks ver P RC M PT = RR = 201 length ver P SC M PT=SDES=202 length fraction lost SSRC of sender SSRC_1 (SSRC of first source) cumulative number of packets lost Chunk 1 SSRC / CSRC_1 SDES items... Receiver report block 1 extended highest sequence number received inter-arrival jitter last sender report NTP (middle 32 bits) Chunk 2 SSRC / CSRC_2 SDES items... delay since last sender report (65536Hz accuracy) When participant in an RTP-session only receives flow we skip the sender information block. Note that a receiver need to have an SSRC anyway! A problem here is to which address and port do we send our messages! If it's a multicast session on UDP(IP#, port) we send them to UDP(IP#,port+1), but if it's a unicast session the upstream IP# and port has to be configured by a higher level session protocol. 31 SDES information blocks must be sent by every sender. It gives some textual information regarding the flow. The flow might possibly be the result of mixing in which case information for each mixed flow is present. An SDES item looks like item code length UTF-8 string 32

SDES Items RTP Synchronization 1 CNAME (1) Mandatory Item. Should uniquely identify the source. Name should be algorithmically derived from e.g., host IP. Flows from different RTP sessions but with the same CNAME indicates inter-media synchronization. Global Synchronization reference clock RC1 reference clock RC2 NTP global cloud wall clock time NAME (2) EMAIL (3) PHONE (4) LOC (5) User Name. Ex: John Doe, Bit Recycler Electronic mail address according to RFC2822. Phone number with a + replacing int. access code. Geographic user location. Ex: Room 473 1tr A-hus. Different RTP sessions on same host SSRC: 2 SSRC: 1 SSRC: 1 (NTP1, RTP1) SSRC: 3 SSRC: 3 (NTP3, RTP3) TOOL (6) NOTE (7) PRIV (8) Name and optionally version of application generating the flow Transient message describing state of source. Experimental or application specific. Has another syntax for the UTF-8 string field. 33 SSRC: 2 (NTP1, RTP2) SR packets determines the RTP s' relation to the global wall clock time. Synchronization between (1,2) and (3) may be inexact due to bad NTP inaccuracy. receiver reference clock RC3 34 RTP Synchronization 2 Session Description Protocol (SDP) Inter-media synchronization in absence of global synchronization. RFC2327 reference clock RC1 SSRC: 2 Receiver sees that CNAME:s are the same for SSRC:1 and 2. SSRC: 1 SSRC: 2 (NTP1, RTP2) CNAME: a.b.c.d Receiver then knows these flows use the same reference clock and can achieve point-to-point synchronization with RC1 using s from both flows. SSRC: 1 and 2 may be played out in absolute synch! SSRC: 1 (NTP1, RTP1) CNAME: a.b.c.d SSRC: 3 SSRC: 3 (NTP3, RTP3) CNAME: e.f.g.h receiver reference clock RC2 35 MIME-type: application/sdp SDP conveys information needed to join one or more multimedia sessions Session name and purpose Time(s) when session is active What media is involved Information on how to receive those media (addresses, ports, formats etc.) Optionally bandwidth requirements Optionally how to contact person responsible 36

SDP Syntax (selected parts) SDP Example Information is in human readable form coded using UTF-8 encoded Unicode character set. Session description v= (protocol version) o= (owner/creator and session identifier). <username> <session id> <version> <network type> <address type> <address> s= (session name) i=* (session information) <more optional fields> <One or more time descriptions> a=* (zero or more session attribute lines) Time description t= (time the session is active) r=* (zero or more repeat times) Media description m= (media name and transport address) i=* (media title) c=* (connection info - optional if included at session-level) b=* (bandwidth information) k=* (encryption key) a=* (zero or more media attribute lines) 37 v=0 o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4 s=sdp Seminar i=a Seminar on the session description protocol u=http://www.cs.ucl.ac.uk/staff/m.handley/sdp.03.ps e=mjh@isi.edu (Mark Handley) c=in IP4 224.2.17.12/127 t=2873397496 2873404696 a=recvonly m=audio 49170 RTP/AVP 11 m=video 51372 RTP/AVP 32 m=application 32416 udp wb a=orient:portrait Note that an SDP-session is not the same as an RTP session. The three medias above will flow into three parallel RTP sessions on different UDP ports but to the same (multicast) address. 38 Real-time Streaming Protocol (RTSP) RTSP Client to Server Methods RFC2326 Network remote control for multimedia servers Mimics HTTP. Example of the rtsp: URI: rtsp://videoserv.liu.se/filmtest/audio Well-know port 554. RTSP is state-ful while HTTP is state-less. An RTSP session typically contains state such as: One of {Init, Ready, Playing, Recording} PLAY-commands are queued at server A PAUSE may be set to appear at a specific time for many URI:s at the same time! SETUP DESCRIBE PAUSE PLAY RECORD SET_PARAMETER GET_PARAMETER ANNOUNCE OPTIONS Agree on how a single media should be streamed. Addresses, protocols etc. (in an on-demand scenario also ports for upstream messages) Request session description data Pause the indicated URI Start play-back of indicated URI Tell server to start record from previously given invitation. Generic method for setting stream params Generic method for reading stream params Send session information for later recording Query URI for supported methods 39 TEARDOWN Stop streaming and free resources 40

RTSP Session Setup SDP Pointing out RTSP A client may connect to a RTSP server and query different URI:s via DESCRIBE-calls. When client first issues a SETUP-call for a certain media URI an RTSP-session is initiated, An SDP session description might point out media as a set of RTSP controlled resources. Client->S: SETUP rtsp://foo/twister/video RTSP/1.0 CSeq: 3 Transport: RTP/AVP;unicast;client_port=8002-8003 Server->C: RTSP/1.0 200 OK CSeq: 3 Transport: RTP/AVP;unicast;client_port=8002-8003; server_port=9004-9005 Session: 12345678 This is indicated by the Session: field in the server response. The client should in future requests include this in header. The session identifier should be a randomly created string with at least 8 characters. 41 v=0 o=- 2890844256 2890842807 IN IP4 204.34.34.32 s=i came from a web page t=0 0 c=in IP4 0.0.0.0 m=video 8002 RTP/AVP 31 a=control:rtsp://rtspserv.com/movie.aud m=audio 8004 RTP/AVP 3 a=control:rtsp://rtspserv.com/movie.vid Note that the m= sections does not convey any address/port information for how media is streamed. This is left to the SETUP-call. This kind of SDP-data could be given from a HTTP-request but can also be the result of a DESCRIBE-call for a specific RTSP URI. 42 RTSP Presentation Streaming Through a Firewall Each rtsp: URI correspond to a presentation. A presentation is one of two things Asinglemedia A container file consisting of one or more submedias To find out which a client can Issue a SETUP call and prepare to get back an error 403 Aggregate Operation Not Allowed. In general UDP-based traffic is tougher to handle for firewalls since there is no transport-level connection mechanism like TCP's which the firewall could intercept. Several solutions exists however: A firewall might work on application-level and intercept SETUP-calls and open up for incoming flows. RTSP includes an option for embedding RTP/ packets over TCP One could deploy an RTSP proxy beside the firewall and instruct the client to always go via the proxy. Such a proxy instructs the real RTSP-server to stream to the proxy server instead. Issue a DESCRIBE call and study the SDP m= fields. Although note that DESCRIBE-support in an RTSP-server is not a MUST! For playing an aggregated media a separate SETUP call per submedia is needed. The RTSP-server could support aggregate control (PLAY, PAUSE etc.) of all submedias. One then issues the method on the container URI. 43 44

IETF Working Groups Summary avt Audio/Video Transport Real-time requires synchronization. RTP / Jitter affects buffer size. Payload formats for various audio and video formats (-law/linear PCM, H.263, MPEG, GSM..) RTP and offers a common framework for handling mmusic Multiparty Multimedia Session Control Synchronization SDP Packets arriving out of order RTSP Source Identification SIP (earlier versions before SIP got a working group of its own) Loop detection SDP is a textual syntax for describing session setup parameters. 45 RTSP is the remote VCR control protocol. 46