Bug Report Random FPS spikes

Conaire

New Member
Hey guys, hopefully you can help me out with this problem.

I've been having some FPS issues with OBS, recently while I've been streaming and the frame rate will spike every so often, sometimes it will happen every 10 seconds or so, other times its every minute or so. I'm running dark souls currently and lagging during anything in that game is a big problem, although its not limited to dark souls, I've had issues with GTAIV and League of legends, no doubt other games if I try them.

http://www.twitch.tv/conaire123/b/436195135 - This is the latest stream I've done, Its not noticeable around the beginning, around 1 hour into the stream is a good place to start if you want to see it for yourself.

Ignore the 8k buffer rate, I've tried it lower and it makes no difference, still get random spikes at random occurrences

Heres the OBS log from the same stream:


15:27:50: Open Broadcaster Software v0.542b - 64bit ( ^ω^)
15:27:50: -------------------------------
15:27:50: CPU Name: AMD FX(tm)-8350 Eight-Core Processor
15:27:50: CPU Speed: 4000MHz
15:27:50: Physical Memory: 16354MB Total, 13585MB Free
15:27:50: stepping id: 0, model 2, family 15, type 0, extmodel 0, extfamily 3, HTT 1, logical cores 8, total cores 4
15:27:50: monitor 1: pos={0, 0}, size={1920, 1080}
15:27:50: monitor 2: pos={1920, 0}, size={1920, 1080}
15:27:50: Windows Version: 6.1 Build 7600
15:27:50: Aero is Disabled
15:27:50: -------------------------------
15:27:50: OBS Modules:
15:27:50: Base Address Module
15:27:50: 000000003F830000 OBS.exe
15:27:50: 00000000F00E0000 OBSApi.dll
15:27:50: 00000000FE9C0000 DShowPlugin.dll
15:27:50: 00000000F5190000 GraphicsCapture.dll
15:27:50: 00000000F5170000 NoiseGate.dll
15:27:50: 00000000FAA50000 PSVPlugin.dll
15:27:50: ------------------------------------------
15:27:50: Adapter 1
15:27:50: Video Adapter: NVIDIA GeForce GTX 560 Ti
15:27:50: Video Adapter Dedicated Video Memory: 1025966080
15:27:50: Video Adapter Shared System Memory: 3220779008
15:27:50: =====Stream Start: 2013-07-26, 15:27:50===============================================
15:27:50: Multithreaded optimizations: On
15:27:50: Base resolution: 1920x1080
15:27:50: Output resolution: 1920x1080
15:27:50: ------------------------------------------
15:27:50: Loading up D3D10...
15:27:50: Playback device Default
15:27:50: ------------------------------------------
15:27:50: Using desktop audio input: Speakers (Plantronics GameCom 780)
15:27:50: Using 5.1 surround speaker setup
15:27:50: ------------------------------------------
15:27:50: Using auxilary audio input: Microphone (Plantronics GameCom 780)
15:27:50: ------------------------------------------
15:27:50: Audio Encoding: AAC
15:27:50: bitrate: 256
15:27:50: Using graphics capture
15:27:50: ------------------------------------------
15:27:50: Video Encoding: x264
15:27:50: fps: 60
15:27:50: width: 1920, height: 1080
15:27:50: preset: veryfast
15:27:50: CBR: no
15:27:50: CFR: no
15:27:50: max bitrate: 3000
15:27:50: buffer size: 8000
15:27:50: quality: 10
15:27:50: ------------------------------------------
15:27:50: SharedTexCapture hooked
15:27:54: SharedTexCapture hooked
15:28:05: GraphicsCaptureSource::NewCapture: eliminating old capture
15:28:05: SharedTexCapture hooked
15:28:28: Total frames rendered: 2214, number of frames that lagged: 10 (0.45%) (it's okay for some frames to lag)
15:28:28: =====Stream End: 2013-07-26, 15:28:28=================================================
15:32:01: =====Stream Start: 2013-07-26, 15:32:01===============================================
15:32:01: Multithreaded optimizations: On
15:32:01: Base resolution: 1920x1080
15:32:01: Output resolution: 1920x1080
15:32:01: ------------------------------------------
15:32:01: Loading up D3D10...
15:32:01: Playback device Default
15:32:01: ------------------------------------------
15:32:01: Using desktop audio input: Speakers (Plantronics GameCom 780)
15:32:01: Using 5.1 surround speaker setup
15:32:01: ------------------------------------------
15:32:01: Using auxilary audio input: Microphone (Plantronics GameCom 780)
15:32:01: ------------------------------------------
15:32:01: Audio Encoding: AAC
15:32:01: bitrate: 256
15:32:01: Using graphics capture
15:32:01: ------------------------------------------
15:32:01: Video Encoding: x264
15:32:01: fps: 60
15:32:01: width: 1920, height: 1080
15:32:01: preset: veryfast
15:32:01: CBR: no
15:32:01: CFR: no
15:32:01: max bitrate: 3000
15:32:01: buffer size: 8000
15:32:01: quality: 10
15:32:01: ------------------------------------------
15:32:01: SharedTexCapture hooked
15:32:03: Using RTMP service: Twitch / Justin.tv
15:32:03: Server selection: rtmp://live-lhr.justin.tv/app
15:32:05: SO_SNDBUF was at 8192
15:32:05: SO_SNDBUF is now 65536
15:32:22: GraphicsCaptureSource::NewCapture: eliminating old capture
15:32:22: SharedTexCapture hooked
16:09:24: GraphicsCaptureSource::NewCapture: eliminating old capture
16:09:24: SharedTexCapture hooked
16:11:26: RTMPPublisher::BufferedSend: Increasing socket send buffer to ISB 262144
17:45:47: GraphicsCaptureSource::NewCapture: eliminating old capture
17:45:47: SharedTexCapture hooked
18:19:22: Total frames rendered: 573806, number of frames that lagged: 7353 (1.28%) (it's okay for some frames to lag)
18:19:22: RTMPPublisher::SocketLoop: Aborting due to bStopping
18:19:22: Number of times waited to send: 4, Waited for a total of 14180 bytes
18:19:22: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
18:19:22: =====Stream End: 2013-07-26, 18:19:22=================================================
18:19:24:
18:19:24: Profiler results:
18:19:24:
18:19:24: ==============================================================
18:19:24: frame - [100%] [avg time: 5.769 ms (cpu time: avg 4.358 ms, total 2.51032e+006 ms)] [avg calls per frame: 1] [children: 99.9%] [unaccounted: 0.0867%]
18:19:24: | frame preprocessing and rendering - [2.2%] [avg time: 0.127 ms (cpu time: avg 0.09 ms, total 51917.2 ms)] [avg calls per frame: 1] [children: 0.0347%] [unaccounted: 2.17%]
18:19:24: | | scene->Preprocess - [0.0347%] [avg time: 0.002 ms (cpu time: avg 0.002 ms, total 1201.2 ms)] [avg calls per frame: 1]
18:19:24: | video encoding and uploading - [97.7%] [avg time: 5.637 ms (cpu time: avg 4.265 ms, total 2.45717e+006 ms)] [avg calls per frame: 1] [children: 96%] [unaccounted: 1.66%]
18:19:24: | | flush - [2.72%] [avg time: 0.157 ms (cpu time: avg 0.063 ms, total 36379.4 ms)] [avg calls per frame: 1]
18:19:24: | | CopyResource - [0.693%] [avg time: 0.04 ms (cpu time: avg 0.016 ms, total 9547.26 ms)] [avg calls per frame: 0]
18:19:24: | | conversion to 4:2:0 - [0.988%] [avg time: 0.057 ms (cpu time: avg 0.009 ms, total 5428.84 ms)] [avg calls per frame: 0]
18:19:24: | | call to encoder - [91.2%] [avg time: 5.26 ms (cpu time: avg 4.126 ms, total 2.37677e+006 ms)] [avg calls per frame: 0]
18:19:24: | | sending stuff out - [0.468%] [avg time: 0.027 ms (cpu time: avg 0.021 ms, total 12511.3 ms)] [avg calls per frame: 0]
18:19:24: | Convert444Threads - [606%] [avg time: 34.986 ms (cpu time: avg 3.389 ms, total 1.95237e+006 ms)] [avg calls per frame: 1]
18:19:24: ==============================================================
18:19:24:

If you guys have any ideas or suggestions that would be amazing, thanks again.
 

Kharay

Member
A couple of things:
  • No, we're not ignoring the 8000 buffer. Drop the custom buffer size unless you really know what you're doing.
  • 1080p@60 FPS? There's your problem right there. It's not realistic to stream 1080p in 60 FPS. It's too costly bandwidth and performance-wise. Keep it at either 720p@60 FPS (downscaling using the Lanczos filter) or 1080p@30 FPS.
  • Run with CBR for a while instead of VBR and see if it improves. Enable CBR, Enable CBR Padding, Disable Custom Buffer Size.
  • Also, Enable Aero. There is one situation and one situation only where you'd want Aero Disabled while streaming and that's when you're doing a Monitor Capture. Which is not recommended anyhow.
 

Conaire

New Member
Kharay said:
A couple of things:
  • No, we're not ignoring the 8000 buffer. Drop the custom buffer size unless you really know what you're doing.
  • 1080p@60 FPS? There's your problem right there. It's not realistic to stream 1080p in 60 FPS. It's too costly bandwidth and performance-wise. Keep it at either 720p@60 FPS (downscaling using the Lanczos filter) or 1080p@30 FPS.
  • Run with CBR for a while instead of VBR and see if it improves. Enable CBR, Enable CBR Padding, Disable Custom Buffer Size.
  • Also, Enable Aero. There is one situation and one situation only where you'd want Aero Disabled while streaming and that's when you're doing a Monitor Capture. Which is not recommended anyhow.

I do drop the buffer size :p that's why I said ignore it, I just wanted to put it high to see if even that made a difference, which it didn't, so I don't normally keep it like that, which is why I said ignore it lol

But thanks for the rest of the help, ill give it a shot and see if it makes a difference
 

Conaire

New Member
I tried what you said and it works great now, still a little random spike every now and then but it only lasts half a second or so, compared to 5-10 seconds on the old ones, so I'm happy, thanks very much Kharay
 
Top