Wowza Community

RTSP SETUP transport switching

I am trying to use SETUP to switch transports after a stream has already been established. Specifically I am trying to do this to support falling back to TCP interleave if I do not receive RTCP packets back from Wowza when using UDP (Indicating UDP is possibly being blocked). The RTSP messages indicate that this is supported, but after doing the transport switch Wowza does not read from the TCP connection. It will however continue to accept UDP packets for the initial SETUP. Is this something that is supposed? I have attached some RTSP test responses. If this is not supported it would be nice if you would return a 455.

General RTSP messaging.

2011-12-15 10:41:54.034 sRTSP[23365:707] --- OPTIONS Response: 200 ---
 {
    "Cache-Control" = " no-cache";
    Cseq = " 1";
    Public = " DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, RECORD, GET_PARAMETER";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Supported = " play.basic, con.persistent";
} 
2011-12-15 10:41:54.079 sRTSP[23365:707] --- ANNOUNCE Response: 200 - session: 77783130 ---
 {
    "Cache-Control" = " no-cache";
    Cseq = " 2";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Session = " 77783130;timeout=60";
} 
2011-12-15 10:41:54.085 sRTSP[23365:707] --- SETUP Response: 200 ---
 {
    "Cache-Control" = " no-cache";
    Cseq = " 3";
    Date = " Thu, 15 Dec 2011 10:41:54 PST";
    Expires = " Thu, 15 Dec 2011 10:41:54 PST";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Session = " 77783130;timeout=60";
    Transport = " RTP/AVP/UDP;unicast;client_port=5000-5001;mode=receive;source=192.168.1.50;server_port=6972-6973";
} 
2011-12-15 10:41:54.089 sRTSP[23365:707] --- SETUP Response: 200 ---
 {
    "Cache-Control" = " no-cache";
    Cseq = " 4";
    Date = " Thu, 15 Dec 2011 10:41:54 PST";
    Expires = " Thu, 15 Dec 2011 10:41:54 PST";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Session = " 77783130;timeout=60";
    Transport = " RTP/AVP/UDP;unicast;client_port=5002-5003;mode=receive;source=192.168.1.50;server_port=6970-6971";
} 
2011-12-15 10:41:54.091 sRTSP[23365:707] --- RECORD Response: 200 ---
 {
    "Cache-Control" = " no-cache";
    Cseq = " 5";
    Range = " npt=now-";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Session = " 77783130;timeout=60";
} 
2011-12-15 10:41:59.094 sRTSP[23365:707] --- SETUP Response: 200 ---
 {
    "Cache-Control" = " no-cache";
    Cseq = " 6";
    Date = " Thu, 15 Dec 2011 10:41:59 PST";
    Expires = " Thu, 15 Dec 2011 10:41:59 PST";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Session = " 77783130;timeout=60";
    Transport = " RTP/AVP/TCP;unicast;interleaved=0-1;mode=receive";
} 
2011-12-15 10:41:59.096 sRTSP[23365:707] --- SETUP Response: 200 ---
 {
    "Cache-Control" = " no-cache";
    Cseq = " 7";
    Date = " Thu, 15 Dec 2011 10:41:59 PST";
    Expires = " Thu, 15 Dec 2011 10:41:59 PST";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Session = " 77783130;timeout=60";
    Transport = " RTP/AVP/TCP;unicast;interleaved=2-3;mode=receive";
} 
2011-12-15 10:41:59.101 sRTSP[23365:707] --- TEARDOWN Response: 200 ---
 {
    "Cache-Control" = " no-cache";
    Cseq = " 8";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Session = " 77783130;timeout=60";
} 
Program ended with exit code: 0

Live test messages.

2011-12-15 13:32:55.909 Livu[4783:707] [trace] Connected
2011-12-15 13:32:55.911 Livu[4783:707] [trace] --- OPTIONS Request ---
OPTIONS rtsp://...:1935/live/stream RTSP/1.0
Cseq: 1
2011-12-15 13:32:56.013 Livu[4783:707] [trace] --- OPTIONS Response ---
RTSP/1.0 200 OK
Supported: play.basic, con.persistent
Cseq: 1
Server: Wowza Media Server 3.0.3.12 build1008
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, RECORD, GET_PARAMETER
Cache-Control: no-cache
2011-12-15 13:32:56.016 Livu[4783:707] [trace] --- ANNOUNCE Request ---
ANNOUNCE rtsp://...:1935/live/stream RTSP/1.0
Cseq: 2
Content-Length: 246
Content-Type: application/sdp
v=0
o=- 0 0 IN IP4 127.0.0.1
s=Livu
c=IN IP4 ...
t=0 0
a=tool:Livu RTP
m=video 0 RTP/AVP 97
b=AS:64
a=rtpmap:97 H264/90000
a=fmtp:97 packetization-mode=1;sprop-parameter-sets=Z0IAHqtAsEsg,KM48gA==
a=control:trackid=1
2011-12-15 13:32:56.140 Livu[4783:707] [trace] --- ANNOUNCE Response ---
{
    "Cache-Control" = " no-cache";
    Cseq = " 2";
    Server = " Wowza Media Server 3.0.3.12 build1008";
    Session = " 450654471;timeout=60";
}
2011-12-15 13:32:56.141 Livu[4783:707] [trace] --- SETUP Request ---
SETUP rtsp://...:1935/live/stream/trackid=1 RTSP/1.0
Session: 450654471
Cseq: 3
Transport: RTP/AVP/UDP;unicast;client_port=5002-5003;mode=receive
2011-12-15 13:32:56.246 Livu[4783:707] [trace] --- SETUP Response ---
RTSP/1.0 200 OK
Date: Thu, 15 Dec 2011 13:31:51 PST
Transport: RTP/AVP/UDP;unicast;client_port=5002-5003;mode=receive;source=....;server_port=6980-6981
Session: 450654471;timeout=60
Expires: Thu, 15 Dec 2011 13:31:51 PST
Cseq: 3
Server: Wowza Media Server 3.0.3.12 build1008
Cache-Control: no-cache
2011-12-15 13:32:56.251 Livu[4783:707] [trace] --- RECORD Request ---
RECORD rtsp://...:1935/live/stream RTSP/1.0
Cseq: 4
range: npt=0.000-
Session: 450654471
2011-12-15 13:32:56.348 Livu[4783:707] [trace] --- RECORD Response ---
RTSP/1.0 200 OK
Range: npt=now-
Session: 450654471;timeout=60
Cseq: 4
Server: Wowza Media Server 3.0.3.12 build1008
Cache-Control: no-cache
2011-12-15 13:32:56.354 Livu[4783:707] Broadcast Message: Started
2011-12-15 13:33:32.420 Livu[4783:6f03] RTCP Timeout
2011-12-15 13:33:32.421 Livu[4783:6f03] Switching to TCP as transport
2011-12-15 13:33:32.422 Livu[4783:6f03] [trace] --- SETUP Request ---
SETUP rtsp://...:1935/live/stream/trackid=1 RTSP/1.0
Session: 450654471
Cseq: 5
Transport: RTP/AVP/TCP;unicast;interleaved=0-1;mode=receive
2011-12-15 13:33:32.522 Livu[4783:6f03] [trace] --- SETUP Response ---
RTSP/1.0 200 OK
Date: Thu, 15 Dec 2011 13:32:27 PST
Transport: RTP/AVP/TCP;unicast;interleaved=0-1;mode=receive
Session: 450654471;timeout=60
Expires: Thu, 15 Dec 2011 13:32:27 PST
Cseq: 5
Server: Wowza Media Server 3.0.3.12 build1008
Cache-Control: no-cache
2011-12-15 13:33:32.524 Livu[4783:6f03] [trace] Response line count: 10
2011-12-15 13:33:32.526 Livu[4783:6f03] Startup broadcast back up

At this point any data sent over the RTSP connection is ignored by Wowza. The prior UDP connection still works.

I did test tearing down the connection, and then setting it up again using TCP interleave. VLC survived the transition which is a good thing. Flash did as well as I assumed it would.

This property applies to all streams for a particular application. We currently do not have a way to do this stream by stream.

Charlie

Why not use MediaCaster API to stop the stream, change forceInterleaved, then start again.

Richard

Would this not change forceInterleaved for every connection to the application? Or is the switch only for a particular stream? I will look into this. Thanks.