OBS Disconnecting when Tabbing into a Game

joconner

New Member
Here's a bit of an odd one - I tried streaming today and every time I attempted to tab into a game I would drop frames and OBS would disconnect. I did not have any issues when the game was running and minimized, even when I could hear the game audio, but the second I tabbed into the game the stream would end. I tried removing both my video and audio sources and that didn't help. It seems like the mere act of having the game open on my computer caused OBS to run into issues.

I have run into OBS disconnection problems in the past, but this is the first time I have had a problem that has not been fixed by a restart. For reference I was playing Hades, a game I streamed without issue less than a week ago. Here's all the log files that were generated today. Any help with this would be massively appreciated.
 

Attachments

  • 2024-07-24 17-09-09.txt
    20.9 KB · Views: 17
  • 2024-07-24 17-59-41.txt
    21 KB · Views: 12
  • 2024-07-24 17-57-59.txt
    17.2 KB · Views: 5
  • 2024-07-24 17-52-49.txt
    24.6 KB · Views: 3
  • 2024-07-24 17-52-11.txt
    15.5 KB · Views: 5
  • 2024-07-24 17-51-31.txt
    15.7 KB · Views: 3
  • 2024-07-24 17-36-44.txt
    25 KB · Views: 4
  • 2024-07-24 17-22-45.txt
    22.3 KB · Views: 5
  • 2024-07-24 17-13-39.txt
    31 KB · Views: 9

qhobbes

Active Member
Your log does contain streaming sessions with dropped frames. This can only be caused by a failure in your internet connection or your networking hardware. It is not caused by OBS, but OBS can help. However, in many cases, wireless connections can cause issues because of their unstable nature. Streaming really requires a stable connection. Often wireless connections are fine, but if you have problems, the FIRST troubleshooting step would be to switch to wired. We highly recommend streaming on wired connections.

If still having issues with a wired connection, go to Settings > Advanced > Network and enable Dynamic Bitrate before you start streaming.

Further troubleshooting steps at: Dropped Frames and General Connection Issues.

Please only post 1 log of an issue.
 

joconner

New Member
I found the issue but you are 100% wrong to suggest it was my internet. The problem is not the dropped frames, it's the obs disconnections, and the issue seems to be with DirectX. I don't know if it is DirectX itself or OBS interfacing with DirectX in some way, but I know it's related to running DirectX while live causing OBS to disconnect.
 

qhobbes

Active Member
Try disabling HAGS. The Hardware-accelerated GPU scheduling ("HAGS") feature in Windows is currently known to cause performance and capture issues with OBS, games and overlay tools. It's an experimental feature and we recommend disabling it via these instructions.
 

joconner

New Member
Thanks for the tip! Unfortunately it didn't seem to fix the problem with the DirectX launch option. For reference Hades has three different options at launch: DirectX, Vulcan, and 32-Bit. DirectX is the default and OBS entirely disconnects error message and all whenever I have the game open via the DirectX launch. However this problem does not exist when I use the Vulcan launch option. I have been messing around with other games and it seems similarly all-or-nothing. Was able to run Ark for 10 minutes without a full disconnect but disconnected several times a minute trying Baldur's Gate 3. The inconsistency of it is what is driving me crazy - like I'd be annoyed if it happened every game but the fact that it's not consistently replicable brings it to a whole new level.
 

qhobbes

Active Member
Go to Settings > Advanced > Network > Enable Dynamic Bitrate, Network Optimizations and TCP Pacing. Apply, OK. Do this before you start streaming with a wired connection. If still having issues, post 1 new log of the issue.
 

joconner

New Member
Problem persists. Bitrate perfectly fine until I launch the game and then it disconnects me from OBS twice in about 30 seconds. Here's a log file. I went live without the game open for about 80 seconds then launched the game.
 

Attachments

  • 2024-07-24 19-39-54.txt
    59.7 KB · Views: 18

joconner

New Member
Yes. OBS made me disable enhanced broadcasting when I turned on dynamic bitrate so enhanced broadcasting was already off.
 

PaiSand

Active Member
Please check the quality of your connection against Twitch servers using this tool:
TwitchTest | r1ch.net

Anything bellow 90 quality is bad and shows an issue on the home network or the ISP.
The error shown on the log file points to an issue on the wi-fi or a more complex error on the ISP.
20:07:03.393: WriteN, RTMP send error 10060 (4097 bytes)
20:07:03.394: WriteN, RTMP send error 10038 (79 bytes)
20:07:03.394: WriteN, RTMP send error 10038 (42 bytes)

If it's the wi-fi, you can check it simple using a wired connection. Test it using a direct connection to the router/modem.
If the issue persist and you already verified that the network driver is updated (check on the motherboard vendor site) then the most probable cause is in the ISP network related Twitch services or RTMP protocol in particular.

Also remember that wi-fi connections are not reliable.
 

qhobbes

Active Member
Ok, your previous log shows it enabled. Leave it off for now. Also that log shows:
[rtmp stream: 'rtmp multitrack video'] User stopped the stream
for 3 out of the 4 stops.
Only 1 shows:
20:03:30.270: WriteN, RTMP send error 10060 (4097 bytes)
20:03:30.270: WriteN, RTMP send error 10038 (582 bytes)
20:03:30.270: WriteN, RTMP send error 10038 (42 bytes)
20:03:30.270: [rtmp stream: 'rtmp multitrack video'] Disconnected from rtmp://sjc06.contribute.live-video.net/app
 

joconner

New Member
1721878564990.png


The issue continues to not be my internet.
 

joconner

New Member
Ok, your previous log shows it enabled. Leave it off for now. Also that log shows:
[rtmp stream: 'rtmp multitrack video'] User stopped the stream
for 3 out of the 4 stops.
Only 1 shows:
20:03:30.270: WriteN, RTMP send error 10060 (4097 bytes)
20:03:30.270: WriteN, RTMP send error 10038 (582 bytes)
20:03:30.270: WriteN, RTMP send error 10038 (42 bytes)
20:03:30.270: [rtmp stream: 'rtmp multitrack video'] Disconnected from rtmp://sjc06.contribute.live-video.net/app
I only manually stopped the stream once. The stream did disconnect twice in that span. As for enhanced broadcasting being on: I wonder if that's just an oddity with the stream technically starting with it on. I went live, then the pop-up told me to disable it, so it may have technically been enabled while I was live. I checked and the issue persists even starting a stream with it off.
 

qhobbes

Active Member
19:49:30.543: [rtmp stream: 'rtmp multitrack video'] User stopped the stream
20:01:30.488: [rtmp stream: 'rtmp multitrack video'] User stopped the stream

20:03:30.270: WriteN, RTMP send error 10060 (4097 bytes)
20:03:30.270: WriteN, RTMP send error 10038 (582 bytes)
20:03:30.270: WriteN, RTMP send error 10038 (42 bytes)
20:03:30.270: [rtmp stream: 'rtmp multitrack video'] Disconnected from rtmp://sjc06.contribute.live-video.net/app
20:03:30.270: Output 'rtmp multitrack video': stopping
20:03:30.270: Output 'rtmp multitrack video': Total frames output: 3609 (5013 attempted)
20:03:30.270: Output 'rtmp multitrack video': Total drawn frames: 1302
20:03:30.270: Output 'rtmp multitrack video': Number of dropped frames due to insufficient bandwidth/connection stalls: 1404 (28.0%)
20:03:30.270: Output 'rtmp multitrack video': Reconnecting in 17.00 seconds..
20:03:30.270: [rtmp stream: 'rtmp multitrack video'] Freeing 1204 remaining packets
20:03:30.672: warning: 2 frames left in the queue on closing
20:03:34.685: ==== Streaming Stop ================================================

20:07:27.569: [rtmp stream: 'simple_stream'] User stopped the stream
 

joconner

New Member
Oh the reason for the multiple stops is that I was streaming earlier. I have been starting and stopping on and off for a while trying different things/resetting my computer.
 
Top