Bug Report FPS immediately drops

sckfrts

New Member
Hi,

I recently tried out using OBS (right after the .452A update dropped) and am having some issues with framerate.

When starting up the stream in preview using gamesource, the fps is as I set it in the options, generally 30. as soon as I start to move my character around within a game the fps drops drastically to ~15

I tried alot of different settings, more than in the attached log, but all of the had the same problem even the lowest possible setting I could make 640x380//0 quality//30 fps//ultra fast x264 etc. But when lowering the resolutions the fps dropped to higher numbers ie. if I ran it at 60 fps with 640x380 the fps when moving would drop to ~40.

Here is some of the logs:

Code:
Open Broadcaster Software v0.452a - 32bit (´・ω・`)
-------------------------------
CPU Name: Intel(R) Core(TM) i7 CPU         965  @ 3.20GHz
CPU Speed: 3207MHz
Physical Memory:  4087MB Total, 1216MB Free
stepping id: 4, model 10, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
------------------------------------------
Adapter 1
  Video Adapter: NVIDIA GeForce GTX 295
  Video Adapter Dedicated Video Memory: 919994368
  Video Adapter Shared System Memory: 1874423808
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1920x1080
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1920, height: 1080
    preset: medium
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 4
------------------------------------------
using shared texture capture
Using Send Buffer Size: 5840
bufferTime: 2469, outputRateWindowTime: 1000, dropThreshold: 2969
Total frames rendered: 442, number of frames that lagged: 112 (25.34%) (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: 1920x1080
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1920, height: 1080
    preset: medium
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 4
------------------------------------------
using shared texture capture
Total frames rendered: 882, number of frames that lagged: 112 (12.70%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: medium
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 4
------------------------------------------
using shared texture capture
Total frames rendered: 2338, number of frames that lagged: 92 (3.93%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 10
------------------------------------------
using shared texture capture
Total frames rendered: 675, number of frames that lagged: 118 (17.48%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 10
------------------------------------------
using shared texture capture
Total frames rendered: 57, number of frames that lagged: 0 (0.00%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 10
------------------------------------------
using shared texture capture
using shared texture capture
Total frames rendered: 806, number of frames that lagged: 7 (0.87%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: veryfast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 10
------------------------------------------
using shared texture capture
Total frames rendered: 841, number of frames that lagged: 141 (16.77%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: ultrafast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 0
------------------------------------------
using shared texture capture
Total frames rendered: 2735, number of frames that lagged: 146 (5.34%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 640x360
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 640, height: 360
    preset: ultrafast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 0
------------------------------------------
using shared texture capture
Total frames rendered: 2708, number of frames that lagged: 51 (1.88%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 640x360
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 640, height: 360
    preset: ultrafast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 0
------------------------------------------
using shared texture capture
Total frames rendered: 6501, number of frames that lagged: 292 (4.49%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: Off
  Base resolution: 1920x1080
  Output resolution: 640x360
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 640, height: 360
    preset: ultrafast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 0
------------------------------------------
using shared texture capture
Total frames rendered: 21339, number of frames that lagged: 818 (3.83%) (it's okay for some frames to lag)
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: Off
  Base resolution: 1920x1080
  Output resolution: 1920x1080
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 60
    width: 1920, height: 1080
    preset: ultrafast
    CBR: no
    max bitrate: 2000
    buffer size: 2000
    quality: 0
------------------------------------------
using shared texture capture
Total frames rendered: 1295, number of frames that lagged: 1193 (92.12%) (it's okay for some frames to lag)
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 11.215 ms] [avg calls per frame: 1] [children: 96.6%] [unaccounted: 3.37%]
| scene->Preprocess - [0.00892%] [avg time: 0.001 ms] [avg calls per frame: 1]
| video encoding and uploading - [96.6%] [avg time: 10.836 ms] [avg calls per frame: 1] [children: 96.5%] [unaccounted: 0.0802%]
| | CopyResource - [88.2%] [avg time: 9.897 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [1.85%] [avg time: 0.207 ms] [avg calls per frame: 0]
| | call to encoder - [6.44%] [avg time: 0.722 ms] [avg calls per frame: 0]
| | sending stuff out - [0.00892%] [avg time: 0.001 ms] [avg calls per frame: 0]
==============================================================

i'm pretty newb at broadcasting, but I've used x split successfully at 30fps and 720p without much issue so I was pretty surprised when 380 didn't really work.

any-who hope i can fix this because I'm really liking the program!
 

Warchamp7

Forum Admin
First thing that stands out to me is you have your preset at medium. You should leave that at veryfast
 

sckfrts

New Member
I did for that period of testing, I changed it back and forth alot from medium to veryfast in that log you can see the 380 resolution test was set to veryfast and it still did the same thing
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
you are getting an unusual number of lagged frames, and this is really unusual especially for game capture because game capture isn't really supposed to be using any CPU, nor should it cause any frame lag, nor should it even affect your game at all.

are you running any other game capturing software, such as fraps, or any sort of overlay software, or anything like that at all?
 

sckfrts

New Member
nope, even to be sure I did a clean boot at one point and just opened up the game and obs but it still happened. :(

*Edit*
I just realized that you may be misunderstanding whats happening a little Jim, probably due to my incoherent babblings heh 1am forgive me.

anyway,

the game itself does not lag or lose fps, Im taking the fps on OBS itself when it is broadcasting (the little readout at the bottom right of the window) its steady when in game I am not moving but when I start to walk around the fps on the readout drops drastically and it becomes noticeable in the broadcast. ie from 30 to ~ 10 - 15 even at incredibly low resolutions that my rig should be able to handle.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
What game are you capturing? Also, do you have any other sources in your scene?
 

sckfrts

New Member
at first i had my webcam hooked up but i took it off when things were not working too well, other than that no other sources are hooked up. also I am capturing torchlight 2.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I'm not entirely sure what could be causing it at the moment.. If you find out what specifically is the cause, let me know. Maybe drop by chat some time as well
 

sckfrts

New Member
I think I figured it out:

I started fiddling with the in-game settings and it dawned on me that maybe this program i use called windowed borderless gaming was screwing it up somehow (it forces all windowed games to run without those pesky borders!) so I proceeded to test the game with it off.

I ran it in all the modes that TL2 supported and it appears as though it doesn't receive a fps loss when it is in windowed mode WITH borders. Fullscreen and windowed fullscreen as set in the torchlight menu both caused the fps to grind to a halt at 9 FPS, the strange thing is that this was constant from the moment i started the game up. With the program I was using (windowed borderless gaming) the stream ran fine when I was not interacting with the screen.

heres a log of 1) fullscreen 2) windowed with borders 3) windowed fullscreen:

Code:
Open Broadcaster Software v0.452a - 32bit (´・ω・`)
-------------------------------
CPU Name: Intel(R) Core(TM) i7 CPU         965  @ 3.20GHz
CPU Speed: 3208MHz
Physical Memory:  4087MB Total, 1264MB Free
stepping id: 4, model 10, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
------------------------------------------
Adapter 1
  Video Adapter: NVIDIA GeForce GTX 295
  Video Adapter Dedicated Video Memory: 919994368
  Video Adapter Shared System Memory: 1874423808
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 1280x720
------------------------------------------
Loading up D3D10...
Using 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: MP3
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: superfast
    CBR: no
    max bitrate: 1500
    buffer size: 1750
    quality: 10
------------------------------------------
using shared texture capture
Using Send Buffer Size: 1460
bufferTime: 2222, outputRateWindowTime: 1000, dropThreshold: 2722
Total frames rendered: 1253, number of frames that lagged: 1250 (99.76%) (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 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: MP3
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: superfast
    CBR: no
    max bitrate: 1500
    buffer size: 1750
    quality: 10
------------------------------------------
using shared texture capture
Using Send Buffer Size: 1460
bufferTime: 2222, outputRateWindowTime: 1000, dropThreshold: 2722
Total frames rendered: 3077, number of frames that lagged: 110 (3.57%) (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 5.1 speaker setup
------------------------------------------
Using auxilary audio input: Headset Microphone (Logitech USB Headset)
------------------------------------------
Audio Encoding: MP3
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 1280, height: 720
    preset: superfast
    CBR: no
    max bitrate: 1500
    buffer size: 1750
    quality: 10
------------------------------------------
using shared texture capture
Using Send Buffer Size: 1460
bufferTime: 2192, outputRateWindowTime: 1000, dropThreshold: 2692
Total frames rendered: 643, number of frames that lagged: 639 (99.38%) (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: 54.155 ms] [avg calls per frame: 1] [children: 95.9%] [unaccounted: 4.07%]
| scene->Preprocess - [0.00554%] [avg time: 0.003 ms] [avg calls per frame: 1]
| video encoding and uploading - [95.9%] [avg time: 51.947 ms] [avg calls per frame: 1] [children: 95.3%] [unaccounted: 0.652%]
| | CopyResource - [92.5%] [avg time: 50.098 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [0.0702%] [avg time: 0.038 ms] [avg calls per frame: 0]
| | call to encoder - [2.61%] [avg time: 1.412 ms] [avg calls per frame: 0]
| | sending stuff out - [0.0849%] [avg time: 0.046 ms] [avg calls per frame: 0]
==============================================================

it worked smooth as butter in windowed mode, its just a shame i have to have those ugly borders =/ but oh well! at least it works now.
 

Klacksaft

New Member
I am having the exact same issue, as soon as I try to stream something in fullscreen or borderless windowed mode, I drop to 6-12 fps, from a constant 30 in windowed mode. The first stream in the log is in fullscreen, the second in windowed mode until the last 5 seconds or so where I switch back to fullscreen.


Code:
Open Broadcaster Software v0.448a - 64bit ( ^ω^)
-------------------------------
CPU Name: Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
CPU Speed: 2793MHz
Physical Memory:  8151MB Total, 3841MB Free
stepping id: 5, model 14, family 6, type 0, extmodel 0, extfamily 0, HTT 1, logical cores 8, total cores 4
------------------------------------------
Adapter 1
  Video Adapter: NVIDIA GeForce GTX 260 
  Video Adapeter Dedicated Video Memory: 1849032704
  Video Adapeter Shared System Memory: 2415808512
Send Buffer Size: 1460
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 960x540
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Mikrofon (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 960, height: 540
    quality: 5
    preset: ultrafast
    i444: no
    max bitrate: 2500
    buffer size: 3000
------------------------------------------
Total frames rendered: 1673, number of frames that lagged: 985 (58.88%) (it's okay for some frames to lag)
Number of b-frames dropped: 19, Number of p-frames dropped: 0
=====Stream End=======================================================================
=====Stream Start=====================================================================
  Multithreaded optimizations: On
  Base resolution: 1920x1080
  Output resolution: 960x540
------------------------------------------
Loading up D3D10...
------------------------------------------
Using auxilary audio input: Mikrofon (Realtek High Definition Audio)
------------------------------------------
Audio Encoding: AAC
    bitrate: 128
------------------------------------------
Video Encoding: x264
    fps: 30
    width: 960, height: 540
    quality: 5
    preset: ultrafast
    i444: no
    max bitrate: 2500
    buffer size: 3000
------------------------------------------
Total frames rendered: 4949, number of frames that lagged: 81 (1.64%) (it's okay for some frames to lag)
=====Stream End=======================================================================

Profiler results:

==============================================================
frame - [100%] [avg time: 26.993 ms] [avg calls per frame: 1] [children: 98.3%] [unaccounted: 1.67%]
| scene->Preprocess - [48.6%] [avg time: 13.124 ms] [avg calls per frame: 1]
| video encoding and uploading - [49.7%] [avg time: 13.417 ms] [avg calls per frame: 1] [children: 49.6%] [unaccounted: 0.104%]
| | CopyResource - [47.1%] [avg time: 12.711 ms] [avg calls per frame: 0]
| | conversion to 4:2:0 - [0.141%] [avg time: 0.038 ms] [avg calls per frame: 0]
| | call to encoder - [2.37%] [avg time: 0.64 ms] [avg calls per frame: 0]
==============================================================
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
According to the logs, it's spending all your time trying to copy the data from the GPU.. this could be a graphics card related issue. The app renders everything on the GPU for image processing and conversions, and then copies it off the GPU when complete. I'm not sure about the specs of those video cards though.

To find out, try turning down your resolution/FPS and seeing how that affects the result. If it does, then it's probably the GPU causing the slowdown. Not entirely sure though
 

Klacksaft

New Member
I tried changing both my desktop and in-game resolution as you suggested, I still hovered around 10 fps, with the occasional spike towards 15 or so.
 

Tak0r

Member
Are you using a second monitor to check the fps? I have a similar behaviour in Rift when i tab to desktop the game throttles down pretty much to about 10-15 fps too. Maybe TL does the same thing when it's not the app in the foreground!
Do you expirience any lag when you actually play? or just when you check your fps in obs while tabbing out of the Game?
 

Klacksaft

New Member
Yes, I keep the OBS window on a separate monitor to the game, the fps goes back to 30 if I tab out of the game. The fps drop is during gameplay and most menus (I go up to 20 fps in the menu of "Of Orcs and Men")
 

sckfrts

New Member
I get the exact same problem, the fps drops when i focus on the window of the game, when I de-focus the fps returns to normal (whatever I set it at in obs)

I recently tried disabling my second monitor as well as SLI but the same thing still happened. When the window focus is on anything but the game the capture looks smooth as butter unless its in bordered window mode (in this case even if I am focused on the game or another window it remains smooth) really cant think of anything else to try to fix it :(
 

Tak0r

Member
Interesting, maybe drop by chat if you have time when Jim is around and try to live debug it with him.
He's normally awesomely helpful.
 
Top