23/5/2018 ShareTechnote
IMS/SIP - RTP/RTCP Home : www.sharetechnote.com
RTP / RTCP
RTP stands for Real Time Protocol and RTCP stands for Real Time Control Protocol. Simply put, RTP is a protocol to
carry various real time data (e.g, audio, video) and RTCP is a kind of control mechanism for RTP. Some of the import
functions of RTP and RTCP are listed below. I think the best way to get the detailed understanding of RTP and RTCP is
to go through header structure of these protocol and see what kind of parameter (information) are included in the
header and understand the role (meaning) of each of the parameters.
RTP provides a thin protocol to support for various real time application (e.g, audio, video). This protocol provides
the means to reconstruct timing, to detact loss and to perform security and to carry the content identification.
RTP is designed to follow the architectural principle known as Application Level Framing.
RTP provides a flexible mechanism by which new applications can be developed without repeatedly revsing RTP
itself.
RTCP provides the means to control RTP. It offser the QoS feedback from the recievers and it support for the
synchronization of different media streams. It also carries information about participants in a group session.
RTP Structure
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 1/9
23/5/2018 ShareTechnote
V (Version) : Fixed to '2' as of now (Dec 2017)
P (Padding) : Indicates whether the packet contains the padding octets at the end, or not.
0 - No Padding in the packet
1 - Padding in the packet. The last ocet of the padding contains a count of how many padding octetns
should be ignored. NOTE : Why we need this kind of padding ? It is for the cases where the packet should
be filled up a block of certain size as required by an encryption algorithm.
X (Extension) : Indicates the existance of the extension header
0 - No extension header
1 - Exactly one extension header follows the fixed header
CC (CSRC Count) : Indicates the number of CSRC identifiers that follows the fixed header.
M (Marker) : This is the field intended for marking a special events (e.g, frame broundary). The exact meaning of
this marker varies with a profile.
PT (Payload Type) : Indicates the format of the RTP payload and determines its interpretation by the application.
< RFC 3551 : Table 4: Payload types (PT) for audio encodings >
PT encoding media type clock rate channels
name (Hz)
___________________________________________________
0 PCMU A 8,000 1
1 reserved A
2 reserved A
3 GSM A 8,000 1
4 G723 A 8,000 1
5 DVI4 A 8,000 1
6 DVI4 A 16,000 1
7 LPC A 8,000 1
8 PCMA A 8,000 1
9 G722 A 8,000 1
10 L16 A 44,100 2
11 L16 A 44,100 1
12 QCELP A 8,000 1
13 CN A 8,000 1
14 MPA A 90,000 (see text)
15 G728 A 8,000 1
16 DVI4 A 11,025 1
17 DVI4 A 22,050 1
18 G729 A 8,000 1
19 reserved A
20 unassigned A
21 unassigned A
22 unassigned A
23 unassigned A
dyn G726-40 A 8,000 1
dyn G726-32 A 8,000 1
dyn G726-24 A 8,000 1
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 2/9
23/5/2018 ShareTechnote
dyn G726-16 A 8,000 1
dyn G729D A 8,000 1
dyn G729E A 8,000 1
dyn GSM-EFR A 8,000 1
dyn L8 A var. var.
dyn RED A (see text)
dyn VDVI A var. 1
< RFC 3551 : Table 5: Payload types (PT) for video and combined encodings >
PT encoding media type clock rate
name (Hz)
_____________________________________________
24 unassigned V
25 CelB V 90,000
26 JPEG V 90,000
27 unassigned V
28 nv V 90,000
29 unassigned V
30 unassigned V
31 H261 V 90,000
32 MPV V 90,000
33 MP2T AV 90,000
34 H263 V 90,000
35-71 unassigned ?
72-76 reserved N/A N/A
77-95 unassigned ?
96-127 dynamic ?
dyn H263-1998 V 90,000
Example 01 >
Real-Time Transport Protocol
[Stream setup by SDP (frame 9)]
[Setup frame: 9]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 .... = Extension: False
.... 0000 = Contributing source identifiers count: 0
1... .... = Marker: True
Payload type: DynamicRTP-Type-97 (97)
Sequence number: 21770
[Extended sequence number: 87306]
Timestamp: 483390931
Synchronization Source identifier: 0x113db031 (289255473)
Payload: f03c70696cc8e17b8588e8e60ff623270580007e56418a28...
RTCP Structure
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 3/9
23/5/2018 ShareTechnote
RTCP - SR (Sender Report)
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 4/9
23/5/2018 ShareTechnote
RTCP - SDES (Source Description)
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 5/9
23/5/2018 ShareTechnote
Example 01 >
Real-time Transport Control Protocol (Sender Report)
[Stream setup by SDP (frame 2)]
[Setup frame: 2]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Reception report count: 1
Packet type: Sender Report (200)
Length: 12 (52 bytes)
Sender SSRC: 0x113db030 (289255472)
Timestamp, MSW: 300 (0x0000012c)
Timestamp, LSW: 1786706395 (0x6a7ef9db)
[MSW and LSW as NTP timestamp: Feb 7, 2036 06:33:16.415999999 UTC]
RTP timestamp: 483391347
Sender's packet count: 4
Sender's octet count: 132
Source 1
Identifier: 0x113db031 (289255473)
SSRC contents
Fraction lost: 0 / 256
Cumulative number of packets lost: 1
Extended highest sequence number received: 0
Sequence number cycles count: 0
Highest sequence number received: 0
Interarrival jitter: 0
Last SR timestamp: 0 (0x00000000)
Delay since last SR timestamp: 0 (0 milliseconds)
Real-time Transport Control Protocol (Source description)
[Stream setup by SDP (frame 2)]
[Setup frame: 2]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Source count: 1
Packet type: Source description (202)
Length: 4 (20 bytes)
Chunk 1, SSRC/CSRC 0x113DB030
Identifier: 0x113db030 (289255472)
SDES items
Type: CNAME (user and domain) (1)
Length: 7
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 6/9
23/5/2018 ShareTechnote
Text: unknown
Type: END (0)
[RTCP frame length check: OK - 72 bytes]
Example 02 >
Real-time Transport Control Protocol (Sender Report)
[Stream setup by SDP (frame 112)]
[Setup frame: 112]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Reception report count: 1
Packet type: Sender Report (200)
Length: 12 (52 bytes)
Sender SSRC: 0x3f8ead04 (1066315012)
Timestamp, MSW: 3721497922 (0xddd18d42)
Timestamp, LSW: 1046146659 (0x3e5aee63)
[MSW and LSW as NTP timestamp: Dec 5, 2017 21:25:22.243574999 UTC]
RTP timestamp: 1313316619
Sender's packet count: 72
Sender's octet count: 60905
Source 1
Identifier: 0x3f8ead03 (1066315011)
SSRC contents
Fraction lost: 0 / 256
Cumulative number of packets lost: 0
Extended highest sequence number received: 6346
Sequence number cycles count: 0
Highest sequence number received: 6346
Interarrival jitter: 2363
Last SR timestamp: 2369797437 (0x8d403d3d)
Delay since last SR timestamp: 130277 (1987 milliseconds)
Example 03 >
Real-time Transport Control Protocol (Sender Report)
[Stream setup by SDP (frame 125)]
[Setup frame: 125]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Reception report count: 1
Packet type: Sender Report (200)
Length: 12 (52 bytes)
Sender SSRC: 0x00819e3b (8494651)
Timestamp, MSW: 8496 (0x00002130)
Timestamp, LSW: 2924872728 (0xae560418)
[MSW and LSW as NTP timestamp: Feb 7, 2036 08:49:52.680999999 UTC]
RTP timestamp: 32000
Sender's packet count: 53
Sender's octet count: 2223
Source 1
Identifier: 0x00819e3c (8494652)
SSRC contents
Fraction lost: 4 / 256
Cumulative number of packets lost: 1
Extended highest sequence number received: 52
Sequence number cycles count: 0
Highest sequence number received: 52
Interarrival jitter: 3
Last SR timestamp: 0 (0x00000000)
Delay since last SR timestamp: 0 (0 milliseconds)
Real-time Transport Control Protocol (Source description)
[Stream setup by SDP (frame 125)]
[Setup frame: 125]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Source count: 1
Packet type: Source description (202)
Length: 6 (28 bytes)
Chunk 1, SSRC/CSRC 0x819E3B
Identifier: 0x00819e3b (8494651)
SDES items
Type: CNAME (user and domain) (1)
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 7/9
23/5/2018 ShareTechnote
Length: 14
Text: 2001:0:0:1::11
Type: END (0)
Example 04 >
Real-time Transport Control Protocol (Goodbye)
[Stream setup by SDP (frame 125)]
[Setup frame: 125]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Source count: 1
Packet type: Goodbye (203)
Length: 2 (12 bytes)
Identifier: 0x3f8ead03 (1066315011)
Length: 0
Text:
Example 05 >
Real-time Transport Control Protocol (Sender Report)
[Stream setup by SDP (frame 125)]
[Setup frame: 125]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Reception report count: 1
Packet type: Sender Report (200)
Length: 12 (52 bytes)
Sender SSRC: 0x00819e3b (8494651)
Timestamp, MSW: 8530 (0x00002152)
Timestamp, LSW: 2744484102 (0xa3958106)
[MSW and LSW as NTP timestamp: Feb 7, 2036 08:50:26.638999999 UTC]
RTP timestamp: 575328
Sender's packet count: 789
Sender's octet count: 30996
Source 1
Identifier: 0x00819e3c (8494652)
SSRC contents
Fraction lost: 0 / 256
Cumulative number of packets lost: 1
Extended highest sequence number received: 788
Sequence number cycles count: 0
Highest sequence number received: 788
Interarrival jitter: 3
Last SR timestamp: 558933082 (0x2150a45a)
Delay since last SR timestamp: 129369 (1974 milliseconds)
Real-time Transport Control Protocol (Source description)
[Stream setup by SDP (frame 125)]
[Setup frame: 125]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Source count: 1
Packet type: Source description (202)
Length: 6 (28 bytes)
Chunk 1, SSRC/CSRC 0x819E3B
Identifier: 0x00819e3b (8494651)
SDES items
Type: CNAME (user and domain) (1)
Length: 14
Text: 2001:0:0:1::11
Type: END (0)
Real-time Transport Control Protocol (Goodbye)
[Stream setup by SDP (frame 125)]
[Setup frame: 125]
[Setup Method: SDP]
10.. .... = Version: RFC 1889 Version (2)
..0. .... = Padding: False
...0 0001 = Source count: 1
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 8/9
23/5/2018 ShareTechnote
Packet type: Goodbye (203)
Length: 7 (32 bytes)
Identifier: 0x00819e3b (8494651)
Length: 22
Text: Disconnect IMS Session
Reference :
[1] RTP: Multimedia Streaming over IP
[2] RTP, RTCP and RTSP - Internet Protocols for Real-Time Multimedia Communication
[3] 6.3.1 SR: Sender report RTCP packet
http://www.sharetechnote.com/html/IMS_SIP_RTP_RTCP.html 9/9