[Live-devel] Stream cutoff because openRTSP ignores timeout in Session header

Norbert Donath Norbert.Donath at keynote-sigos.com
Fri Jul 16 07:27:01 PDT 2010


Hello Ross,

We currently discovered a problem when we used openRTSP to download a
stream. The server includes a timeout parameter in the Session header
but openRTSP ignores it. The timeout is set to 50 s and after 60 s
play time the server stops sending RTP packets and sends TCP-RST on
the RTSP port. Of course, the RTCP RRs are sent from openRTSP and we
know that they are recieved on the server. However, it's not enough as
keep-alive indication.


Here is the output of wireshark of such a case (I know, you only
provide support for unmodified sources but we had to patch the
User-Agent to get it running):


OPTIONS rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp RTSP/1.0
CSeq: 1
User-Agent: BlackBerry9000/4.6.0.266 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/238

RTSP/1.0 200 OK
CSeq: 1
Date: Wed, 14 Jul 2010 05:06:29 GMT
Server: XenonStreamer/5.0.1.3573 ("Linux 2.6.18-128.el5PAE (i686)") 
Public: OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN
Supported: play.basic, con.persistent

DESCRIBE rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: BlackBerry9000/4.6.0.266 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/238

RTSP/1.0 200 OK
CSeq: 2
Date: Wed, 14 Jul 2010 05:06:30 GMT
Expires: Fri, 13 Aug 2010 05:06:30 GMT
Content-Type: application/sdp
Content-Base: rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp/
Content-Language: en-US
Supported: play.basic, con.persistent
Content-Length: 786
Server: XenonStreamer/5.0.1.3573 ("Linux 2.6.18-128.el5PAE (i686)") 

v=0
o=- 985824842 1279083989 IN IP4 10.135.20.82
s=TRT1_h264
c=IN IP4 0.0.0.0
t=0 0
a=control:rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp
a=range:npt=0.000000-
a=X-Disallowrandomaccess
a=random_access_denied
m=video 0 RTP/AVP 105
b=AS:34
b=TIAS:34000
b=RS:480
b=RR:640
a=maxprate:15.00
a=range:npt=0.000000-
a=rtpmap:105 H264/90000
a=control:trackID=11
a=fmtp:105 profile-level-id=42E00C;sprop-parameter-sets=Z0LgDJZUCg/I,aM4BrFCA;packetization-mode=1
a=framesize:105 320-240
a=cliprect:0,0,240,320
m=audio 0 RTP/AVP 110
b=AS:20
b=TIAS:20000
b=RS:480
b=RR:500
a=maxprate:36.00
a=range:npt=0.000000-
a=rtpmap:110 MP4A-LATM/24000/1
a=control:trackID=12
a=fmtp:110 profile-level-id=15;object=2;cpresent=0;config=400026103FC0;SBR-enabled=1
SETUP rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp/trackID=11 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;unicast;client_port=48742-48743;mode="PLAY"
User-Agent: BlackBerry9000/4.6.0.266 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/238

RTSP/1.0 200 OK
CSeq: 3
Cache-Control: must-revalidate
Date: Wed, 14 Jul 2010 05:06:30 GMT
Session: 985824842;timeout=50
Transport: RTP/AVP;unicast;client_port=48742-48743;server_port=34828-34829;source=10.135.20.82;destination=10.163.22.162;ssrc=dadfd607
Server: XenonStreamer/5.0.1.3573 ("Linux 2.6.18-128.el5PAE (i686)") 

SETUP rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp/trackID=12 RTSP/1.0
CSeq: 4
Transport: RTP/AVP;unicast;client_port=41546-41547;mode="PLAY"
Session: 985824842
User-Agent: BlackBerry9000/4.6.0.266 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/238

RTSP/1.0 200 OK
CSeq: 4
Cache-Control: must-revalidate
Date: Wed, 14 Jul 2010 05:06:30 GMT
Session: 985824842;timeout=50
Transport: RTP/AVP;unicast;client_port=41546-41547;server_port=34830-34831;source=10.135.20.82;destination=10.163.22.162;ssrc=dd78f640
Server: XenonStreamer/5.0.1.3573 ("Linux 2.6.18-128.el5PAE (i686)") 

PLAY rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp RTSP/1.0
CSeq: 5
Session: 985824842
Range: npt=0.000-
User-Agent: BlackBerry9000/4.6.0.266 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/238

RTSP/1.0 200 OK
CSeq: 5
Date: Wed, 14 Jul 2010 05:06:30 GMT
Session: 985824842;timeout=50
Server: XenonStreamer/5.0.1.3573 ("Linux 2.6.18-128.el5PAE (i686)") 
Range: npt=0.0000-
RTP-Info: url=rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp/trackID=11;seq=0;rtptime=0
 ,url=rtsp://10.135.20.82:554/live/free/83876346194768/TRT1_h264.3gp/trackID=12;seq=0;rtptime=0
RTCP-Interval: 1000



I saw in the changelog that in 2006 you added parsing the timeout
parameter of the Session header and the sessionTimeoutParameter()
function. However, openRTSP doesn't use it. Is this a bug or intended
behaviour?

I think that in chapter 12.37 of RfC 2326 sending RTSP requests as
keep-alive with the value of the timeout parameter is not optional. Is
this correct?



Best Regards,
Norbert Donath


PS: Are you interested in a patch that allows to set the User-Agent
header in openRTSP on the command line? In our experience in mobile
networks it's only possible to get a reasonable stream quality if the
User-Agent matches one of some known mobile types.



-- 
20 years - Keynote SIGOS GmbH -
1989 - 2009

Keynote SIGOS GmbH
 - TESTING IS OUR COMPETENCE -
Klingenhofstrasse 50d
D-90411 Nuernberg
Fon +49 911 95168-0
www.keynote-sigos.com

HRB 9323 Nuernberg
Gerichtsstand: Nuernberg
Geschaeftsfuehrer: Adil Kaya, Martin Loehlein, Umang Gupta, Andrew Hamer


More information about the live-devel mailing list