# RTSP issue: streaming plugin connects to remote server but doesn't receive any media

**URL:** <https://janus.discourse.group/t/rtsp-issue-streaming-plugin-connects-to-remote-server-but-doesnt-receive-any-media/547>\
**Category:** General\
**Created:** [September 5, 2023, 10:19am UTC](https://janus.discourse.group/t/rtsp-issue-streaming-plugin-connects-to-remote-server-but-doesnt-receive-any-media/547 "2023-09-05T10:19:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UMR1352](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/umr1352/32/162_2.png) [@UMR1352](https://janus.discourse.group/u/UMR1352)\
**Post date:** [September 5, 2023, 10:19am UTC](https://janus.discourse.group/t/rtsp-issue-streaming-plugin-connects-to-remote-server-but-doesnt-receive-any-media/547/1 "2023-09-05T10:19:36Z")

</div>

Hello, I’m trying to set up janus to broadcast some IP cameras, unfortunately I’m having some issues.  
From the logs i get:  
`[b1f1-CCTV1] 5s passed with no media, trying to reconnect the RTSP stream`  
and  
` No c-line or source for RTSP video address, resolving server address...`  
So, janus connects to the RTSP server but doesn’t receive anything back and thus a reconnection is triggered:

```auto
* Trying 211.132.61.124:554...
* Connected to 211.132.61.124 (211.132.61.124) port 554 (#0)
> DESCRIBE rtsp://211.132.61.124/axis-media/media.amp RTSP/1.0
CSeq: 1
Accept: application/sdp

< RTSP/1.0 200 OK
< CSeq: 1
< Content-Type: application/sdp
< Content-Base: rtsp://211.132.61.124/axis-media/media.amp/
< Server: GStreamer RTSP server
< Date: Tue, 05 Sep 2023 11:29:15 GMT
< Content-Length: 584
<
* Connection #0 to host 211.132.61.124 left intact
DESCRIBE answer:RTSP/1.0 200 OK
CSeq: 1
Content-Type: application/sdp
Content-Base: rtsp://211.132.61.124/axis-media/media.amp/
Server: GStreamer RTSP server
Date: Tue, 05 Sep 2023 11:29:15 GMT
Content-Length: 584

v=0
o=- 17005178830703211578 1 IN IP4 172.29.93.2
s=Session streamed with GStreamer
i=rtsp-server
t=0 0
a=tool:GStreamer
a=type:broadcast
a=range:npt=now-
a=control:rtsp://211.132.61.124/axis-media/media.amp
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:50000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d0029;sprop-parameter-sets=Z00AKeKQCgC3YC3AQEB4eJEV,aO48gA==
a=control:rtsp://211.132.61.124/axis-media/media.amp/stream=0
a=framerate:30.000000
a=transform:1.000000,0.000000,0.000000;0.000000,1.000000,0.000000;0.000000,0.000000,1.000000

* Found bundle for host 211.132.61.124: 0x5648dfadfa40 [serially]
* Re-using existing connection! (#0) with host 211.132.61.124
* Connected to 211.132.61.124 (211.132.61.124) port 554 (#0)
> SETUP rtsp://211.132.61.124/axis-media/media.amp/stream=0 RTSP/1.0
CSeq: 2
Transport: RTP/AVP/UDP;unicast;client_port=10002-10003

< RTSP/1.0 200 OK
< CSeq: 2
< Transport: RTP/AVP;unicast;client_port=10002-10003;server_port=50004-50005;ssrc=92E98CCF;mode="PLAY"
< Server: GStreamer RTSP server
< Session: WgCzHZ1bHHg23cTP; timeout=60
< Date: Tue, 05 Sep 2023 11:29:16 GMT
<
* Connection #0 to host 211.132.61.124 left intact
SETUP answer:RTSP/1.0 200 OK
CSeq: 2
Transport: RTP/AVP;unicast;client_port=10002-10003;server_port=50004-50005;ssrc=92E98CCF;mode="PLAY"
Server: GStreamer RTSP server
Session: WgCzHZ1bHHg23cTP; timeout=60
Date: Tue, 05 Sep 2023 11:29:16 GMT

  -- RTP port (video): 50004
  -- RTCP port (video): 50005
  -- SSRC (video): 2464779471
  -- RTSP session timeout (video): 60

```

and is successful. Then it sends a PLAY request:

```auto
RTSP video latching: 211.132.61.124:50004
  -- RTCP: 211.132.61.124:50005
Sending PLAY request...
* Found bundle for host 211.132.61.124: 0x5648dfadfa40 [serially]
* Re-using existing connection! (#0) with host 211.132.61.124
* Connected to 211.132.61.124 (211.132.61.124) port 554 (#0)
> PLAY rtsp://211.132.61.124/axis-media/media.amp RTSP/1.0
CSeq: 3
Session: WgCzHZ1bHHg23cTP
Range: npt=0.000-

< RTSP/1.0 200 OK
< CSeq: 3
< RTP-Info: url=rtsp://211.132.61.124/axis-media/media.amp/stream=0;seq=22599;rtptime=4176080931
< Range: npt=now-
< Server: GStreamer RTSP server
< Session: WgCzHZ1bHHg23cTP; timeout=60
< Date: Tue, 05 Sep 2023 11:29:16 GMT
<
* Connection #0 to host 211.132.61.124 left intact
PLAY answer:RTSP/1.0 200 OK
CSeq: 3
RTP-Info: url=rtsp://211.132.61.124/axis-media/media.amp/stream=0;seq=22599;rtptime=4176080931
Range: npt=now-
Server: GStreamer RTSP server
Session: WgCzHZ1bHHg23cTP; timeout=60
Date: Tue, 05 Sep 2023 11:29:16 GMT

```

Everithing looks ok but still no media after 5 secs. I thought it was a network issue but if i try opening the rtsp stream with VLC everything works just fine. Any suggestions?

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [September 5, 2023, 10:26am UTC](https://janus.discourse.group/t/rtsp-issue-streaming-plugin-connects-to-remote-server-but-doesnt-receive-any-media/547/2 "2023-09-05T10:26:39Z")

</div>

VLC is not representative, it can open a can of tuna too. Our RTSP stack is much more simple: we don’t support RTP over TCP for instance. It most definitely is a networking issue, so try looking with Wireshark or tcpdump if you see those RTP packets leaving, and if there are private addresses or firewalls involved.

---

<div class="post-metadata">

**Author:** ![UMR1352](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/umr1352/32/162_2.png) [@UMR1352](https://janus.discourse.group/u/UMR1352)\
**Post date:** [September 5, 2023, 12:41pm UTC](https://janus.discourse.group/t/rtsp-issue-streaming-plugin-connects-to-remote-server-but-doesnt-receive-any-media/547/3 "2023-09-05T12:41:50Z")

</div>

Yeah, it seems to be the case. Wireshark shows that VLC receives RTP data in TCP packets, that’s why it works. Looking at the RTSP responses I see:

```auto
* Connection #0 to host 211.132.61.124 left intact
SETUP answer:RTSP/1.0 200 OK
CSeq: 2
Transport: RTP/AVP;unicast;client_port=10020-10021;server_port=50004-50005;ssrc=9C30516D;mode="PLAY"
Server: GStreamer RTSP server
Session: JFOKvAB72Wp0mTKA; timeout=60
Date: Tue, 05 Sep 2023 14:06:22 GMT

  -- RTP port (video): 50004
  -- RTCP port (video): 50005
  -- SSRC (video): 2620412269
  -- RTSP session timeout (video): 60

```

The IP camera is sending RTP data from 50004/udp and I should receive them at 10020/udp right? I tried opening the entire 10000-20000 UDP range on my firewall but I still do not receive anything. Is there anything else I can try to make this work?
