I ended up spending a few more hours debugging OBS last night, and this is what I came up with. The previous bugfix fixed a pathological bug that broke audio persistently, but this fixes the underlying problem that allows that to happen at all.https://github.com/obsproject/obs-studio/pull/3863 …
-
Show this thread
-
More info in the PR description, but on a more personal side: when I first ran into this, and reported it upstream months ago, the OBS devs said "Max audio buffering reached!" was the problem. That warning was treated as some kind of catastrophic, restart-OBS-to-fix-it issue.
1 reply 0 retweets 13 likesShow this thread -
It seemed it was just accepted that buggy or misbehaving audio sources could cause that situation, and when they did, all of OBS's audio processing was expected to stop working properly, and you had to restart the whole app.
1 reply 0 retweets 9 likesShow this thread -
This always rubbed me the wrong way. First, because I *knew* from logs that I had gotten that error *hours* before the stream actually fell over. Second, because something is clearly wrong if a buffer never shrinks, can only grow, and once it reaches a max your app falls over.
1 reply 0 retweets 17 likesShow this thread -
Obviously if multiple audio sources cannot be reconciled in time due to time slip, *some* audio drop-outs need to happen. But they should neither affect everything globally, nor cause a persistent problem forever.
1 reply 0 retweets 10 likesShow this thread -
Now I know that it was just another dumb bug. The buffer size increase codepath corrects those slipping sources, but once that no longer runs or sources slip too much, OBS's audio mixing code just... couldn't deal with them, instead breaking entirely.
1 reply 0 retweets 8 likesShow this thread -
So the patch just makes it detect that situation and drop late audio from that source (and possibly reset it to pending) before the whole audio mixing tree gets poisoned by audio data from the past. And now everything is fine.
2 replies 0 retweets 26 likesShow this thread -
FWIW, this particular bug has been basically known as "the bug that has crashed every long-running DJ (or similar RTMP re-streaming) show at least once" within the community. I'm very happy to see it gone. Or at least I hope so anyway. We'll see at
@AnimeltUP! this Sunday!1 reply 3 retweets 45 likesShow this thread -
Replying to @marcan42 @AnimeltUP
I guess you will be using your own build with the 4 patches. If so, you plan building from master (+ patches) or you will backport them to the latest tagged version (26.0.2 + the 4 patch sets)?
1 reply 0 retweets 0 likes
master. I like to live dangerously (and it hasn't crashed in an unexpected way in testing so far so...)
-
-
Replying to @marcan42 @AnimeltUP
I didn't expect less.pic.twitter.com/uPmHchJYhT
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.