[Live-devel] linking RTCP RR and RTSP sessions

Thomas Vander Stichele thomas at apestaart.org
Mon Apr 30 09:09:05 PDT 2007


I was wondering exactly what the correct way is to relate RTCP RR
reports to RTSP sessions on a server.  I would like to know because, if
I understand the RFC's correctly, an RTSP server MAY use any "wellness"
information from clients (for example, RTCP RR packets) to keep the RTSP
session alive.

AFAICT, most mobile phones do not do keepalive on the RTSP layer, so an
RTSP server has the need to tie RTCP RR packets to the RTSP sessions.

(If I am wrong at this point, please do correct me, this stuff eats my
brain when I think about it)

The RTCP RR reports only provide the server with:
- the client's (apparent) IP address (possibly changed through NAT)
- the outgoing client UDP port from which these RTCP reports get sent
(which I assume could have been changed through NAT)
- the incoming server UDP port on which the server receives RTCP reports
- the client's SSRC

Of these, only the client's IP address was communicated to the RTSP
server; the server knows which incoming UDP/RTCP port it asked the
client to send to.

I see the following options for the server to be able to map RTSP
sessions to RTCP  RR reports:
- The server allocates a unique rtp and rtcp reception port for each
RTSP session; this allows the server to id RTCP RR reports based on the
incoming RTCP port.
- The server uses the same rtp/rtcp reception port for each new RTSP
session from a not-yet-known IP; if the same IP does a new session
request, the server bumps rtp/rtcp reception ports.
- The server uses the same rtp/rtcp reception port for everyone; it
pretends that there is one session per IP.

The first solution has the huge disadvantage that the server is limited
to about 30k clients, given the number of ports it can receive on.  Not
to mention that select() would go out the window for checking
activity :)

The second solution is a little less greedy with ports, but harder to
code.

The third one seems wrong to me.


I was wondering what the behaviour is of the live555 libraries.  Anyone
know ?

Thanks
Thomas






More information about the live-devel mailing list