Question / Help Any way to reduce framerate loss?

podonnell

Member
During streaming, my performance drops quite a bit. I'm sure this is expected, as I'm now telling my video card to render video AND capture it. However I wanted to check and see if there was a way to reduce the hit I am taking. I haven't calculated exactly how many frames I'm losing, but in games that I'm able to run at 144+ fps, it drops what seems to be around 60fps.

In general, it just performs worse than when I am not streaming. Is this my CPU or GPU that is causing the problem? Is this unavoidable while streaming?

I like to stream as much as possible, but when playing competitive games, it takes away the edge of the extra FPS I normally get.

Any help or tips are greatly appreciated.

Thanks!
 

podonnell

Member
Thanks! Here is the log from my latest stream.

Code:
17:23:26: Open Broadcaster Software v0.542b - 32bit (´・ω・`)
17:23:26: -------------------------------
17:23:26: CPU Name: Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
17:23:26: CPU Speed: 3360MHz
17:23:26: Physical Memory:  4095MB Total, 4095MB Free
17:23:26: stepping id: 5, model 14, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
17:23:26: monitor 1: pos={0, 0}, size={1920, 1080}
17:23:26: monitor 2: pos={-1920, -1080}, size={1920, 1080}
17:23:26: monitor 3: pos={-3840, -2101}, size={1920, 1080}
17:23:26: Windows Version: 6.1 Build 7601 S
17:23:26: Aero is Disabled
17:23:26: -------------------------------
17:23:26: OBS Modules:
17:23:26: Base Address     Module
17:23:26: 01320000         OBS.exe
17:23:26: 6F070000         OBSApi.dll
17:23:26: 725F0000         DShowPlugin.dll
17:23:26: 715D0000         GraphicsCapture.dll
17:23:26: 715B0000         NoiseGate.dll
17:23:26: 71590000         PSVPlugin.dll
17:23:26: ------------------------------------------
17:23:26: Adapter 1
17:23:26:   Video Adapter: NVIDIA GeForce GTX 670
17:23:26:   Video Adapter Dedicated Video Memory: 2091581440
17:23:26:   Video Adapter Shared System Memory: 2147807232
17:23:26: =====Stream Start: 2013-07-29, 17:23:26===============================================
17:23:26:   Multithreaded optimizations: On
17:23:26:   Base resolution: 1920x1080
17:23:26:   Output resolution: 1280x720
17:23:26: ------------------------------------------
17:23:26: Loading up D3D10...
17:23:26: Playback device Default
17:23:26: ------------------------------------------
17:23:26: Using desktop audio input: Sennheiser (Realtek High Definition Audio)
17:23:26: ------------------------------------------
17:23:26: Using auxilary audio input: LifeCam Studio (8- Studio - Microsoft LifeCam.)
17:23:26: ------------------------------------------
17:23:26: Audio Encoding: AAC
17:23:26:     bitrate: 128
17:23:26: Using Monitor Capture
17:23:26: ------------------------------------------
17:23:26: Video Encoding: x264
17:23:26:     fps: 60
17:23:26:     width: 1280, height: 720
17:23:26:     preset: veryfast
17:23:26:     CBR: yes
17:23:26:     CFR: no
17:23:26:     max bitrate: 2800
17:23:26: ------------------------------------------
17:23:26: Total frames rendered: 47, number of frames that lagged: 1 (2.13%) (it's okay for some frames to lag)
17:23:26: =====Stream End: 2013-07-29, 17:23:26=================================================
17:23:27: =====Stream Start: 2013-07-29, 17:23:27===============================================
17:23:27:   Multithreaded optimizations: On
17:23:27:   Base resolution: 1920x1080
17:23:27:   Output resolution: 1280x720
17:23:27: ------------------------------------------
17:23:27: Loading up D3D10...
17:23:27: Playback device Default
17:23:27: ------------------------------------------
17:23:27: Using desktop audio input: Sennheiser (Realtek High Definition Audio)
17:23:27: ------------------------------------------
17:23:27: Using auxilary audio input: LifeCam Studio (8- Studio - Microsoft LifeCam.)
17:23:27: ------------------------------------------
17:23:27: Audio Encoding: AAC
17:23:27:     bitrate: 128
17:23:27: Using Monitor Capture
17:23:27: ------------------------------------------
17:23:27: Video Encoding: x264
17:23:27:     fps: 60
17:23:27:     width: 1280, height: 720
17:23:27:     preset: veryfast
17:23:27:     CBR: yes
17:23:27:     CFR: no
17:23:27:     max bitrate: 2800
17:23:27: ------------------------------------------
17:23:28: Using RTMP service: Twitch / Justin.tv
17:23:28:   Server selection: rtmp://live-iad-backup.justin.tv/app
17:23:30: SO_SNDBUF was at 8192
17:23:30: SO_SNDBUF is now 65536
18:12:36: Total frames rendered: 176912, number of frames that lagged: 609 (0.34%) (it's okay for some frames to lag)
18:12:36: RTMPPublisher::SocketLoop: Aborting due to bStopping
18:12:36: Number of times waited to send: 0, Waited for a total of 0 bytes
18:12:36: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
18:12:36: =====Stream End: 2013-07-29, 18:12:36=================================================
18:17:49: 
18:17:49: Profiler results:
18:17:49: 
18:17:49: ==============================================================
18:17:49: frame - [100%] [avg time: 10.668 ms (cpu time: avg 5.722 ms, total 1.01257e+006 ms)] [avg calls per frame: 1] [children: 99.9%] [unaccounted: 0.0656%]
18:17:49: | frame preprocessing and rendering - [81.8%] [avg time: 8.731 ms (cpu time: avg 3.846 ms, total 680679 ms)] [avg calls per frame: 1] [children: 76.9%] [unaccounted: 4.91%]
18:17:49: | | scene->Preprocess - [76.9%] [avg time: 8.207 ms (cpu time: avg 3.384 ms, total 598857 ms)] [avg calls per frame: 1]
18:17:49: | video encoding and uploading - [18.1%] [avg time: 1.93 ms (cpu time: avg 1.872 ms, total 331284 ms)] [avg calls per frame: 1] [children: 17.9%] [unaccounted: 0.187%]
18:17:49: | | flush - [0.712%] [avg time: 0.076 ms (cpu time: avg 0.072 ms, total 12776.5 ms)] [avg calls per frame: 1]
18:17:49: | | CopyResource - [0.169%] [avg time: 0.018 ms (cpu time: avg 0.017 ms, total 3166.83 ms)] [avg calls per frame: 0]
18:17:49: | | conversion to 4:2:0 - [0.112%] [avg time: 0.012 ms (cpu time: avg 0.005 ms, total 982.806 ms)] [avg calls per frame: 0]
18:17:49: | | call to encoder - [16.7%] [avg time: 1.783 ms (cpu time: avg 1.749 ms, total 309522 ms)] [avg calls per frame: 0]
18:17:49: | | sending stuff out - [0.197%] [avg time: 0.021 ms (cpu time: avg 0.017 ms, total 3073.21 ms)] [avg calls per frame: 0]
18:17:49: | Convert444Threads - [312%] [avg time: 33.328 ms (cpu time: avg 2.284 ms, total 404245 ms)] [avg calls per frame: 1]
18:17:49: ==============================================================
18:17:49:
 

podonnell

Member
And if it's any help, here are a few others from a few days past. The issue was prevalent on all streams:

One:
Code:
21:04:29: Open Broadcaster Software v0.542b - 32bit (´・ω・`)
21:04:29: -------------------------------
21:04:29: CPU Name: Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
21:04:29: CPU Speed: 3360MHz
21:04:29: Physical Memory:  4095MB Total, 4095MB Free
21:04:29: stepping id: 5, model 14, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
21:04:29: monitor 1: pos={0, 0}, size={1920, 1080}
21:04:29: monitor 2: pos={-1920, -1080}, size={1920, 1080}
21:04:29: monitor 3: pos={-3840, -2101}, size={1920, 1080}
21:04:29: Windows Version: 6.1 Build 7601 S
21:04:29: Aero is Disabled
21:04:29: -------------------------------
21:04:29: OBS Modules:
21:04:29: Base Address     Module
21:04:29: 00E90000         OBS.exe
21:04:29: 5CAE0000         OBSApi.dll
21:04:29: 68150000         DShowPlugin.dll
21:04:29: 5D520000         GraphicsCapture.dll
21:04:29: 642B0000         NoiseGate.dll
21:04:29: 5D500000         PSVPlugin.dll
21:04:29: ------------------------------------------
21:04:29: Adapter 1
21:04:29:   Video Adapter: NVIDIA GeForce GTX 670
21:04:29:   Video Adapter Dedicated Video Memory: 2091581440
21:04:29:   Video Adapter Shared System Memory: 2147807232
21:04:29: =====Stream Start: 2013-07-28, 21:04:29===============================================
21:04:29:   Multithreaded optimizations: On
21:04:29:   Base resolution: 1920x1080
21:04:29:   Output resolution: 1280x720
21:04:29: ------------------------------------------
21:04:30: Loading up D3D10...
21:04:30: Playback device Default
21:04:30: ------------------------------------------
21:04:30: Using desktop audio input: Sennheiser (Realtek High Definition Audio)
21:04:30: ------------------------------------------
21:04:30: Using auxilary audio input: LifeCam Studio (8- Studio - Microsoft LifeCam.)
21:04:30: ------------------------------------------
21:04:30: Audio Encoding: AAC
21:04:30:     bitrate: 128
21:04:30: Using Monitor Capture
21:04:30: ------------------------------------------
21:04:30: Video Encoding: x264
21:04:30:     fps: 60
21:04:30:     width: 1280, height: 720
21:04:30:     preset: veryfast
21:04:30:     CBR: yes
21:04:30:     CFR: no
21:04:30:     max bitrate: 2800
21:04:30: ------------------------------------------
21:06:48: Total frames rendered: 8268, number of frames that lagged: 11 (0.13%) (it's okay for some frames to lag)
21:06:48: =====Stream End: 2013-07-28, 21:06:48=================================================
21:06:49: =====Stream Start: 2013-07-28, 21:06:49===============================================
21:06:49:   Multithreaded optimizations: On
21:06:49:   Base resolution: 1920x1080
21:06:49:   Output resolution: 1280x720
21:06:49: ------------------------------------------
21:06:49: Loading up D3D10...
21:06:49: Playback device Default
21:06:49: ------------------------------------------
21:06:49: Using desktop audio input: Sennheiser (Realtek High Definition Audio)
21:06:49: ------------------------------------------
21:06:49: Using auxilary audio input: LifeCam Studio (8- Studio - Microsoft LifeCam.)
21:06:49: ------------------------------------------
21:06:49: Audio Encoding: AAC
21:06:49:     bitrate: 128
21:06:49: Using Monitor Capture
21:06:49: ------------------------------------------
21:06:49: Video Encoding: x264
21:06:49:     fps: 60
21:06:49:     width: 1280, height: 720
21:06:49:     preset: veryfast
21:06:49:     CBR: yes
21:06:49:     CFR: no
21:06:49:     max bitrate: 2800
21:06:49: ------------------------------------------
21:06:50: Using RTMP service: Twitch / Justin.tv
21:06:50:   Server selection: rtmp://live-iad-backup.justin.tv/app
21:06:52: SO_SNDBUF was at 8192
21:06:52: SO_SNDBUF is now 65536
21:12:53: RTMPPublisher::BufferedSend: Increasing socket send buffer to ISB 131072
22:09:52: RTMPPublisher::BufferedSend: Increasing socket send buffer to ISB 262144
23:48:14: Total frames rendered: 580946, number of frames that lagged: 2271 (0.39%) (it's okay for some frames to lag)
23:48:14: RTMPPublisher::SocketLoop: Aborting due to bStopping
23:48:14: Number of times waited to send: 203, Waited for a total of 655990 bytes
23:48:14: Number of b-frames dropped: 532 (0.092%), Number of p-frames dropped: 867 (0.15%), Total 1399 (0.24%)
23:48:15: =====Stream End: 2013-07-28, 23:48:15=================================================
23:48:29: 
23:48:29: Profiler results:
23:48:29: 
23:48:29: ==============================================================
23:48:29: frame - [100%] [avg time: 10.941 ms (cpu time: avg 5.826 ms, total 3.43277e+006 ms)] [avg calls per frame: 1] [children: 99.9%] [unaccounted: 0.064%]
23:48:29: | frame preprocessing and rendering - [82%] [avg time: 8.972 ms (cpu time: avg 3.946 ms, total 2.32523e+006 ms)] [avg calls per frame: 1] [children: 77.4%] [unaccounted: 4.64%]
23:48:29: | | scene->Preprocess - [77.4%] [avg time: 8.464 ms (cpu time: avg 3.495 ms, total 2.05988e+006 ms)] [avg calls per frame: 1]
23:48:29: | video encoding and uploading - [17.9%] [avg time: 1.962 ms (cpu time: avg 1.876 ms, total 1.10559e+006 ms)] [avg calls per frame: 1] [children: 17.7%] [unaccounted: 0.274%]
23:48:29: | | flush - [0.74%] [avg time: 0.081 ms (cpu time: avg 0.076 ms, total 45177.9 ms)] [avg calls per frame: 1]
23:48:29: | | CopyResource - [0.165%] [avg time: 0.018 ms (cpu time: avg 0.018 ms, total 10701.7 ms)] [avg calls per frame: 0]
23:48:29: | | conversion to 4:2:0 - [0.137%] [avg time: 0.015 ms (cpu time: avg 0.005 ms, total 3307.22 ms)] [avg calls per frame: 0]
23:48:29: | | call to encoder - [16.4%] [avg time: 1.794 ms (cpu time: avg 1.75 ms, total 1.03165e+006 ms)] [avg calls per frame: 0]
23:48:29: | | sending stuff out - [0.219%] [avg time: 0.024 ms (cpu time: avg 0.014 ms, total 8564.46 ms)] [avg calls per frame: 0]
23:48:29: | Convert444Threads - [305%] [avg time: 33.341 ms (cpu time: avg 2.254 ms, total 1.32857e+006 ms)] [avg calls per frame: 1]
23:48:29: ==============================================================
23:48:29:

Two:
Code:
17:47:38: Open Broadcaster Software v0.542b - 32bit (´・ω・`)
17:47:38: -------------------------------
17:47:38: CPU Name: Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
17:47:38: CPU Speed: 3360MHz
17:47:38: Physical Memory:  4095MB Total, 4095MB Free
17:47:38: stepping id: 5, model 14, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
17:47:38: monitor 1: pos={-3840, -2101}, size={1920, 1080}
17:47:38: monitor 2: pos={0, 0}, size={1920, 1080}
17:47:38: monitor 3: pos={-1920, -1080}, size={1920, 1080}
17:47:38: Windows Version: 6.1 Build 7601 S
17:47:38: Aero is Disabled
17:47:38: -------------------------------
17:47:38: OBS Modules:
17:47:38: Base Address     Module
17:47:38: 00930000         OBS.exe
17:47:38: 69090000         OBSApi.dll
17:47:38: 69060000         DShowPlugin.dll
17:47:38: 69040000         GraphicsCapture.dll
17:47:38: 68DD0000         NoiseGate.dll
17:47:38: 68DB0000         PSVPlugin.dll
17:47:38: ------------------------------------------
17:47:38: Adapter 1
17:47:38:   Video Adapter: NVIDIA GeForce GTX 670
17:47:38:   Video Adapter Dedicated Video Memory: 2091581440
17:47:38:   Video Adapter Shared System Memory: 2147807232
17:47:38: =====Stream Start: 2013-07-25, 17:47:38===============================================
17:47:38:   Multithreaded optimizations: On
17:47:38:   Base resolution: 1920x1080
17:47:38:   Output resolution: 1280x720
17:47:38: ------------------------------------------
17:47:38: Loading up D3D10...
17:47:38: Playback device Default
17:47:38: ------------------------------------------
17:47:38: Using desktop audio input: RX-V673 5.1 PLIIx (NVIDIA High Definition Audio)
17:47:38: Using 5.1 surround speaker setup
17:47:38: ------------------------------------------
17:47:38: Using auxilary audio input: LifeCam Studio (8- Studio - Microsoft LifeCam.)
17:47:38: ------------------------------------------
17:47:38: Audio Encoding: AAC
17:47:38:     bitrate: 128
17:47:38: Using Monitor Capture
17:47:38: ------------------------------------------
17:47:38: Video Encoding: x264
17:47:38:     fps: 60
17:47:38:     width: 1280, height: 720
17:47:38:     preset: veryfast
17:47:38:     CBR: yes
17:47:38:     CFR: no
17:47:38:     max bitrate: 2800
17:47:38: ------------------------------------------
17:47:38: Using Monitor Capture
17:50:42: Total frames rendered: 11061, number of frames that lagged: 7 (0.06%) (it's okay for some frames to lag)
17:50:43: =====Stream End: 2013-07-25, 17:50:43=================================================
17:58:49: =====Stream Start: 2013-07-25, 17:58:49===============================================
17:58:49:   Multithreaded optimizations: On
17:58:49:   Base resolution: 1920x1080
17:58:49:   Output resolution: 1280x720
17:58:49: ------------------------------------------
17:58:49: Loading up D3D10...
17:58:49: Playback device Default
17:58:49: ------------------------------------------
17:58:49: Using desktop audio input: RX-V673 5.1 PLIIx (NVIDIA High Definition Audio)
17:58:49: Using 5.1 surround speaker setup
17:58:49: ------------------------------------------
17:58:49: Using auxilary audio input: LifeCam Studio (8- Studio - Microsoft LifeCam.)
17:58:49: ------------------------------------------
17:58:49: Audio Encoding: AAC
17:58:49:     bitrate: 128
17:58:49: Using Monitor Capture
17:58:50: ------------------------------------------
17:58:50: Video Encoding: x264
17:58:50:     fps: 60
17:58:50:     width: 1280, height: 720
17:58:50:     preset: veryfast
17:58:50:     CBR: yes
17:58:50:     CFR: no
17:58:50:     max bitrate: 2800
17:58:50: ------------------------------------------
17:58:51: Using RTMP service: Twitch / Justin.tv
17:58:51:   Server selection: rtmp://live-iad-backup.justin.tv/app
17:58:52: SO_SNDBUF was at 8192
17:58:52: SO_SNDBUF is now 65536
21:32:43: Total frames rendered: 762690, number of frames that lagged: 40306 (5.28%) (it's okay for some frames to lag)
21:32:43: RTMPPublisher::SocketLoop: Aborting due to bStopping
21:32:43: Number of times waited to send: 0, Waited for a total of 0 bytes
21:32:43: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
21:32:43: =====Stream End: 2013-07-25, 21:32:43=================================================
21:35:33: 
21:35:33: Profiler results:
21:35:33: 
21:35:33: ==============================================================
21:35:33: frame - [100%] [avg time: 10.389 ms (cpu time: avg 5.994 ms, total 4.63796e+006 ms)] [avg calls per frame: 1] [children: 99.9%] [unaccounted: 0.0674%]
21:35:33: | frame preprocessing and rendering - [79%] [avg time: 8.207 ms (cpu time: avg 4.161 ms, total 3.21963e+006 ms)] [avg calls per frame: 1] [children: 73.7%] [unaccounted: 5.34%]
21:35:33: | | scene->Preprocess - [73.7%] [avg time: 7.652 ms (cpu time: avg 3.693 ms, total 2.85767e+006 ms)] [avg calls per frame: 1]
21:35:33: | video encoding and uploading - [20.9%] [avg time: 2.175 ms (cpu time: avg 1.83 ms, total 1.41605e+006 ms)] [avg calls per frame: 1] [children: 18.9%] [unaccounted: 2.02%]
21:35:33: | | flush - [0.934%] [avg time: 0.097 ms (cpu time: avg 0.084 ms, total 65629.6 ms)] [avg calls per frame: 1]
21:35:33: | | CopyResource - [0.183%] [avg time: 0.019 ms (cpu time: avg 0.019 ms, total 15210.1 ms)] [avg calls per frame: 0]
21:35:33: | | conversion to 4:2:0 - [0.27%] [avg time: 0.028 ms (cpu time: avg 0.006 ms, total 4789.23 ms)] [avg calls per frame: 0]
21:35:33: | | call to encoder - [17.3%] [avg time: 1.8 ms (cpu time: avg 1.693 ms, total 1.31047e+006 ms)] [avg calls per frame: 0]
21:35:33: | | sending stuff out - [0.202%] [avg time: 0.021 ms (cpu time: avg 0.015 ms, total 11700.1 ms)] [avg calls per frame: 0]
21:35:33: | Convert444Threads - [324%] [avg time: 33.644 ms (cpu time: avg 2.041 ms, total 1.57928e+006 ms)] [avg calls per frame: 1]
21:35:33: ==============================================================
21:35:33:

Again, this might be completely commonplace while streaming. Does anyone else get frame reduction and poor performance while streaming?
 

vaesauce

Member
What game are you playing? On a side note, losing FPS is to be expected when you reach at 720P@60FPS. It's normal to drop from 140FPS to like 60-80FPS. Pretty dramatic though...

None the less, have you tried Game Capturing instead of Monitor Capture? Monitor Capture is horrid and shouldn't be used unless you really have no other option. If you're using Monitor capture, i'd also disable Aero.
 

Kharay

Member
18:12:36: Total frames rendered: 176912, number of frames that lagged: 609 (0.34%) (it's okay for some frames to lag)
To be honest, there isn't really much of an issue. 0.34% framelag (PC performance falling behind) is perfectly acceptable.

However, vaesauce makes a very valid point -- Monitor Capture really is a last resort option and should preferably be avoided at all costs. I'm also going to repeat his question -- What are you trying to capture?
 

podonnell

Member
Ah -- very good to know about monitor capture. I'll change my scene and try tonight. I capture many different games, but I usually always try to use monitor capture or screen region -- I had thought those were best. In the posts above I was capturing Counter-Strike: GO, and Borderlands 2.

I will try with game capture on each of those and see if it performs better.

If not, it looks like dropping about half your frames is normal? What settings could I lower for better performance? Resolution? FPS? Or could I change from veryfast to something else, making it less taxing on CPU?
 

Kharay

Member
You're not losing half your frames; if you had been the framelag entry in your log would have been significantly higher. Anyhow, what you could do is balance things out a bit; read my Troubleshooting and Startup Guide for some general pointers on setting up a stable stream. Particularly OpenCL may be something to consider.

Regarding Capture modes; Game Capture is the fastest, typically anyhow. As long as Aero is Enabled Window Capture essentially performs the same; Monitor Capture really is slower and shouldn't be used unless there is no alternative.

Further performance optimizations may include toning down CPU/GPU heavy settings in the games you're streaming; things that may not necessarily look their best on-stream anyhow. Things like Physics, Particle Effects, (Indirect)/(Real-Time) Shadows/Lighting, Post-Processing.

Things to keep high/maxed at all times: Texture Quality, Resolution, Framerate (although that one to a lesser extent since not all games really need super high FPS to get their point across).
 

podonnell

Member
Thanks! I will definitely read your tips and see what can possibly help me.

It might not be framelag at all, it's hard to explain what it looks like. I'll try to compare my framerate while streaming is on and when it's off, and I'll be sure to try game capture.

I'll report back if I have any further info. Thanks everyone!
 

podonnell

Member
Wow. Game capture was the best recommendation anyone could have given me. I actually completely forgot about my issue, as it was running almost exactly as it would run without me streaming.

The game capture definitely fixed whatever issue I was seeing.

Thanks!!!
 
Top