[FFmpeg-trac] #7162(undetermined:new): rtsp socket timeout not working
FFmpeg
trac at avcodec.org
Wed Apr 25 06:19:41 EEST 2018
#7162: rtsp socket timeout not working
-------------------------------------+-------------------------------------
Reporter: sporn | Type: defect
Status: new | Priority: important
Component: | Version: git-
undetermined | master
Keywords: socket | Blocked By:
timeout windows | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Stream does not connect. In code I get an error -138 (socket timeout)
after about 20 seconds even though I have set the socket timeout to 60
seconds. It looks like ffmpeg isn't setting the windows socket timeout
correctly.
VLC connects and displays this feed correctly (it takes about 22 seconds
to start playing)
How to reproduce:
{{{
% ffplay rtsp://kcanda.onthewifi.com:554/onvif1 -stimeout 60000000
ffmpeg version windows 4.0
built on ... 2018-04-24
}}}
'''wireshark output from ffmpeg:'''
OPTIONS rtsp://kcanda.onthewifi.com:554/onvif1 RTSP/1.0
CSeq: 1
User-Agent: Lavf58.13.100
RTSP/1.0 200 OK
CSeq: 1
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER,
SET_PARAMETER,USER_CMD_SET
DESCRIBE rtsp://kcanda.onthewifi.com:554/onvif1 RTSP/1.0
Accept: application/sdp
CSeq: 2
User-Agent: Lavf58.13.100
RTSP/1.0 200 OK
CSeq: 2
Content-Type: application/sdp
Content-Length: 422
v=0
o=- 1421069297525233 1 IN IP4 192.168.1.101
s=H.264 Video, RtspServer_0.0.0.2
t=0 0
a=tool:RtspServer_0.0.0.2
a=type:broadcast
a=control:*
a=range:npt=0-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42001F;sprop-parameter-
sets=Z0IAH5WoFAFuQA==,aM48gA==
a=control:track1
m=audio 0 RTP/AVP 8
a=control:track2
a=rtpmap:8 PCMA/8000
SETUP rtsp://kcanda.onthewifi.com:554/onvif1/track1 RTSP/1.0
Transport: RTP/AVP/UDP;unicast;client_port=25128-25129
CSeq: 3
User-Agent: Lavf58.13.100
RTSP/1.0 200 OK
CSeq: 3
Transport:
RTP/AVP;unicast;destination=1.127.111.190;source=192.168.1.101;client_port=25128-25129;server_port=7020-7021
Session: 56d71937;timeout=60
SETUP rtsp://kcanda.onthewifi.com:554/onvif1/track2 RTSP/1.0
Transport: RTP/AVP/UDP;unicast;client_port=25130-25131
CSeq: 4
User-Agent: Lavf58.13.100
Session: 56d71937
RTSP/1.0 200 OK
CSeq: 4
Transport:
RTP/AVP;unicast;destination=1.127.111.190;source=192.168.1.101;client_port=25130-25131;server_port=7022-7023
Session: 56d71937;timeout=60
PLAY rtsp://kcanda.onthewifi.com:554/onvif1 RTSP/1.0
Range: npt=0.000-
CSeq: 5
User-Agent: Lavf58.13.100
Session: 56d71937
RTSP/1.0 200 OK
CSeq: 5
Range: npt=0.000-
Session: 56d71937
RTP-Info:
url=rtsp:192.168.1.101:554/onvif1/track1;seq=51639;rtptime=82392221790,url=rtsp:192.168.1.101:554/onvif1/track2;seq=8714;rtptime=7323798536
'''wireshark output from vlc:'''
OPTIONS rtsp://kcanda.onthewifi.com:554/onvif1 RTSP/1.0
CSeq: 2
User-Agent: LibVLC/3.0.2 (LIVE555 Streaming Media v2016.11.28)
RTSP/1.0 200 OK
CSeq: 2
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER,
SET_PARAMETER,USER_CMD_SET
DESCRIBE rtsp://kcanda.onthewifi.com:554/onvif1 RTSP/1.0
CSeq: 3
User-Agent: LibVLC/3.0.2 (LIVE555 Streaming Media v2016.11.28)
Accept: application/sdp
RTSP/1.0 200 OK
CSeq: 3
Content-Type: application/sdp
Content-Length: 422
v=0
o=- 1421069297525233 1 IN IP4 192.168.1.101
s=H.264 Video, RtspServer_0.0.0.2
t=0 0
a=tool:RtspServer_0.0.0.2
a=type:broadcast
a=control:*
a=range:npt=0-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=42001F;sprop-parameter-
sets=Z0IAH5WoFAFuQA==,aM48gA==
a=control:track1
m=audio 0 RTP/AVP 8
a=control:track2
a=rtpmap:8 PCMA/8000
SETUP rtsp://kcanda.onthewifi.com:554/onvif1/track1 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/3.0.2 (LIVE555 Streaming Media v2016.11.28)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
RTSP/1.0 200 OK
CSeq: 4
Transport:
RTP/AVP;unicast;destination=1.127.111.190;source=192.168.1.101;interleaved=0-1
Session: 42986c0;timeout=60
SETUP rtsp://kcanda.onthewifi.com:554/onvif1/track2 RTSP/1.0
CSeq: 5
User-Agent: LibVLC/3.0.2 (LIVE555 Streaming Media v2016.11.28)
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
Session: 42986c0
RTSP/1.0 200 OK
CSeq: 5
Transport:
RTP/AVP;unicast;destination=1.127.111.190;source=192.168.1.101;interleaved=2-3
Session: 42986c0;timeout=60
PLAY rtsp://kcanda.onthewifi.com:554/onvif1 RTSP/1.0
CSeq: 6
User-Agent: LibVLC/3.0.2 (LIVE555 Streaming Media v2016.11.28)
Session: 42986c0
Range: npt=0.000-
RTSP/1.0 200 OK
CSeq: 6
Range: npt=0.000-
Session: 42986c0
RTP-Info:
url=rtsp:192.168.1.101:554/onvif1/track1;seq=53167;rtptime=82402952130,url=rtsp:192.168.1.101:554/onvif1/track2;seq=11543;rtptime=7324704776
$..L..-...#.....................................................................................................................................................................................................................................................................................................................................$..L..-...%.....................................................................................................................................................................................................................................................................................................................................$..L..-...&H...............................
etc
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7162>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list