WebRTSP / ReStreamer

Media URLs ReStreamer and Cloud DVR
GNU General Public License v3.0
30 stars 5 forks source link

Problem outside my network #41

Open more1982 opened 3 months ago

more1982 commented 3 months ago

Hello. I have a problem, when i'm using this app out of my network (in local it's working fine). So I opened port 5080, 5554 and 554 on my router, and app is working, but I can't see video, just spin. Maybe I must open some ports else? Can u help me plz? image

RSATom commented 3 months ago

If app is running behind NAT I'm afraid it's required to use some public TURN server.

RSATom commented 3 months ago

Other option is add forwarding for UDP port, but right now you'll have to forward almost all of them. Maybe it's possible to limit required UDP ports range - I'll check.

RSATom commented 3 months ago

it looks like it's possible https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119 ... I'll try to add support for this soon.

more1982 commented 3 months ago

it looks like it's possible https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119 ... I'll try to add support for this soon.

Thank you for your fast answer. Really need this app to run on VPS out of local network.

RSATom commented 3 months ago

VPS? I've thought you are trying to use behind home router... What exactly cloud provider are you trying to use? Is it Amazon EC2?

more1982 commented 3 months ago

VPS? I've thought you are trying to use behind home router... What exactly cloud provider are you trying to use? Is it Amazon EC2?

This will be in future:) Right now I'm using local network with mikrotik router. So Webrtsp server working fine inside local network. But not outside.

RSATom commented 3 months ago

Got it. I'll try to find solution. It's really can be useful... :+1:

more1982 commented 3 months ago

Got it. I'll try to find solution. It's really can be useful... 👍

I'm waitning your solution vary hard< my friend:)

RSATom commented 3 months ago

I just want to say with Amazon EC2 it can be simpler since it can use 1-to-1 NAT... But I didn't try it myself yet thought... It's another thing I shell try...

more1982 commented 3 months ago

If it will be usefull, i can give you some logs from my PC, when I'm trying to connect.

RSATom commented 3 months ago

Thanks, but I know the reason. So there is no need in your assistance right now.

RSATom commented 3 months ago

@more1982 I've pushed changes I hope will help you with your issue. You'll need to do following:

  1. [optional] sudo snap remove rtsp-to-webrtsp && sudo snap install rtsp-to-webrtsp --edge - to update config template to the latest version (or you can just put mentioned below section to your existing restreamer.conf)
  2. Uncomment min-rtp-port and rtp-ports-count (by removing # symbol at the beginning) and put there desired UDP(RTP) ports interval (more simulations clients you expecting - more wide interval there should be, something like rtp-ports-count > = max clients count)
  3. Uncomment stun-server
  4. Configure port forwarding for ports interval specified in 2. on your router
  5. restart app by sudo snap restart rtsp-to-webrtsp

I've tried above on Amazon EC2 instance - and it's working for me well. But in your case some issues are still possible...

RSATom commented 2 months ago

@more1982 any update?

more1982 commented 2 months ago

@more1982 any update?

No, It's still not working. Ihave a solution for my problem with media MTX. It is working for me. Thanks

RSATom commented 2 months ago

@more1982 so this issue can be closed, right?