320 likes | 467 Views
Agenda. A brief overview to RTP and RTCP. Real-Time Transport Protocol (RTP). Protocol to the continuous transmission of audiovisual data (streams) over IP-based networks Product of Internet Engineering Task Force, AVT WG Standardized first in 1996 RFC 1889 In 2003, a revised RFC
E N D
Agenda • A brief overview to RTP and RTCP
Real-Time Transport Protocol (RTP) • Protocol to the continuous transmission of audiovisual data (streams) over IP-based networks • Product of Internet Engineering Task Force, AVT WG • Standardized first in 1996 • RFC 1889 • In 2003, a revised RFC • RFC 3550 which obsoletes RFC 1889. :
RTP goals • lightweight: specification and implementation • flexible: provide mechanism, don’t dictate algorithms • protocol-neutral: UDP/IP, ST-II, IPX, ATM-AALx, . . . • scalable: unicast, multicast from 2 to O(10^7) • separate control/data: some functions may be taken over by conference control protocol • secure: support for encryption, possibly authentication :
RTP overview • RTP is a packet-based protocol • usually running over UDP • Transport multimedia data streams (audio, video, text, etc.) over networks • Encode • Package • Send • It applies in many areas • IP telephony technologies (H.323, SIP) • RTP is mainly used for transmission of realtime sensitive data flows, while the Real-Time Streaming Protocol (RTSP) manages and controls the data transmission. :
The RTP header • Ver. (2 bits) • Indicates the version of the protocol. Current version is 2. • P (1 bit) • Indicates if there are extra padding bytes at the packet. • X (1 bit) • Indicates if protocol extensions are being used in the packet. • CC (4 bits) • Number of CSRC identifiers that follow the fixed header. • M (1 bit) • If it is set, data has some special relevance for the application. • PT (7 bits) • Format of the payload and determines its interpretation by the application. :
What else • Synchronisation Source • The data source, characterized by an identifier (32 bit) in the header • Mixer • Switching center, which receive RTP packets from one or multiple sources and forward them. • Mix packages (and synchronizes) and can carry out format conversions. • Translator • Don‘t modify packets, but route through firewalls etc. • Reciever • The reciever of the RTP packets sorts them on the basis of the sequence numbers and submits them to the respective application. :
Real Time Control Protocol (RTCP) • Dient der Aushandlung und Einhaltung von Quality of Service (QoS) Parametern durch den periodischen Austausch von Steuernachrichten zwischen Sender und Empfänger • Mittels: • Rückmeldung der bisher erbrachten Dienstqualität, wodurch eine Anpassung der Übertragungsrate erfolgen kann • Identifikation aller Sitzungsteilnehmer, wodurch semantisch zusammenhängende aber getrennt gesendete Medienströme synchronisiert werden können • Steuerung der für RTCP-Pakete verwendeten Bandbreite, damit der Austausch von RTCP-Nachrichten nicht die Übertragung behindert, was bei vielen Sitzungsteilnehmern passieren könnte.
RTCP sender reports (SR) • SSRC of sender: identifies source of data • NTP timestamp: when report was sent • RTP timestamp: corresponding “RTP time” lip sync • sender’s packet count: total number sent • sender’s octet count: total number sent • followed by zero or more receiver report
RTCP receiver reports (RR) • SSRC of source: identifies who’s being reported on • fraction lost: binary fraction • cumulative number of packets lost: long-term loss • highest sequence number received: compare losses, disconnect • interarrival jitter: smoothed interpacket distortion • LSR: time last SR heard • DLSR: delay since last SR
Questions • Find more on the online slides
Agenda • Streaming Motivation The RTSP/RTP Session Overview Bits from example Session
RTSP • Wikipedia: • The Real Time Streaming Protocol (RTSP), developed by the IETF and created in 1998 as RFC 2326, is a protocol for use in streaming media systems which allows a client to remotely control a streaming media server, issuing VCR-like commands such as "play" and "pause", and allowing time-based access to files on a server. • The sending of streaming data itself is not part of the RTSP protocol. Most RTSP servers use the standards-based RTP as the transport protocol for the actual audio/video data, acting somewhat as a metadata channel. • …
Resources on the Web • Wikipedia is a good start: • http://en.wikipedia.org/wiki/Real_Time_Streaming_Protocol • RFC RTSP: http://tools.ietf.org/html/rfc2326 • RFC RTP: http://tools.ietf.org/html/rfc3550 • Tutorial on RTSP: • http://www.myiptv.org/Articles/RTSP/tabid/72/Default.aspx • Pictures and parts of text taken from: • http://www.cs.columbia.edu/~hgs/rtsp/
Streaming vs. Television • - reuse existing infrastructure • - flexible media: modem, wireless, cable, LAN, . . . • - Quality scales from stamp-size flipbook to HDTV – adaptive • - Side information easy (closed captioning) • - Easy integration with WWW • - Security through encryption • - Cheap authoring, service lots of content
Applications • - Lectures, seminars • - On-demand instruction • - Entertainment: specialty content (cf. youtube) • Voice mail - P2P video streaming
Challenges • bandwidth: 64–128 kb/s for talking heads, 1.5 Mb/s for movies • quality: packet loss, predictability • reliability: makes CATV look good. . . • billing infrastructure: pay-per-view? • cheap receivers: shouldn’t cost more than set-top box
Internet real-time & multimedia protocols • resource reservation: RSVP, … • media transport: RTP, AVP, … • stream control: RTSP • stream description: SDP, … SDP: http://tools.ietf.org/html/rfc4566 AVP: http://www.ece.osu.edu/~zheng/publications/AVP-protocol.pdf
RTSP and HTTP: similarities • Protocol format: text, MIME-headers • Request/response = request line + headers + body • Status codes • Security mechanisms • URL format
RTSP is not HTTP • - Server state needed • - Different methods • - Server client • - Protocol Extension posssible: • Extensions start with “x-”, e.g.: x-historyLog
Agenda • Streaming Motivation The RTSP/RTP Session Overview Bits from example Session
RTSP URLs • Whole presentation: • rtsp://media.example.com:554/twister • track within presentation: • rtsp://media.example.com:554/twister/audiotrack • but: name hierarchy != media hiearchy != file system
RTSP Request headers • Accept media description formats • Accept-Encoding encoding of media format • Accept-Language human language • Authorization basic and digest authentication • Bandwidth client bandwidth available • Conference conference identifier • From name of requestor • If-Modified-Since conditional retrieval • Range time range to play • Referer how did we get here? • Scale (play time)/(real time) • Speed speed-up delivery • User-Agent software
RTSP Response headers • Location redirection • Proxy-Authenticate authenticate to proxy • Public methods supported • Retry-After busy, come back later • Server server software • Vary cache tag • WWW-Authenticate request authorization • Hint: • All headers and bodies end with a double carriage return line feed.
Time Formats • smpte=0:10:00 “Society of Motion Picture and Television Engineers” - hour:minute:second:frame - optional • npt=126.315 Normal play time - {hh;mm;ss}.ms • - mandatory • Rtptime= 1324433 Part of RTP, needed to differentiate between emission time and media time • seq=1214324432 part of RTP != time; sequence number of first frame
Agenda • Streaming Motivation The RTSP/RTP Session Overview Bits from example Session
Unicast session: open streams • C->S: SETUP rtsp://audio.com/twister/audio.en RTSP/1.0 • CSeq: 1 • Transport: RTP/AVP/UDP;unicast;client_port=3056-3057 • S->C: RTSP/1.0 200 OK • CSeq: 1 • Session: 12345678 • Transport: RTP/AVP/UDP;unicast; • client_port=3056-3057;server_port=5000-5001 • C->S: SETUP rtsp://video.com/twister/video RTSP/1.0 • CSeq: 1 • Transport: RTP/AVP/UDP;unicast;client_port=3058-3059 • S->C: RTSP/1.0 200 OK • CSeq: 1 • Session: 23456789 • Transport: RTP/AVP/UDP;unicast; • client_port=3058-3059;server_port=5002-5003 Error Codes listed in RFC, but same as HTTP
Unicast session: play • C->S: PLAY rtsp://video.com/twister/video RTSP/1.0 • CSeq: 2 • Session: 23456789 • Range: smpte=0:10:00- • S->C: RTSP/1.0 200 OK • CSeq: 2 • Session: 23456789 • Range: smpte=0:10:00-0:20:00 • RTP-Info: url=rtsp://video.com/twister/video;seq=12312232;rtptime=78712811 • C->S: PLAY rtsp://audio.com/twister/audio.en RTSP/1.0 • CSeq: 2 • Session: 12345678 • Range: smpte=0:10:00- • S->C: RTSP/1.0 200 OK • CSeq: 2 • Session: 12345678 • Range: smpte=0:10:00-0:20:00 • RTP-Info: url=rtsp://audio.com/twister/audio.en;seq=876655;rtptime=1032181 RTP Interaction
Summary • - Internet multimedia-on-demand • Integrated services • Protocol Extensions • - Conferencing • - Telephony • - WebTV as VOD • - Flexible plug and play RTSP/RTP/AVP/SDP ….