bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
11.69k stars 1.47k forks source link

problem with Parrot Streaming Server #413

Closed Mancio98 closed 3 years ago

Mancio98 commented 3 years ago

Which version are you using?

v0.16.0

Which operating system are you using?

OS

Architecture

Describe the issue

i have a rtsp url generated by my parrot simulated drone (ANAFI) inside a vlan at url rtsp://10.202.0.1/live. i would like to make it accessible by local network from my device ip (192.168.x.x) . i attached the debug logger here:

2021/06/04 16:00:10 I [0/0] rtsp-simple-server v0.16.0 2021/06/04 16:00:10 I [0/0] [path mypath] [rtsp source] started 2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] connecting 2021/06/04 16:00:10 I [0/0] [RTSP] UDP/RTP listener opened on :8000 2021/06/04 16:00:10 I [0/0] [RTSP] UDP/RTCP listener opened on :8001 2021/06/04 16:00:10 I [0/0] [RTSP] TCP listener opened on :8554 2021/06/04 16:00:10 I [0/0] [RTMP] listener opened on :1935 2021/06/04 16:00:10 I [0/0] [HLS] listener opened on :8888 2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] c->s OPTIONS rtsp://10.202.0.1/live RTSP/1.0 CSeq: 1 User-Agent: gortsplib

2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] s->c RTSP/1.0 200 OK CSeq: 1 Content-Length: 0 Date: Thu, 1 Jan 1970 00:00:12 GMT Public: DESCRIBE,SETUP,PLAY,PAUSE,TEARDOWN,GET_PARAMETER Server: Parrot Streaming Server

2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] c->s DESCRIBE rtsp://10.202.0.1/live RTSP/1.0 Accept: application/sdp CSeq: 2 User-Agent: gortsplib

2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] s->c RTSP/1.0 200 OK CSeq: 2 Content-Base: rtsp://10.202.0.1/live Content-Length: 463 Content-Type: application/sdp Date: Thu, 1 Jan 1970 00:00:12 GMT Server: Parrot Streaming Server

v=0 o=- 11111459716808528999 1 IN IP4 10.202.0.1 s=live i=ANAFI-0000000 c=IN IP4 0.0.0.0 t=0 0 a=tool:1.7.7 a=recvonly a=type:broadcast a=control:* a=X-com-parrot-maker:Parrot a=X-com-parrot-model:Anafi a=X-com-parrot-model-id:0914 a=X-com-parrot-serial:000000000000000000 a=X-com-parrot-build-id:anafi-pc-1.7.7 a=X-com-parrot-boot-id:9927A2D2C6645CB2B624203050FB3FB1 m=video 0 RTP/AVP 96 i=DefaultVideo a=control:front a=rtpmap:96 H264/90000

2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] c->s SETUP rtsp://10.202.0.1/live/front RTSP/1.0 CSeq: 3 Transport: RTP/AVP;unicast;client_port=14186-14187;mode=play User-Agent: gortsplib

2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] s->c RTSP/1.0 200 OK CSeq: 3 Content-Length: 0 Date: Thu, 1 Jan 1970 00:00:12 GMT Server: Parrot Streaming Server Session: fc0c64fb3e024c23;timeout=10 Transport: RTP/AVP/UDP;unicast;client_port=14186-14187;server_port=5004-5005;ssrc=663C817A;mode=PLAY

2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] c->s PLAY rtsp://10.202.0.1/live RTSP/1.0 CSeq: 4 Session: fc0c64fb3e024c23 User-Agent: gortsplib

2021/06/04 16:00:10 D [0/0] [path mypath] [rtsp source] s->c RTSP/1.0 501 Not Implemented CSeq: 4 Content-Length: 0 Date: Thu, 1 Jan 1970 00:00:12 GMT Server: Parrot Streaming Server

2021/06/04 16:00:10 I [0/0] [path mypath] [rtsp source] ERR: wrong status code: 501 (Not Implemented) 2021/06/04 16:00:15 D [0/0] [path mypath] [rtsp source] connecting 2021/06/04 16:00:15 D [0/0] [path mypath] [rtsp source] c->s OPTIONS rtsp://10.202.0.1/live RTSP/1.0

Describe how to replicate the issue

i hope you can resolve it without installing these. but if you want here: sphinx parrot https://developer.parrot.com/docs/sphinx/system-requirements.html olympe parrot https://developer.parrot.com/docs/olympe/

  1. start the server with this configuration: paths: mypath: source: rtsp://10.202.0.1/live sourceProtocol: automatic

  2. publish with nothing cause is an already existing url

  3. read with vlc rtsp://192.168.x.x/mypath

you can use my files to test it https://github.com/Mancio98/parrot-test.git.

it's quiet easy just use parrot shell and run command: python testing.py, with launchswarm.sh inside same folder.

Did you attach a network dump?

no

dorinclisu commented 3 years ago

This looks like a problem with the Parrot Streaming Server, as the 501 code suggests.

What happens when trying to use vlc directly i.e. vlc rtsp://10.202.0.1/live? This is the first thing to do before considering anything else.

Mancio98 commented 3 years ago

Thanks for replay. With vlc works perfectly

dorinclisu commented 3 years ago

This is strange. Try with sourceProtocol: tcp. The automatic option has been an endless source of trouble for me.

aler9 commented 3 years ago

Hello, thanks for reporting the issue, after some testing i discovered that Parrot Streaming Server needs a Range header in every PLAY request:

PLAY rtsp://10.202.0.1/live RTSP/1.0
CSeq: 4
Session: fc0c64fb3e024c23
User-Agent: gortsplib
Range: ntp=0-

The Range header was not set by rtsp-simple-server. Now the problem is solved.

aler9 commented 3 years ago

added in v0.16.3

Mancio98 commented 3 years ago

thank you very much. I will try it soon.

Mancio98 commented 3 years ago

Hi @aler9 I try the v.0.16.3 but when I try to play it with vlc doesn't work, I set the .yml file as:

all: mylive: source: risp://10.202.0.1/live and at url: rtsp://192.168.x.x:8554/mylive i try to connect but after 10sec the server close the connection.

github-actions[bot] commented 1 year ago

This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.