CSRC and SSRC in RTP
Asked Answered
C

4

14

I am very new to RTP , can some one explain about the CSRC and SSRC in general?

From http://www.rfc-editor.org/rfc/rfc3550.txt , what it says is : The SSRC field identifies the synchronization source. Does it mean , in network there may be many senders who are contributing to RTP (multicast network) and to identify from which source the packet is coming??

CSRC : Contributing source (CSRC): A source of a stream of RTP packets that has contributed to the combined stream produced by an RTP mixer (see below). Did not understand.

can some one explain with example please? Thanks

Cantone answered 14/2, 2014 at 9:31 Comment(0)
P
22

taken from link:

SSRC Identifies the synchronization source. The value is chosen randomly, with the intent that no two synchronization sources within the same RTP session will have the same SSRC. Although the probability of multiple sources choosing the same identifier is low, all RTP implementations must be prepared to detect and resolve collisions. If a source changes its source transport address, it must also choose a new SSRC to avoid being interpreted as a looped source.

CSRC An array of 0 to 15 CSRC elements identifying the contributing sources for the payload contained in this packet. The number of identifiers is given by the CC field. If there are more than 15 contributing sources, only 15 may be identified. CSRC identifiers are inserted by mixers, using the SSRC identifiers of contributing sources. For example, for audio packets the SSRC identifiers of all sources that were mixed together to create a packet are listed, allowing correct talker indication at the receiver.

To be honest, I have never seen anyone actually use SSRC or CSRC in any meaningful way. In all the code I've dealt with, we just generate a random number in SSRC and don't never bother filling in CSRC.

I would guess SSRC may be useful in tracing and/or detecting looping audio paths.

I would guess CSRC may be useful for a sip endpoint receiving audio from a conference servers where multiple audio sources are mixed together as hinted in the quote above. As I said tho, in the conference server code I've dealt with, we don't bother.

Porshaport answered 22/2, 2014 at 7:35 Comment(3)
The SSRC is becoming more relevant with multi-party conferencing, where multiple video/audio streams come in. See the discussion at IETF ietf.org/mail-archive/web/perc/current/msg00398.htmlBille
It will be very useful if you provide capture for CSRCAcrodont
The accepted answer neglects RFC 8108, which describes use of SSRC to differentiate between multiple RTP streams within a session. Common use cases include Lawful Intercept and other analytics applications where multiple streams from an endpoint are related in some way. RFC 8108 allows an SSRC transition to designate a new stream or resumption of a previous stream, with no change in session information (i.e. endpoint IP address:port, or other SDP info). Note that this is different than mixing or conferencing, and CSRC can't be used to list all SSRC contriCelia
H
3

Regarding your question "Does it mean , in network there may be many senders who are contributing to RTP (multicast network) and to identify from which source the packet is coming??"

It is not specifically true because when there are many sources the video/audio is mixed by RTP mixer and the SSRC in this case is the RTP mixer SSRC which is not the source of the RTP packet sender, in order to know the sources you need to look at the CSRC array which has these sources identified by unique SSRC the size of the array is given also by the header field CC: count CSRC.

If the audio/video is not combined (uni-cast) then the SSRC is of the sender of this video/audio and CSRC not filled.

Helpful presentation: http://voip.netlab.uky.edu/~fei/teaching/cs671/slides/rtp.pdf

Humbert answered 22/3, 2014 at 22:1 Comment(3)
I am also new to RTSP wants to know If i am sending audio and video packets differenlty than in that case should be my SSRC will be same or different from Both Audio & video packets ?Phylloid
@Dinesh, Same SSRC if same source, different if different.Atomy
@MSalters, see this: cs.columbia.edu/~hgs/rtp/faq.html#ssrc-muxLoring
P
0
  1. SSRC:

Synchronization source identifier (32 bits) distinctively distinguishes the source of a data stream. The synchronization sources within the same RTP session will be unique.

2.CSRC:

Contributing source IDs (32 bits each) summate contributing sources to a stream which has been generated from multiple sources.

https://en.wikipedia.org/wiki/Real-time_Transport_Protocol

Presentational answered 26/7, 2017 at 13:39 Comment(1)
I see you're a new user and this is your first answer. While it is certainly concise, the original question seems to already contains that information, and they are looking to understand the differences between the two y requesting an example, which you haven't supplied. Since you're new, I won't mark it down (yet) to give you a chance to improve it.Snapp
M
0

According to the RFC 8108 section 4, here are the specification:

if RTP mixers are used, some SSRCs might only be visible in the contributing source (CSRC) list of an RTP packet and in RTCP, and might not appear directly as the SSRC of an RTP data packet.

Merous answered 31/7, 2020 at 7:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.