Search code examples
video-streamingsiprtp

Port for sending rtcp receiver reports


If I am receiving a rtp stream, which port do I send rtcp receiver reports? For example if I use an SDP to negotiate a receive only stream with the server say through SIP, I would only specify my ports for receiving rtp and rtcp streams. How should the server respond. It only needs to send rtp sterams. So it can choose any port on its end of the socket. How should it specify the rtcp port on which it would be listening to rtcp receiver report?


Solution

  • Normally the RTCP port is the next port number up from the one being used for RTP. So for example if the RTP port is 30000 then port 30001 will be used for RTCP.

    In the case you've mentioned you could wait until you receive an RTP packet from the server and then send the RTCP receiver reports to the RTP port number + 1.