datarhei / restreamer

The Restreamer is a complete streaming server solution for self-hosting. It has a visually appealing user interface and no ongoing license costs. Upload your live stream to YouTube, Twitch, Facebook, Vimeo, or other streaming solutions like Wowza. Receive video data from OBS and publish it with the RTMP and SRT server.
https://docs.datarhei.com/restreamer/
Apache License 2.0
3.84k stars 441 forks source link

OBS RTMP Stream start: Connection to server failed #647

Open AgataAah opened 10 months ago

AgataAah commented 10 months ago

Subject of the issue No matter how much troubleshooting I did the last days unfortunately I get the error after copying the RTMP address into OBS deleting the token saving and trying to start the stream so I can process further on the Restreamer site won't work. I tried disableing the antivirus (Win Defender is disabled at all), I changed the Restreamer domain to the 127.0.0.1 also for the test, I opened all needed ports, everything runs as an admin, but nothing won't help. I asked my streamer colleague who also uses Restreamer, but his workaround also didn't help.

Your environment OBS, Win 10, Wired and WiFi Connection enabled - the pull via Docker Desktop worked fine

Files Added Process-Report and Docker Desktop Log, Screenshot of German Error image DockerDesktopLog.txt report.txt

Steps to reproduce Accessing the Admin UI via http://127.0.0.1:8080 - retrieving RTMP address. Copying to OBS in the settings in user defined RTMP settings, deleting Token. Starting stream, then the error pops up

Expected behavior Stream starts and I can continue to configurate the rest for the Restream on the Admin panel

Actual behavior Connection to server failed and I can't proceed

ioppermann commented 10 months ago

Hi @AgataAah

I tested the setup with OBS 30 (MacOS) and datarhei/restreamer:latest. TL;DR it works.

These are the steps:

  1. Starting datarhei/restreamer:latest with docker run. The ports 8080 (for the UI) and 1935 (for RTMP) need to be exposed.
  2. Enabling the RTMP server. These are the settings I used: image
  3. Restarting Restreamer in order to start the RTMP server. In your DockerDesktopLog.txt I see, that you successfully activated the RTMP server.
  4. In the Video Setup select "RTMP server". It gives you an URL similar to rtmp://123.123.66.43/8e2be910-294e-43e6-93cc-f52ba92ec3ec.stream?token=foobar.
  5. This you copy-paste into OBS in the custom stream settings. Leave the Stream Key field empty.
  6. Now the important step. Adjust the IP address of the RTMP URL. Change it to 127.0.0.1 if OBS and Restreamer are on the same machine. If Restreamer is running on a different machine in your local network, change it to that IP address. image
  7. In the OBS output settings change the encoder to x264. image
  8. Start streaming
AgataAah commented 10 months ago

Hello @ioppermann

Thank you lots for your support.

I reproduced all the steps, now it works! Thank you!

Short question for that: was it the token? Is it mandatory in Restreamer? It's basically the only thing I changed, before I left the field empty

ioppermann commented 9 months ago

The token is highly recommended because it protects the RTMP server. Only if you know the correct token, you will be able to send a stream to the RTMP server. It is like a stream key, but with another name.

If you don't define a token and your Restreamer is accessible by a public IP address, then anyone could send a stream to your RTMP server.

Nasseh123 commented 7 months ago

Hello, I keep on getting from obs. ### Could not access the specified channel or stream key, please double-check your stream key. If it is correct, there may be a problem connecting to the server. What could i be missing? I have hosted Restreamer on ubuntu cloud and am using nginx for the proxy.So my challenge is that when trying to stream from obs through RTMP its giving me that error