Professional Documents
Culture Documents
RTP/RTCP/RTSP
Presented by1. A. H. M. Kamal (0411054002) 2. KAZY NOOR E- ALAM SIDDIQUEE (0411052009) 3. MASUD 4.Mahmudul Hasan Razib (0411052060)
Overview
Streaming performance requirements Protocol stack for multimedia services Real-time transport protocol (RTP) RTP control protocol (RTCP) Real-time streaming protocol (RTSP)
Quality of Service (QoS) feedback from receiver to sender for operation adjustment
Rate control sender reduces sending rate adaptively to network congestion
00.00.00
00.00.10 00.00.20 00.00.30
application
00.00.11 00.00.21
00.00.31
Reality jitter
delay
Send time
Play time
Jitter
(contd.)
00.00.18
00.00.28
Send time
Play time
Jitter
Playback buffer
(contd.)
At time 00:00:18
At time 00:00:28
At time 00:00:38
How does Sequence number and Timestamp help ? Audio silence example:
Consider audio data What should the sender do during silence? Not send anything Why might this cause problems? silence
Solution:
After receiving no PDUs for a while, next PDU received at the receiver will reflect a big jump in timestamp, but have the correct next seq. no. Thus, receiver knows what happened.
Quality of Service (QoS) feedback from receiver to sender for operation adjustment
Rate control sender reduces sending rate adaptively to network congestion
RTSP
RTP
RTCP
TCP
(till now)
RTP: Introduction
Provides end-to-end transport functions for real-time applications Supports different payload types All RTP and RTCP PDUs are sent to same multicast group (by all participants) All RTP PDUs sent to an even-numbered UDP port, 2p All RTCP PDUs sent to UDP port 2p+1
Transport layer
UDP
IP Data Link
Does NOT provide timely delivery or other QoS guarantees Relies on other protocols like RTCP and lower layers Does NOT assume the underlying network is reliable and delivers PDUs in sequence Uses sequence number
Physical
RTP Session
RTP Session
RTP session is sending and receiving of RTP data by a group of participants For each participant, a session is a pair of transport addresses used to communicate with the group If multiple media types are communicated by the group, the transmission of each medium constitutes a session.
synchronization source - each source of RTP PDUs Identified by a unique,randomly chosen 32-bit ID (the SSRC) A host generating multiple streams within a single RTP must use a different SSRC per stream
RTP Packet
RTP Header Audio/Video Chunk
RTP Packet
RTP Header Audio/Video Chunk
RTP Header
(used by mixers)
RTP Payload-Type
Audio Payload Type
Payload-Type Number 0 1 3 7 9 14 15 Audio Format PCM u-low 1016 GSM LPC G.722 MPEG Audio G.728 Sampling Rate (kHz) 8 8 8 8 16 90 8 Rate (kbps) 64 4.8 13 2.4 48-64 16
Mixer
RTP mixer - an intermediate system that receives & combines RTP PDUs of one or more RTP sessions into a new RTP PDU
Translator
An intermediate system that Connects two or more networks Multicasting through a firewall
Modifies stream encoding, changing the streams timing Transparent to participants SSRCs remain intact
end system 1
from ES1: SSRC=6 from ES2: SSRC=23
transl.1
transl.2
end system 2
Socket
UDP IP Data Link Physical
Use JAVA Class/ C RTP Library Send a chunk of media, Payload type no., SSRC, timestamp to interface
Approach One
Alternative Approach
RTP Security
Confidentiality Allows encription to RTP Packets Believes to lower levels to ensure authentication. Integrity by sanity checking descriptor header: protocol version no, pkt length, payload type.
Key Management
Internetwork
Timestamps in RTP PDUs are tied to the individual video and audio sampling clocks timestamps are not tied to the wall-clock time, or each other!
Each RTCP sender-report PDU contains (for most recently generated PDU in
associated RTP stream): The timestamp of RTP PDU The wall-clock time for when PDU was created Receivers can use this association to synchronize the playout of audio and video
T=
RTSP Overview
Reference to several continuous media file Directive for synchronization Web Server
web browser
Presentation descriptor
HTTP
presentation descriptor
media player
RTP/RTCP
audio/video content
RTSP Session
RTSP server
get UDP port
TCP
RTSP client
choose UDP port
UDP
AV subsystem
media player
Client C
W V C
C-> A : SETUP rtsp://audio.example.com/twister/audio.en RTSP/1.0 Cseq:1 Transport : RTP/AVP/UDP;unicast;client_port=3056-3057 A-> C : RTSP/1.0 200 OK Cseq:1 Session: 12345678 Transport : RTP/AVP/UDP;unicast;client_port=3056-3057 server_port=5000-5001 C->V : SETUP rtsp://video.example.com/twister/video.en RTSP/1.0 Cseq:1 Transport : RTP/AVP/UDP;unicast;client_port=3058-3059 A-> C : RTSP/1.0 200 OK Cseq:1 Session: 23456789 Transport : RTP/AVP/UDP;unicast;client_port=3058-3059 server_port=5002-5003
(contd.)
W
V->C: RTSP/1.0 200 OK Cseq: 2 Session: 23456789 RTP-Info: url=rtsp://video.example.com/twister/video; seq=12312232;
V C
C->A: PLAY rtsp://audio.example.com/twister/audio.en RTSP/1.0 Cseq: 2 Session: 12345678 A->C: RTSP/1.0 200 OK Cseq: 2 Session: 12345678 RTP-Info: url=rtsp://audio.example.com/twister/audio.en; seq=876655;
(contd.)
W V
C->V: TEARDOWN rtsp://video.example.com/twister/video RTSP/1.0 Cseq: 3 Session: 23456789 V->C: RTSP/1.0 200 OK Cseq: 3
RTCP PDU 1
SSRC SSRC
RTCP PDU 2
SR
sender report
SSRC
SDES
SSRC
CNAME PHONE
SDES : Forwards without changing the SDES info. but may filter non CNAME SDES, if bandwidth is limited
BYE : Forwards BYE PDU unchanged. A mixer about to cease forwarding, send a BYE PDU to each connected nodes
CNAME=1
length
=Thanks to all=