Page 1 of 1
RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 29 Jan 2013 10:46
by dario-
Hi everyone,
after upgrading to VLC 2.0.5 from 2.0.3 i've ecountered the following issue (im running vlc 32 bit on windows7 64bit):
-I connect to an IP camera using a RTSP stream
-after 60 seconds the input stream is closed by the server for inactivity.
Inspecting RTSP traffic reveals that the server is expecting a GET_PARAMETER requests to keep the stream alive but VLC doesent send it. This is the OPTIONS response from the server:
- Rtsp: RESPONSE, RTSP/1.0, Status Code = 200 - OK
- Response: Status of response : Ok
ProtocolVersion: RTSP/1.0
StatusCode: 200, Ok
Reason: OK
Server: HiIpcam/V100R003 VodServer/1.0.0
Cseq: 2
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, GET_PARAMETER
HeaderEnd: CRLF
So it seems the server correctly advertises the GET_PARAMETER but somehow vlc won't send it. Inspecting traffic on vlc 2.0.3 reveals those periodic GET_PARAMETER are sent every 60sec, and the stream continues playing fine.
I'm missing something (i haven't a deep RTSP knowledge) or something has changed between 2.0.3 and 2.0.5?
Thanks in advance.
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 29 Jan 2013 20:00
by Rémi Denis-Courmont
VLC has not changed w.r.t. to RTSP, but the live555 library has.
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 30 Jan 2013 11:08
by dario-
Thank you.
Where i can find information about what live555 version are used by vlc on each release? So i can check their changelogs to find more about this..
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 07 Feb 2013 14:53
by Sébastien Escudier
will be fixed in 2.0.6
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 13 Apr 2013 01:23
by mykillk
I'm still getting this issue of a reliable 60-second disconnect in 2.0.6. Also having the same problem with the nightly 2.0.7 build.
EDIT: Went back to 2.0.3 and the streams are solid
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 15 Apr 2013 15:27
by Sébastien Escudier
Works fine here, this must be a different issue than the one I fixed.
Can you give more details ? For example the complete RTSP dialogue from the begining to the 1 minute shutdown ?
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 16 Apr 2013 20:40
by mykillk
Yes, I will try. But I've never done that before so it may take me some time to figure out how to grab that output.
EDIT: Ok, figured it out:
==== Version 2.0.3 ====
== RTSP Stream 1 ==
OPTIONS XXXX RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
RTSP/1.0 200 OK
CSeq: 2
Date: Tue, 16 Apr 2013 12:15:16 GMT
Public: OPTIONS, DESCRIBE, PLAY, SETUP, TEARDOWN
DESCRIBE XXXX RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 3
Date: Tue, 16 Apr 2013 12:15:16 GMT
Content-Base: XXXX
Content-Type: application/sdp
Content-Length: 343
v=0
o=RTSP 1366114516 541 IN IP4 0.0.0.0
s=RTSP server
c=IN IP4 0.0.0.0
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 96
b=AS:0
a=rtpmap:96 MP4V-ES/30000
a=control:trackID=1
a=fmtp:96 profile-level-id=3;config=000001B003000001B509000001000000012000C488800F51904381463F;decode_buf=76800
SETUP XXXX RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
RTSP/1.0 200 OK
CSeq: 4
Date: Tue, 16 Apr 2013 12:15:17 GMT
Session: 8670118;timeout=80
Transport: RTP/AVP/TCP;interleaved=0-1;unicast;mode=play
PLAY XXXX RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
Session: 8670118
Range: npt=0.000-
RTSP/1.0 200 OK
CSeq: 5
Date: Tue, 16 Apr 2013 12:15:17 GMT
Session: 8670118;timeout=80
RTP-Info: url=XXXX/trackID=1;seq=0;rtptime=0
Range: npt=0-
RTCP-Interval: 250
== RTSP Stream 2 ==
OPTIONS XXXX RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
RTSP/1.0 200 OK
CSeq: 2
Date: Tue, 16 Apr 2013 12:15:16 GMT
Public: OPTIONS, DESCRIBE, PLAY, SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN
DESCRIBE XXXX RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 3
Date: Tue, 16 Apr 2013 12:15:16 GMT
Content-Base: XXXX
Content-Type: application/sdp
Content-Length: 328
v=0
o=RTSP 1366114516 957 IN IP4 0.0.0.0
s=RTSP server
c=IN IP4 0.0.0.0
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 98
b=AS:0
a=rtpmap:98 H264/90000
a=control:trackID=1
a=fmtp:98 packetization-mode=1; profile-level-id=4d001f; sprop-parameter-sets=Z00AH9oDQMZA,aO48gA==
SETUP XXXX RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
RTSP/1.0 200 OK
CSeq: 4
Date: Tue, 16 Apr 2013 12:15:17 GMT
Session: 32771057;timeout=80
Transport: RTP/AVP/TCP;interleaved=0-1;unicast;mode=play
PLAY XXXX RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.0.3 (LIVE555 Streaming Media v2011.12.23)
Session: 32771057
Range: npt=0.000-
RTSP/1.0 200 OK
CSeq: 5
Date: Tue, 16 Apr 2013 12:15:17 GMT
Session: 32771057;timeout=80
RTP-Info: url=XXXX/trackID=1;seq=0;rtptime=0
Range: npt=0-
RTCP-Interval: 250
==== Version 2.0.6 ====
== RTSP Stream 1 (This is the one that cuts out after 60 seconds) ==
OPTIONS XXXX RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
RTSP/1.0 200 OK
CSeq: 2
Date: Tue, 16 Apr 2013 12:33:19 GMT
Public: OPTIONS, DESCRIBE, PLAY, SETUP, TEARDOWN
DESCRIBE XXXX RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 3
Date: Tue, 16 Apr 2013 12:33:19 GMT
Content-Base: XXXX
Content-Type: application/sdp
Content-Length: 343
v=0
o=RTSP 1366115599 228 IN IP4 0.0.0.0
s=RTSP server
c=IN IP4 0.0.0.0
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 96
b=AS:0
a=rtpmap:96 MP4V-ES/30000
a=control:trackID=1
a=fmtp:96 profile-level-id=3;config=000001B003000001B509000001000000012000C488800F51904381463F;decode_buf=76800
SETUP XXXX/trackID=1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
Transport: RTP/AVP;unicast;client_port=65372-65373
RTSP/1.0 200 OK
CSeq: 4
Date: Tue, 16 Apr 2013 12:33:19 GMT
Session: 8778351;timeout=80
Transport: RTP/AVP;unicast;client_port=65372-65373;server_port=5556-5557
PLAY XXXX RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
Session: 8778351
Range: npt=0.000-
RTSP/1.0 200 OK
CSeq: 5
Date: Tue, 16 Apr 2013 12:33:19 GMT
Session: 8778351;timeout=80
RTP-Info: url=XXXX/trackID=1;seq=0;rtptime=0
Range: npt=0-
RTCP-Interval: 250
== RTSP Stream 2 (This one works fine on this version as well) ==
OPTIONS XXXX RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
RTSP/1.0 200 OK
CSeq: 2
Date: Tue, 16 Apr 2013 12:33:19 GMT
Public: OPTIONS, DESCRIBE, PLAY, SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN
DESCRIBE XXXX RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 3
Date: Tue, 16 Apr 2013 12:33:19 GMT
Content-Base: XXXX
Content-Type: application/sdp
Content-Length: 328
v=0
o=RTSP 1366115599 650 IN IP4 0.0.0.0
s=RTSP server
c=IN IP4 0.0.0.0
t=0 0
a=charset:Shift_JIS
a=range:npt=0-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 98
b=AS:0
a=rtpmap:98 H264/90000
a=control:trackID=1
a=fmtp:98 packetization-mode=1; profile-level-id=4d001f; sprop-parameter-sets=Z00AH9oDQMZA,aO48gA==
SETUP XXXX/trackID=1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
Transport: RTP/AVP;unicast;client_port=65370-65371
RTSP/1.0 200 OK
CSeq: 4
Date: Tue, 16 Apr 2013 12:33:19 GMT
Session: 32879294;timeout=80
Transport: RTP/AVP;unicast;client_port=65370-65371;server_port=5556-5557
PLAY XXXX RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
Session: 32879294
Range: npt=0.000-
RTSP/1.0 200 OK
CSeq: 5
Date: Tue, 16 Apr 2013 12:33:20 GMT
Session: 32879294;timeout=80
RTP-Info: url=XXXX/trackID=1;seq=0;rtptime=0
Range: npt=0-
RTCP-Interval: 250
GET_PARAMETER XXXX RTSP/1.0
CSeq: 6
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
Session: 32879294
RTSP/1.0 200 OK
CSeq: 6
Date: Tue, 16 Apr 2013 12:33:20 GMT
Session: 32879294;timeout=80
GET_PARAMETER XXXX RTSP/1.0
CSeq: 7
User-Agent: LibVLC/2.0.6 (LIVE555 Streaming Media v2012.12.18)
Session: 32879294
RTSP/1.0 200 OK
CSeq: 7
Date: Tue, 16 Apr 2013 12:34:38 GMT
Session: 32879294;timeout=80
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 16 Apr 2013 21:43
by mykillk
Two things I noticed right away: Stream 1 (the one that isn't working in 2.0.6), does not support GET_PARAMETER, whereas Stream 2 (works in both versions) does support it. Also, the RTSP stream is getting sent over TCP in 2.0.3, but UDP in 2.0.6.
I hope this helps. I am also willing to provide you the connection info in a private message if you want to check out the RTSP streams yourself.
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 17 Apr 2013 20:14
by Sébastien Escudier
The choice between UDP and TCP is an option in VLC.
Please check you have the same settings in both versions :
tools -> preferences -> check show all settings -> input codecs -> demuxers -> rtp/rtsp -> use RTP over RTSP (TCP).
Or if you use command line the option is --rtsp-tcp
Now please test the stream wich cuts after 60 seconds with and without TCP enabled, in both versions, and tell me the result.
Re: RTSP input stream timeout and GET_PARAMETER keepalive
Posted: 23 Apr 2013 03:44
by mykillk
Using --rtsp-tcp on the latest nightly build of 2.1.0 is working properly for both streams.
Perhaps RTSP over TCP should be the default?
Thanks for your assistance.