iamscottxu / obs-rtspserver

RTSP server plugin for obs-studio

Home Page:https://obsproject.com/forum/resources/obs-rtspserver.1037/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no connection to rtsp other then from localhost.

XxTWMLxX opened this issue · comments

i cant connect over my network to the rtsp stream other then from localhost.

Tried:
with/without user auth (both work on localhost)
changing port
turning off windows firewall.
no AV installed (firewall).
fresh os on new test bench.
eliminated router went ethernet cable from pc to pc, and manually assigned ip addresses.

still rtsp stream only visible on localhost of obs pc.

OBS 27.2.3
RTSP-Server 2.2.1

doing a port forward and a port test online. shows:
Success: I can see your service on 123.456.789.0 on port (554)

so the server is running and is visible on the port. from outside localhost.

I might be having the same issue. It's hard to tell whether or not it's some fiddly firewall/router setting.

VLC Testing

On a Windows PC:

  1. I started the RTSP server in OBS
  2. In VLC, I opened successfully rtsp://<winpc ip address>:554/live
  3. I set Windows Firewall to allow port 554, TCP.

On a Linux PC:

  1. I opened the firewall with sudo ufw allow 554/tcp
  2. I tried the same URL in VLC, but the connection failed. Here is the error message:
Connection failed:
VLC could not connect to "192.168.1.8:554".
Your input can't be opened:
VLC is unable to open the MRL 'rtsp://192.168.1.8:554/live'. Check the log for details.

And the log message:

main error: connection failed: Network is unreachable
satip error: Failed to connect to RTSP server 192.168.1.8:554
main error: connection failed: Network is unreachable
access_realrtsp error: cannot connect to 192.168.1.8:554

The "network is unreachable" part makes me think that it is one of two firewalls or a router, and that we could use a tutorial on which ports to enable where.

Port testing

Next, I tested whether it was the hostnames or something else.

Windows PC:

  1. I started Wireshark and observed incoming on the LAN connection with a 'port 554' filter.

Linux PC:

  1. I opened a telnet session
    telnet 192.168.1.8 554
    
  2. I typed some garbage and hit "enter"

Windows PC:

  1. The telnet message was received and a TCP ack was sent.

From this, it looks to me like ports are open and something else is going on.

I opened port 80 on the server. And this worked:

mpv --no-cache rtsp://192.168.1.8:554/live --rtsp-transport=tcp

But VLC still doesn't. It fails with:

Connection failed:
VLC could not connect to "170.37.168.178:554".
Your input can't be opened:
VLC is unable to open the MRL 'rtsp://170.37.168.178:554/live'. Check the log for details.
Connection failed:
VLC could not connect to "170.39.168.178:554".

And the log message:

satip error: read error: Resource temporarily unavailable
satip error: Failed to setup RTSP session```

Wireshark says that VLC sent this message:

Real Time Streaming Protocol
    Request: SETUP rtsp://192.168.1.8:554/live RTSP/1.0\r\n
    CSeq: 0\r\n
    Transport: RTP/AVP;unicast;client_port=9002-9003
    \r\n

And an RTSP reply was never received.

It also worked with a computer vision library I'm playing with. So there's something about VLC?

commented

turn off multicast

That solved it for me for both vlc and ffmpeg accessing the rtsp stream from other devices