obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

OBS ignoring SRT return codes. Getting stuck in 'Connecting....' state.

Open OverlayFox opened this issue 11 months ago • 1 comments

Operating System Info

Ubuntu 24.04

Other OS

No response

OBS Studio Version

31.0.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/s1jlQq5MpdMAwQsS

OBS Studio Crash Log URL

No response

Expected Behavior

OBS should stop trying to push to the SRT-Server if it receives one of the SRT rejection codes or if the server goes offline.

It should also display a message to the user why the connection failed, similar to the way how it handles RTMP rejection cases.

Current Behavior

OBS keeps trying to push to the SRT-Server, no matter what SRT response code is send to OBS.

Even if the SRT-Server goes offline OBS keeps trying to push indefinitely and has to be killed and relaunched to return to a functional state.

Steps to Reproduce

  1. Setup an SRT Server to push a stream to, that only accepts a specific StreamID or requires encryption.
  2. In OBS, select 'Custom...' under Settings -> Stream -> Service
  3. Input the SRT-URL into Settings -> Stream -> Server. (Make sure the SRT-URL will raise a REJECT response from the SRT-Server. For example by putting in a StreamID that isn't allowed by the server or sending a unencrypted stream when a encrypted one is mandatory)
  4. Click 'Apply'
  5. Click 'Start Streaming' ...

Anything else we should know?

In the log output it is visible that the libsrt package is recognizing the rejection code given by the SRT-Server:

17:53:08.226: [obs-ffmpeg mpegts muxer / libsrt]: Connection rejected, Rogue peer or incorrect parameters 17:53:08.226: [obs-ffmpeg mpegts muxer / libsrt]: Connection to srt://127.0.0.1:7120?redacted_parameters failed: Input/output error

OBS just seems to not do anything with the return code and keeps trying to push to the SRT-Server.

When trying to push a stream to the server via FFMPEG with the same SRT-URL as given to OBS, it properly stops trying to stream to the SRT-Server if the Server returns a valid REJECT reason.

At 17:53:21.496 I closed down the SRT-Server which was recognized by OBS, but it still tried to push to the SRT-Server.

OverlayFox avatar Jan 13 '25 17:01 OverlayFox

The crashes should be fixed hopefully; at least they are for me. Testers welcome.

pkviet avatar May 17 '25 02:05 pkviet