Question / Help Low capture FPS (high scene->Preprocess time)

SamuraiD

New Member
Have a strange issue that started showing up within the past week or so...

Latest log file:
Code:
15:04:16: Open Broadcaster Software v0.57b - 64bit ( ^ω^)
15:04:16: -------------------------------
15:04:16: CPU Name: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
15:04:16: CPU Speed: 3309MHz
15:04:16: Physical Memory:  16346MB Total, 14853MB Free
15:04:16: stepping id: 7, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
15:04:16: monitor 1: pos={0, 0}, size={1920, 1080}
15:04:16: Windows Version: 6.1 Build 7601 S
15:04:16: Aero is Disabled
15:04:16: -------------------------------
15:04:16: OBS Modules:
15:04:16: Base Address     Module
15:04:16: 000000003F050000 OBS.exe
15:04:16: 00000000F5F50000 OBSApi.dll
15:04:16: 00000000F84A0000 DShowPlugin.dll
15:04:16: 00000000F8470000 GraphicsCapture.dll
15:04:16: 00000000F8450000 NoiseGate.dll
15:04:16: 00000000F8430000 PSVPlugin.dll
15:04:16: ------------------------------------------
15:04:16: Adapter 1
15:04:16:   Video Adapter: NVIDIA GeForce GTX 680
15:04:16:   Video Adapter Dedicated Video Memory: 2087387136
15:04:16:   Video Adapter Shared System Memory: 2147807232
15:04:16: =====Stream Start: 2013-09-27, 15:04:16===============================================
15:04:16:   Multithreaded optimizations: On
15:04:16:   Base resolution: 1920x1080
15:04:16:   Output resolution: 1920x1080
15:04:16: ------------------------------------------
15:04:16: Loading up D3D10 on NVIDIA GeForce GTX 680...
15:04:16: ------------------------------------------
15:04:16: Audio Format: 48000hz
15:04:16: Playback device Default
15:04:16: ------------------------------------------
15:04:16: Using desktop audio input: Speakers (Creative SB X-Fi)
15:04:16: ------------------------------------------
15:04:16: Using auxilary audio input: Microphone (Creative SB X-Fi)
15:04:16: ------------------------------------------
15:04:16: Audio Encoding: AAC
15:04:16:     bitrate: 160
15:04:16: Using Monitor Capture
15:04:16: ------------------------------------------
15:04:16: Video Encoding: x264
15:04:16:     fps: 30
15:04:16:     width: 1920, height: 1080
15:04:16:     preset: veryfast
15:04:16:     profile: high
15:04:16:     keyint: 60
15:04:16:     CBR: yes
15:04:16:     CFR: no
15:04:16:     max bitrate: 3000
15:04:16:     buffer size: 3000
15:04:16: ------------------------------------------
15:04:16: MMDeviceAudioSource: Frequency for device 'Speakers (Creative SB X-Fi)' is 384000, samples per sec is 48000
15:04:16: MMDeviceAudioSource: Frequency for device 'Microphone (Creative SB X-Fi)' is 384000, samples per sec is 48000
15:04:34: Total frames encoded: 522, total frames duplicated: 162 (31.03%)
15:04:34: Total frames rendered: 365, number of late frames: 157 (43.01%) (it's okay for some frames to be late)
15:04:34: 
15:04:34: Profiler time results:
15:04:34: 
15:04:34: ==============================================================
15:04:34: video thread frame - [100%] [avg time: 35.061 ms] [children: 97.9%] [unaccounted: 2.06%]
15:04:34: | scene->Preprocess - [97.9%] [avg time: 34.337 ms]
15:04:34: GPU download and conversion - [100%] [avg time: 12.076 ms] [children: 0.754%] [unaccounted: 99.2%]
15:04:34: | flush - [0.513%] [avg time: 0.062 ms]
15:04:34: | CopyResource - [0.157%] [avg time: 0.019 ms]
15:04:34: | conversion to 4:2:0 - [0.0828%] [avg time: 0.01 ms]
15:04:34: Convert444Threads - [100%] [avg time: 1.089 ms] [children: 99.3%] [unaccounted: 0.735%]
15:04:34: | Convert444toNV12 - [99.3%] [avg time: 1.081 ms]
15:04:34: encoder thread frame - [100%] [avg time: 1.596 ms]
15:04:34: ==============================================================
15:04:34: 
15:04:34: 
15:04:34: Profiler CPU results:
15:04:34: 
15:04:34: ==============================================================
15:04:34: video thread frame - [cpu time: avg 3.12 ms, total 1138.81 ms] [avg calls per frame: 1]
15:04:34: | scene->Preprocess - [cpu time: avg 2.735 ms, total 998.405 ms] [avg calls per frame: 1]
15:04:34: GPU download and conversion - [cpu time: avg 0.17 ms, total 62.401 ms] [avg calls per frame: 1]
15:04:34: | flush - [cpu time: avg 0.128 ms, total 46.8 ms] [avg calls per frame: 1]
15:04:34: | CopyResource - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
15:04:34: | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
15:04:34: Convert444Threads - [cpu time: avg 1.092 ms, total 764.404 ms] [avg calls per frame: 2]
15:04:34: | Convert444toNV12 - [cpu time: avg 1.092 ms, total 764.404 ms] [avg calls per frame: 2]
15:04:34: encoder thread frame - [cpu time: avg 1.162 ms, total 592.803 ms] [avg calls per frame: 1]
15:04:34: ==============================================================
15:04:34: 
15:04:34: =====Stream End: 2013-09-27, 15:04:34=================================================

Problem:
I stream at 1920x1080 30fps using monitor capture and aero disabled.
This has worked perfectly for many months.

However, about a week ago, the stream started dropping below 30 fps. (Most of the time, it captures only about 20-23 fps)
The slow capture speed happens even when OBS is in "preview" mode and I have no programs running except the plain windows desktop. During such times, graphical performance on the computer is heavily degraded including normal windows desktop graphics.

Since I have no games running nor is my CPU overloaded, I'm still not certain what is causing the problem:
6OI72WY.png


Strange info in the log?
Looking at the log file, it seems like each frame has an abnormally high scene->Preprocess time.

Final notes:
I don't think monitor capture is to blame. I have been using these exact monitor capture settings for months and everything has worked well until last week. (Example video of a working stream: http://www.twitch.tv/samuraidboy/c/2219085 )

If I uninstall my video drivers, reboot my system, then reinstall the video drivers, sometimes the problem goes away. However, the problem returns as soon as I restart my computer again.

Thus, I don't think this is a problem with OBS, but wondered if anyone had any ideas what might be causing the high scene->Preprocess time and the sluggish frame capture speed. Has anyone had recent issues with nvidia GTX drivers and streaming?

EDIT: I've also tried using Game Capture, but it also exhibits inconsistent and slow frame rates.
 

FerretBomb

Active Member
Monitor capture is to blame. Stop using it. It's terrible, and only meant as a last-resort measure.
For LoL, you should be using a Window Capture for the PVP.net client, and a Game Capture for the in-game executable. (Though it appears you know that with the two separate scenes there.)
 

dodgepong

Administrator
Community Helper
It does seem oddly high, though. Monitor capture is bad, but with Aero disabled it should still be more tolerable than that.

Perhaps it was a system update or a new graphics driver?
 

SamuraiD

New Member
FerretBomb said:
Monitor capture is to blame. Stop using it. It's terrible, and only meant as a last-resort measure.
For LoL, you should be using a Window Capture for the PVP.net client, and a Game Capture for the in-game executable. (Though it appears you know that with the two separate scenes there.)
Yes, I am aware. And no, monitor capture is thankfully not to blame here. As stated in my post, I have never had performance issues with monitor capture. Additionally, game capture shows the slow frame rate problem as well, so it's something other than the mode in which I am capturing.

dodgepong said:
It does seem oddly high, though. Monitor capture is bad, but with Aero disabled it should still be more tolerable than that.

Perhaps it was a system update or a new graphics driver?
Thanks for the suggestion.

It probably is a system/graphics driver issue, or some other configuration related to that. I've tried rolling back to video drivers from a few months ago to no avail, but I'll keep trying things.

Actually, I'm curious to know what exactly happens during the "scene->Preprocess" stage. It would be interesting to know so I would have a better idea how to track down the suspect.
 

SamuraiD

New Member
Fair enough.

Although, game capture is showing the same low framerate problem.

I'm able to temporarily solve the problem by uninstalling nvidia drivers, rebooting my machine, then reinstalling them. Haven't been able to narrow the problem further than that. Will post here if I find anything more.

Thanks everyone for the input and suggestions thus far.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
1080p on the 2500k can stress things out a little bit and cause FPS issues in OBS and some games (I know because I have a 2500k myself). I'd recommend downscaling a bit to reduce system load.
 

SamuraiD

New Member
Just an informational update here (in case someone else also has this problem and is searching for a solution).

This problem only happens 90% of the time now. 10% of the time, I can get things to work correctly by uninstalling and reinstalling the nvidia geforce drivers a bunch of times in a row.

When monitoring GPU usage with Process Explorer, there's some strange behavior.

Streaming CPU (when things are working correctly)
10w9V8U.png


Streaming GPU (when things are working correctly)
YwnAhhT.png



Streaming CPU (when the problem is occurring)
zZbw5VE.png


Streaming GPU (when the problem is occurring)
wJriu16.png


When the problem is occurring, my GPU usage goes to 100% when streaming, even if I have nothing else running.
In fact, I can see the GPU running at far higher utilization in games (100%), even when streaming at lower resolutions and using game capture.

When the problem is NOT occurring, streaming only incurs about a 20-50% GPU utilization and most games (using either monitor or game capture) only put my GPU at 50-70% utilization.

Still searching for a solution and will post here when I find it. :)
 
Top