[Live-devel] how to set RTSP Client use TCP instead of UDP

Ross Finlayson finlayson at live555.com
Fri Jan 5 22:32:20 PST 2007


RTSP uses a control channel - which is always TCP, using a standard 
RTSP TCP port number (554 or 8554).  Then, for each data stream 
(audio and/or video), it uses a data channel (for sending RTP/RTCP 
packets from the server to the client).

Normally (i.e., if you don't use the "-t" option to "openRTSP"), each 
data channel uses UDP.

However, if the client requests it (using the "streamUsingTCP" 
parameter to "RTSPClient:: setupMediaSubsession()", or, using 
"openRTSP", the "-t" option), then each data channel will also use 
TCP -  using *the same* TCP connection as the control channel.  (The 
RTP/RTCP data is interleaved over the control channel TCP connection 
- from the server back to the client.)

It turns out that in our implementation, we create UDP sockets even 
when the client requests streaming over TCP.  However, in this case 
those UDP sockets don't get used; all data is sent over the TCP 
connection instead.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list