Skip to content

OBS 31.0.1: OBS quit unexpectedly when SRT server rejects connection or passphrase is wrong #11885

Open

Description

@sEqqq7

Operating System Info

Ubuntu 24.04

Other OS

No response

OBS Studio Version

31.0.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/sWC6pxgBq3N25m9d

OBS Studio Crash Log URL

No response

Expected Behavior

An older Linux version (30.0.2) attempts to reconnect based on retry time and maximum number of attempts (each 2s, 25 attempts). Windows version (31.0.1) also tries to reconnect and unexpected shutdown of OBS does not happen.

Current Behavior

When:

  • SRT server rejects the connection (f.e it is turned off) or server IP / port is not correct OBS shutdown unexpectedly (Check OBS studio log URL). [obs-ffmpeg mpegts muxer: 'adv_stream']: Failed to open the url or invalid stream
  • SRT server passhrase used in OBS doesn't match the one used on the SRT server side, OBS also closes unexpectedly. [obs-ffmpeg mpegts muxer / libsrt]: Connection rejected, Unknown or erroneous]

Steps to Reproduce

  1. Prepare SRT server and choose passphrase on server side
  2. Put ingest information in OBS Stream Tab [example: srt://hostname_ip:port?mode=caller&latency=1000000&passhrase=wrong&streamid=randomstreamid]
  3. OBS closes unexpectedly

Anything else we should know?

I checked it on several devices, I checked it on different versions of Ubuntu, different OBS settings (NVENC and x264), I even checked it on VM with Ubuntu 24.04.

Image

Image

Activity

  1. chaos-dotcom commented on Feb 23, 2025

    @chaos-dotcom

    I've had the same issue on macos too
    was working fine in OBS 27

  2. teodly commented on Apr 14, 2025

    @teodly

    Happens on Ubuntu 24.04, OBS from PPA

    error: [obs-ffmpeg mpegts muxer / libsrt]: Connection rejected, Unknown or erroneous
    error: [obs-ffmpeg mpegts muxer / libsrt]: Connection rejected, Unknown or erroneous
    error: [obs-ffmpeg mpegts muxer / libsrt]: Connection rejected, wrong password or invalid URL
    error: [obs-ffmpeg mpegts muxer / libsrt]: Connection to srt://x.x.x.x:x?latency=6000000 failed: No such process
    [Thread 0x7fff422e86c0 (LWP 46356) exited]
    [Thread 0x7fff44ff96c0 (LWP 46355) exited]
    error: [obs-ffmpeg mpegts muxer: 'adv_stream']: Failed to open the url or invalid stream
    [Thread 0x7fff59ffb6c0 (LWP 46354) exited]
    error: [obs-ffmpeg mpegts muxer: 'adv_stream']: Failed to open the url
    info: ==== Streaming Stop ================================================
    
    Thread 56 "obs" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7fff5affd6c0 (LWP 46353)]
    libsrt_close.isra.0 (h=<optimized out>) at /usr/src/obs-studio-31.0.3-0obsproject1~noble/plugins/obs-ffmpeg/obs-ffmpeg-srt.h:790
    warning: 790    /usr/src/obs-studio-31.0.3-0obsproject1~noble/plugins/obs-ffmpeg/obs-ffmpeg-srt.h: No such file or directory
    (gdb) bt
    #0  libsrt_close.isra.0 (h=<optimized out>) at /usr/src/obs-studio-31.0.3-0obsproject1~noble/plugins/obs-ffmpeg/obs-ffmpeg-srt.h:790
    #1  0x00007fff9808b3a8 in close_mpegts_url (is_rist=<optimized out>, stream=0x555558256740) at /usr/src/obs-studio-31.0.3-0obsproject1~noble/plugins/obs-ffmpeg/obs-ffmpeg-mpegts.c:512
    #2  ffmpeg_mpegts_data_free (stream=0x555558256740, data=0x555558256750) at /usr/src/obs-studio-31.0.3-0obsproject1~noble/plugins/obs-ffmpeg/obs-ffmpeg-mpegts.c:545
    #3  0x00007fff9807fac5 in start_thread (data=0x555558256740) at /usr/src/obs-studio-31.0.3-0obsproject1~noble/plugins/obs-ffmpeg/obs-ffmpeg-mpegts.c:956
    #4  0x00007ffff289caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
    #5  0x00007ffff2929c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
    

    Looks like use-after-free in libsrt_close

    (gdb) print s
    $1 = (SRTContext *) 0x7ff8c7f1b186
    (gdb) print s->streamid
    Cannot access memory at address 0x7ff8c7f1b23e
    (gdb) print *s
    Cannot access memory at address 0x7ff8c7f1b186
    
  3. pkviet commented on May 17, 2025

    @pkviet
    Member

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

  4. pkviet commented on Nov 11, 2025

    @pkviet
    Member

    @steve616 hello, it would be better to create your own issue because you have not ascertained whether your issue is the same as the OP or not. There could be indeed interference from branch (i assume it is the branch plugin, which i know nothing about). So please, delete this to avoid polluting the OP issue, open your own issue , post a crash log. It will show if the issue is on obs side or on branch side. This will ensure attention is brought to your issue. Thanks.

  5. steve616 commented on Nov 11, 2025

    @steve616
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions