Bug Report OBS disconnects when streaming Portal 2

Holophonist

New Member
Hi -

Whenever I try to stream Portal 2 (through steam), OBS will continuously disconnect/reconnect. After streaming for a while, I noticed the problem and when I went to check the automatically saved vods, there were numerous ~15 second clips.

-I'm using v0.461a, 64 bit.

-streaming to twitch.

-using the "Software Capture" source and tried a couple of the different settings in there (inner window, outer window etc).

-only happens when streaming this particular game. I can't say 100% it doesn't happen on any other game, but I've never had this problem while streaming roughly 10 other games.

-I also noticed in the vods that even the few seconds that it did capture were incredibly choppy and unwatchable.

It shouldn't be a hardware performance issue because I have no problem streaming other games with similar graphics in 720p at 60 fps.

Please let me know if I've failed to include any important info and thanks for any help!
 

Holophonist

New Member
Hi guys -

Thanks for the responses.

I did just update to .466a and it was still doing it.

I'm including the text from the log file from the session I just now streamed using .466a for the purpose of testing.

Code:
Open Broadcaster Software v0.466a - 64bit ( ^ω^)
-------------------------------
CPU Name: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
CPU Speed: 3398MHz
Physical Memory:  16365MB Total, 13640MB Free
stepping id: 7, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
Windows Version: 6.1 Build 7601 S
Aero is Enabled
------------------------------------------
Adapter 1
  Video Adapter: NVIDIA GeForce GTX 560 Ti  
  Video Adapter Dedicated Video Memory: 1025966080
  Video Adapter Shared System Memory: 3221393408
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: ﵀B
bufferTime: 1495, outputRateWindowTime: 1000, dropThreshold: 1995
RTMPPublisher::SocketLoop: Aborting due to FD_CLOSE, error 0
Total frames rendered: 1674, number of frames that lagged: 117 (6.99%) (it's okay for some frames to lag)
Number of b-frames dropped: 81 (4.8%), Number of p-frames dropped: 112 (6.6%), Total 193 (11%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: B
bufferTime: 9598, outputRateWindowTime: 1000, dropThreshold: 10098
RTMPPublisher::SocketLoop: Aborting due to FD_CLOSE, error 0
Total frames rendered: 118, number of frames that lagged: 73 (61.86%) (it's okay for some frames to lag)
Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: ﳀB
bufferTime: 28774, outputRateWindowTime: 1000, dropThreshold: 29274
RTMPPublisher::SocketLoop: Socket error, send() returned -1, GetLastError() 10053
Total frames rendered: 161, number of frames that lagged: 18 (11.18%) (it's okay for some frames to lag)
Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: B
bufferTime: 1640, outputRateWindowTime: 1000, dropThreshold: 2140
RTMPPublisher::SocketLoop: Socket error, send() returned -1, GetLastError() 10053
Total frames rendered: 344, number of frames that lagged: 61 (17.73%) (it's okay for some frames to lag)
Number of b-frames dropped: 111 (11%), Number of p-frames dropped: 135 (13%), Total 246 (24%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: B
bufferTime: 1639, outputRateWindowTime: 1000, dropThreshold: 2139
RTMPPublisher::SocketLoop: Socket error, send() returned -1, GetLastError() 10053
Total frames rendered: 751, number of frames that lagged: 56 (7.46%) (it's okay for some frames to lag)
Number of b-frames dropped: 71 (5.1%), Number of p-frames dropped: 16 (1.1%), Total 87 (6.2%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: ﹀B
bufferTime: 13115, outputRateWindowTime: 1000, dropThreshold: 13615
RTMPPublisher::SocketLoop: Socket error, send() returned -1, GetLastError() 10053
Total frames rendered: 891, number of frames that lagged: 45 (5.05%) (it's okay for some frames to lag)
Number of b-frames dropped: 232 (11%), Number of p-frames dropped: 115 (5.6%), Total 347 (17%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Using RTMP service: Twitch / Justin.tv
  Server selection: B
bufferTime: 7618, outputRateWindowTime: 1000, dropThreshold: 8118
RTMPPublisher::SocketLoop: Socket error, send() returned -1, GetLastError() 10053
Total frames rendered: 516, number of frames that lagged: 37 (7.17%) (it's okay for some frames to lag)
Number of b-frames dropped: 213 (9.2%), Number of p-frames dropped: 228 (9.8%), Total 441 (19%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Using RTMP service: Twitch / Justin.tv

bufferTime: 5233, outputRateWindowTime: 1000, dropThreshold: 5733
RTMPPublisher::SocketLoop: Socket error, send() returned -1, GetLastError() 10053
Total frames rendered: 1890, number of frames that lagged: 87 (4.60%) (it's okay for some frames to lag)
Number of b-frames dropped: 262 (7.5%), Number of p-frames dropped: 259 (7.4%), Total 521 (15%)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Microphone (High Definition Audio Device)
------------------------------------------
Audio Encoding: AAC
    bitrate: 192
Using Window Capture
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 6000
    buffer size: 8000
    quality: 10
------------------------------------------
Total frames rendered: 100, number of frames that lagged: 8 (8.00%) (it's okay for some frames to lag)
Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 50.344 ms] [avg calls per frame: 1] [children: 99.4%] [unaccounted: 0.572%]
| scene->Preprocess - [95.4%] [avg time: 48.044 ms] [avg calls per frame: 1]
| video encoding and uploading - [4%] [avg time: 2.012 ms] [avg calls per frame: 1] [children: 2.18%] [unaccounted: 1.82%]
| | CopyResource - [0.0159%] [avg time: 0.008 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [0.00199%] [avg time: 0.001 ms] [avg calls per frame: 0]
| | call to encoder - [2.15%] [avg time: 1.083 ms] [avg calls per frame: 0]
| | sending stuff out - [0.0119%] [avg time: 0.006 ms] [avg calls per frame: 0]
==============================================================
 

Zephiris

Member
Well from what I can see in those logs, your connection to the streaming server you chose is most likely not able to handle the high bit rate you are using. My guess is that portal 2 has a lot more action on screen than the other games you have been playing, which is causing the encoder to get closer to the 6000kbps bit rate you chose. Something else to note along with this, is that a good number of people who watch twitch streams may not be able to handle watching a 6k bit rate stream unless you are a twitch partner and have lower quality selections.

Of course this is all just a guess until Jim can take a closer look, but my recommendation just for testing purposes would be to lower your bit rate and buffer to around 2000 at 30fps just to see if that possibly fixes the problem. I typically run my stream at 1800 and rarely have any quality issues.
 

Krazy

Town drunk
There's really no reason to go above 3500 for 720p60fps. 6k is way too much. There's also little reason for your buffer to be larger than your bitrate.
 

Holophonist

New Member
Ok, I'll try lowering it. I have pretty fast internet (+10 upload) and didn't think there any downside to having it high. I guess I was very wrong!

That being said, I'd LIKE to avoid lowering the fps. Switching to OBS has kind of got me hooked on streaming at 60fps. If I were ok with streaming at 30fps I could just use xsplit, which doesn't have this disconnecting problem.
 

Krazy

Town drunk
Not sure if this is related to the disconnect issue or not, but you could try using game capture. Monitor Capture on windows 7 is kind of meh, especially with Aero enabled. Your frame process/encode times are really high because of the capture method you are using. Again, not sure if this is going to solve a disconnecting issue, but you may as well get everything trying to run as smooth as possible.
 
Top