revmischa / rtsp-server

Lightweight RTSP/RTP streaming media server
https://metacpan.org/release/RTSP-Server
427 stars 112 forks source link

Failed to find client RTP start port in SETUP request (web-rtc client) #33

Open JosephMatan83 opened 4 years ago

JosephMatan83 commented 4 years ago

Hi,

I know there is already an open issue regarding this message. However, my client is a web-rtc, so maybe something is different here. First, I must say that when I'm using a different rtsp-server then the web-rtc plays the stream fine.

This is my setup:

  1. The rtsp-server is up.

  2. I'm streaming video from my camera with FFmpeg: ffmpeg -f v4l2 -r 30 -video_size 640x480 -i /dev/video0 -vcodec libx264 -f rtsp rtsp://172.30.110.100:5545/test

  3. I'm playing the video with ffplay and it plays ok: ffplay -i rtsp://172.30.110.100:554/test

  4. However, when I request the web-rtc to run the video with this url rtsp://172.30.110.100:554/test I'm getting this log messages: Failed to find client RTP start port in SETUP request Failed to find client RTP start port in SETUP request Failed to find client RTP start port in SETUP request ...

Here is the log:

Starting RTSP server, log level = 5
Source server started
Client server started
Source connection from 172.30.110.2:59712
Source listener: >> OPTIONS rtsp://172.30.110.100:5545/video_stream RTSP/1.0
Got method OPTIONS
Source listener: >> CSeq: 1
Source listener: >> User-Agent: Lavf58.30.100
Source listener: >>
End of headers
 << RTSP/1.0 200 OK
 << Public: OPTIONS, DESCRIBE, TEARDOWN, SETUP, ANNOUNCE, RECORD
 << CSeq: 1
 << Session: 1
Source listener: >> ANNOUNCE rtsp://172.30.110.100:5545/video_stream RTSP/1.0
Got method ANNOUNCE
Source listener: >> Content-Type: application/sdp
Source listener: >> CSeq: 2
Source listener: >> User-Agent: Lavf58.30.100
Source listener: >> Session: 1
Source listener: >> Content-Length: 214
Source listener: >>
End of headers
Finished reading body, length=214
Got source announcement for rtsp://172.30.110.100:5545/video_stream
Mounted /video_stream
 << RTSP/1.0 200 OK
 << CSeq: 2
 << Session: 1
Source listener: >> SETUP rtsp://172.30.110.100:5545/video_stream/streamid=0 RTSP/1.0
Got method SETUP
Source listener: >> Transport: RTP/AVP/UDP;unicast;client_port=17302-17303;mode=record
Source listener: >> CSeq: 3
Source listener: >> User-Agent: Lavf58.30.100
Source listener: >> Session: 1
Source listener: >>
End of headers
Got SETUP request for stream 0
Creating new stream 0
 << RTSP/1.0 200 OK
 << Transport: RTP/AVP/UDP;unicast;client_port=17302-17303;mode=record;server_port=20000-20001
 << CSeq: 3
 << Session: 1
Source listener: >> RECORD rtsp://172.30.110.100:5545/video_stream RTSP/1.0
Got method RECORD
Source listener: >> Range: npt=0.000-
Source listener: >> CSeq: 4
Source listener: >> User-Agent: Lavf58.30.100
Source listener: >> Session: 1
Source listener: >>
End of headers
Got record for mountpoint /video_stream
Starting RTP listeners
 |-- stream 0
 |---- port 20000
 |---- port 20001
 << RTSP/1.0 200 OK
 << CSeq: 4
 << Session: 1
Client connection from 192.168.10.11:60690
Client listener: >> DESCRIBE rtsp://192.168.10.11:554/video_stream RTSP/1.0
Got method DESCRIBE
Client listener: >> CSeq: 2
Client listener: >> User-Agent: LIVE555 Streaming Media v2019.11.22
Client listener: >> Accept: application/sdp
Client listener: >>
End of headers
 << RTSP/1.0 200 OK
 << Content-Type: application/sdp
 << Content-Length: 214
 << CSeq: 2
 << Session: 2
Client listener: >> SETUP rtsp://192.168.10.11:554/video_stream/streamid=0 RTSP/1.0
Got method SETUP
Client listener: >> CSeq: 3
Client listener: >> User-Agent: LIVE555 Streaming Media v2019.11.22
Client listener: >> Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Client listener: >>
End of headers
SETUP stream id 0
Failed to find client RTP start port in SETUP request
 << RTSP/1.0 400 Bad Request
 << CSeq: 3
 << Session: 2
Returning error 400: Bad Request
Got EOF on listener
Client connection from 192.168.10.11:60716
Client listener: >> DESCRIBE rtsp://192.168.10.11:554/video_stream RTSP/1.0
Got method DESCRIBE
Client listener: >> CSeq: 2
Client listener: >> User-Agent: LIVE555 Streaming Media v2019.11.22
Client listener: >> Accept: application/sdp
Client listener: >>
End of headers
 << RTSP/1.0 200 OK
 << Content-Type: application/sdp
 << Content-Length: 214
 << CSeq: 2
 << Session: 3
Client listener: >> SETUP rtsp://192.168.10.11:554/video_stream/streamid=0 RTSP/1.0
Got method SETUP
Client listener: >> CSeq: 3
Client listener: >> User-Agent: LIVE555 Streaming Media v2019.11.22
Client listener: >> Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Client listener: >>
End of headers
SETUP stream id 0
Failed to find client RTP start port in SETUP request
 << RTSP/1.0 400 Bad Request
 << CSeq: 3
 << Session: 3
Returning error 400: Bad Request
Got EOF on listener
Client connection from 192.168.10.11:60718
Client listener: >> DESCRIBE rtsp://192.168.10.11:554/video_stream RTSP/1.0
Got method DESCRIBE
Client listener: >> CSeq: 2
Client listener: >> User-Agent: LIVE555 Streaming Media v2019.11.22
Client listener: >> Accept: application/sdp
Client listener: >>
End of headers
 << RTSP/1.0 200 OK
 << Content-Type: application/sdp
 << Content-Length: 214
 << CSeq: 2
 << Session: 4
Client listener: >> SETUP rtsp://192.168.10.11:554/video_stream/streamid=0 RTSP/1.0
Got method SETUP
Client listener: >> CSeq: 3
Client listener: >> User-Agent: LIVE555 Streaming Media v2019.11.22
Client listener: >> Transport: RTP/AVP/TCP;unicast;interleaved=0-1
Client listener: >>
End of headers
SETUP stream id 0
Failed to find client RTP start port in SETUP request
 << RTSP/1.0 400 Bad Request
 << RTSP/1.0 400 Bad Request
 << CSeq: 3
 << Session: 4
Returning error 400: Bad Request
Got EOF on listener

Any ideas ? Thanks

dndprude commented 4 years ago

I am also experiencing this with ffmpeg -> rtsp-server -> mpromonet/webrtc-streamer