node-rtsp-rtmp-server
node-rtsp-rtmp-server copied to clipboard
RTSP UDP can't be reproduced
Hello, I'm using this library: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java If I do a stream using TCP all is working fine but when I use UDP I can't reproduce stream using VLC or Ffplay. Server log starting stream UDP and open with VLC:
2018-01-26 19:40:49.815 attachRecordedDir: dir=file app=file
2018-01-26 19:40:49.833 [rtmp] server started on port 1935
2018-01-26 19:40:49.833 [rtsp/http/rtmpt] server started on port 80
2018-01-26 19:40:54.094 [rtsp/http/rtmpt:client=c1] connected
[rtsp/http: 1 clients]
c1: session=25577448 addr=192.168.178.23 port=57408 type=publish-udp
2018-01-26 19:40:54.156 [rtsp/http/rtmpt:client=c1] started uploading stream live/pedro
2018-01-26 19:41:00.562 [rtsp/http/rtmpt:client=c2] connected
2018-01-26 19:41:00.571 [rtsp/http/rtmpt:client=c2] start streaming over UDP
[rtsp/http: 2 clients]
c1: session=25577448 addr=192.168.178.23 port=57408 type=publish-udp
c2: session=61378379 addr=192.168.178.28 port=46290 type=udp isPlaying=true
2018-01-26 19:41:11.101 [rtsp/http/rtmpt:client=c3] connected
2018-01-26 19:41:11.101 [rtsp/http/rtmpt:client=c2] disconnected
[rtsp/http: 2 clients]
c1: session=25577448 addr=192.168.178.23 port=57408 type=publish-udp
c3: session=39588861 addr=192.168.178.28 port=46292
2018-01-26 19:41:11.106 [rtsp/http/rtmpt:client=c3] start streaming over TCP
[rtsp/http: 2 clients]
c1: session=25577448 addr=192.168.178.23 port=57408 type=publish-udp
c3: session=39588861 addr=192.168.178.28 port=46292 type=tcp isPlaying=true
2018-01-26 19:41:21.653 Socket error (c3): Error: read ECONNRESET
2018-01-26 19:41:21.654 [rtsp/http/rtmpt:client=c3] disconnected
[rtsp/http: 1 clients]
c1: session=25577448 addr=192.168.178.23 port=57408 type=publish-udp
Messages transferred between the client and server:
01-26 19:40:08.065 30772-32229/com.pedro.rtpstreamer I/RtspClient: OPTIONS rtsp://192.168.178.28:80/live/pedro RTSP/1.0
CSeq: 2
Content-Length: 0
01-26 19:40:08.080 30772-32229/com.pedro.rtpstreamer I/RtspClient: RTSP/1.0 200 OK
CSeq: 2
Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, ANNOUNCE, RECORD
01-26 19:40:08.080 30772-32229/com.pedro.rtpstreamer I/RtspClient: ANNOUNCE rtsp://192.168.178.28:80/live/pedro RTSP/1.0
CSeq: 3
Content-Length: 440
Content-Type: application/sdp
v=0
o=- 0 0 IN IP4 127.0.0.1
s=Unnamed
c=IN IP4 192.168.178.28
t=0 0
a=recvonly
m=audio 5000 RTP/AVP 96
a=rtpmap:96 mpeg4-generic/44100/2
a=fmtp:96 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1210; SizeLength=13; IndexLength=3; IndexDeltaLength=3;
a=control:trackID=0
m=video 5002 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;sprop-parameter-sets=Z0KAKNoB4AiflQ==,aM4NiA==;
a=control:trackID=1
01-26 19:40:08.099 30772-32229/com.pedro.rtpstreamer I/RtspClient: RTSP/1.0 200 OK
CSeq: 3
01-26 19:40:08.100 30772-32229/com.pedro.rtpstreamer I/RtspClient: SETUP rtsp://192.168.178.28:80/live/pedro/trackID=0 RTSP/1.0
Transport: RTP/AVP/UDP;unicast;client_port=5000-5001;mode=record
CSeq: 4
Content-Length: 0
01-26 19:40:08.113 30772-32229/com.pedro.rtpstreamer I/RtspClient: RTSP/1.0 200 OK
Date: Fri, 26 Jan 2018 18:40:54 UTC
Expires: Fri, 26 Jan 2018 18:40:54 UTC
Transport: RTP/AVP/UDP;unicast;client_port=5000-5001;server_port=5006-5007
Session: 25577448;timeout=60
CSeq: 4
Server: node-rtsp-rtmp-server
Cache-Control: no-cache
01-26 19:40:08.114 30772-32229/com.pedro.rtpstreamer I/RtspClient: SETUP rtsp://192.168.178.28:80/live/pedro/trackID=1 RTSP/1.0
Transport: RTP/AVP/UDP;unicast;client_port=5002-5003;mode=record
CSeq: 5
Content-Length: 0
Session: 25577448
01-26 19:40:08.124 30772-32229/com.pedro.rtpstreamer I/RtspClient: RTSP/1.0 200 OK
Date: Fri, 26 Jan 2018 18:40:54 UTC
Expires: Fri, 26 Jan 2018 18:40:54 UTC
Transport: RTP/AVP/UDP;unicast;client_port=5002-5003;server_port=5004-5005
Session: 25577448;timeout=60
CSeq: 5
Server: node-rtsp-rtmp-server
Cache-Control: no-cache
01-26 19:40:08.124 30772-32229/com.pedro.rtpstreamer I/RtspClient: RECORD rtsp://192.168.178.28:80/live/pedro RTSP/1.0
Range: npt=0.000-
CSeq: 6
Content-Length: 0
Session: 25577448
01-26 19:40:08.137 30772-32229/com.pedro.rtpstreamer I/RtspClient: RTSP/1.0 200 OK
Session: 25577448;timeout=60
CSeq: 6
Server: node-rtsp-rtmp-server
Cache-Control: no-cache
Video packets port destination:
//RTP
01-26 19:44:12.737 30772-32231/com.pedro.rtpstreamer I/RtpSocket: send packet, 1272 Size, 5004 Port
//RTCP is send to 5005 every 3 seconds
Audio packets port destination:
//RTP
01-26 19:44:12.725 30772-32230/com.pedro.rtpstreamer I/RtpSocket: send packet, 391 Size, 5006 Port
//RTCP is send to 5007 every 3 seconds
VLC log:
live555 error: no data received in 10s, aborting
This is with an UDP stream and a VLC connection try.
I noticed the same behavior, however i got i working with TCP.
@pedroSG94 and @jdonzallaz , were you using the dockerized deployment which seems to only map the two tcp ports or were you testing without Docker? I too can reproduce this issue with Docker. I have not attempted the non-Docker solution