I was playing Battlefield 4 tonight and I thought at first it was just the game as a lot of people were complaining about performance issues. I myself was playing it on low and it was just about unplayable. After I finished streaming tonight I decided to play it again while I wasn't streaming and it's about as smooth as Battlefield 3 is when I stream that.
Something else worth noting, whenever I tab out of the game (regardless of capture method) Battlefield 4 crashes with the below error dialog. Last time this happened I didn't even hook it, I simply started preview mode.
Looking at perfoverlay.drawgraph true, when OBS is running there are huge spikes in the graph, sometimes spiking from 10-15 to 200. I'm guessing this is frame time or the amount of time it takes to draw frames. FPS isn't as accurate, but it usually reflects these spikes. I go from about 40-60 to 20, sometimes 10, and occasionally 2-4.
I thought maybe this could be my processor getting pegged, as it's very close to 100% utilization, but it never reaches it. It usually sits at about 80-95%. Changing the priority of BF4 doesn't do anything.
Something else worth noting, whenever I tab out of the game (regardless of capture method) Battlefield 4 crashes with the below error dialog. Last time this happened I didn't even hook it, I simply started preview mode.

Looking at perfoverlay.drawgraph true, when OBS is running there are huge spikes in the graph, sometimes spiking from 10-15 to 200. I'm guessing this is frame time or the amount of time it takes to draw frames. FPS isn't as accurate, but it usually reflects these spikes. I go from about 40-60 to 20, sometimes 10, and occasionally 2-4.
Code:
08:53:43: Open Broadcaster Software v0.571b - 32bit (´・ω・`)
08:53:43: -------------------------------
08:53:43: CPU Name: AMD FX(tm)-8350 Eight-Core Processor
08:53:43: CPU Speed: 4214MHz
08:53:43: Physical Memory: 4095MB Total, 4095MB Free
08:53:43: stepping id: 0, model 2, family 15, type 0, extmodel 0, extfamily 3, HTT 1, logical cores 8, total cores 4
08:53:43: monitor 1: pos={0, 0}, size={1920, 1080}
08:53:43: monitor 2: pos={-1680, 0}, size={1680, 1050}
08:53:43: Windows Version: 6.1 Build 7601 S
08:53:43: Aero is Disabled
08:53:43: -------------------------------
08:53:43: OBS Modules:
08:53:43: Base Address Module
08:53:43: 013D0000 OBS.exe
08:53:43: 5C130000 OBSApi.dll
08:53:43: 5C570000 DShowPlugin.dll
08:53:43: 5C110000 GraphicsCapture.dll
08:53:43: 5C0F0000 NoiseGate.dll
08:53:43: 5C0D0000 PSVPlugin.dll
08:53:43: ------------------------------------------
08:53:43: Adapter 1
08:53:43: Video Adapter: AMD Radeon HD 7800 Series
08:53:43: Video Adapter Dedicated Video Memory: 2120388608
08:53:43: Video Adapter Shared System Memory: 2174513152
08:53:43: =====Stream Start: 2013-10-01, 08:53:43===============================================
08:53:43: Multithreaded optimizations: On
08:53:43: Base resolution: 1920x1080
08:53:43: Output resolution: 1280x720
08:53:43: ------------------------------------------
08:53:43: Loading up D3D10 on AMD Radeon HD 7800 Series...
08:53:43: ------------------------------------------
08:53:43: Audio Format: 48000hz
08:53:43: Playback device Default
08:53:43: ------------------------------------------
08:53:43: Using desktop audio input: Speakers (Auzentech X-Fi Forte)
08:53:43: Using 7.1 surround speaker setup
08:53:43: ------------------------------------------
08:53:43: Using auxilary audio input: Line 2 (Virtual Audio Cable)
08:53:43: ------------------------------------------
08:53:43: Audio Encoding: AAC
08:53:43: bitrate: 160
08:53:43: Using graphics capture
08:53:43: ------------------------------------------
08:53:43: Video Encoding: x264
08:53:43: fps: 30
08:53:43: width: 1280, height: 720
08:53:43: preset: veryfast
08:53:43: profile: high
08:53:43: keyint: 60
08:53:43: CBR: no
08:53:43: CFR: no
08:53:43: max bitrate: 3100
08:53:43: buffer size: 5000
08:53:43: quality: 9
08:53:43: ------------------------------------------
08:53:43: MMDeviceAudioSource: Frequency for device 'Speakers (Auzentech X-Fi Forte)' is 1536000, samples per sec is 48000
08:53:43: MMDeviceAudioSource: Frequency for device 'Line 2 (Virtual Audio Cable)' is 352800, samples per sec is 44100
08:53:49: Total frames encoded: 144, total frames duplicated: 1 (0.69%)
08:53:49: Total frames rendered: 148, number of late frames: 0 (0.00%) (it's okay for some frames to be late)
08:53:49:
08:53:49: Profiler time results:
08:53:49:
08:53:49: ==============================================================
08:53:49: video thread frame - [100%] [avg time: 0.725 ms] [children: 0.276%] [unaccounted: 99.7%]
08:53:49: | scene->Preprocess - [0.276%] [avg time: 0.002 ms]
08:53:49: GPU download and conversion - [100%] [avg time: 0.109 ms] [children: 89%] [unaccounted: 11%]
08:53:49: | flush - [75.2%] [avg time: 0.082 ms]
08:53:49: | CopyResource - [10.1%] [avg time: 0.011 ms]
08:53:49: | conversion to 4:2:0 - [3.67%] [avg time: 0.004 ms]
08:53:49: Convert444Threads - [100%] [avg time: 0.553 ms] [children: 98.7%] [unaccounted: 1.27%]
08:53:49: | Convert444toNV12 - [98.7%] [avg time: 0.546 ms]
08:53:49: encoder thread frame - [100%] [avg time: 1.718 ms]
08:53:49: ==============================================================
08:53:49:
08:53:49:
08:53:49: Profiler CPU results:
08:53:49:
08:53:49: ==============================================================
08:53:49: video thread frame - [cpu time: avg 0.21 ms, total 31.2 ms] [avg calls per frame: 1]
08:53:49: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
08:53:49: GPU download and conversion - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
08:53:49: | flush - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
08:53:49: | CopyResource - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
08:53:49: | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
08:53:49: Convert444Threads - [cpu time: avg 0.234 ms, total 62.4 ms] [avg calls per frame: 2]
08:53:49: | Convert444toNV12 - [cpu time: avg 0.234 ms, total 62.4 ms] [avg calls per frame: 2]
08:53:49: encoder thread frame - [cpu time: avg 1.536 ms, total 202.801 ms] [avg calls per frame: 1]
08:53:49: ==============================================================
08:53:49:
08:53:49: =====Stream End: 2013-10-01, 08:53:49=================================================
08:53:50: =====Stream Start: 2013-10-01, 08:53:50===============================================
08:53:50: Multithreaded optimizations: On
08:53:50: Base resolution: 1920x1080
08:53:50: Output resolution: 1280x720
08:53:50: ------------------------------------------
08:53:50: Loading up D3D10 on AMD Radeon HD 7800 Series...
08:53:50: ------------------------------------------
08:53:50: Audio Format: 48000hz
08:53:50: Playback device Default
08:53:50: ------------------------------------------
08:53:50: Using desktop audio input: Speakers (Auzentech X-Fi Forte)
08:53:50: Using 7.1 surround speaker setup
08:53:50: ------------------------------------------
08:53:50: Using auxilary audio input: Line 2 (Virtual Audio Cable)
08:53:50: ------------------------------------------
08:53:50: Audio Encoding: AAC
08:53:50: bitrate: 160
08:53:50: Using graphics capture
08:53:50: ------------------------------------------
08:53:50: Video Encoding: x264
08:53:50: fps: 30
08:53:50: width: 1280, height: 720
08:53:50: preset: veryfast
08:53:50: profile: high
08:53:50: keyint: 60
08:53:50: CBR: no
08:53:50: CFR: no
08:53:50: max bitrate: 3100
08:53:50: buffer size: 5000
08:53:50: quality: 9
08:53:50: ------------------------------------------
08:53:50: MMDeviceAudioSource: Frequency for device 'Speakers (Auzentech X-Fi Forte)' is 1536000, samples per sec is 48000
08:53:50: MMDeviceAudioSource: Frequency for device 'Line 2 (Virtual Audio Cable)' is 352800, samples per sec is 44100
08:53:57: SharedTexCapture hooked
08:54:00: GraphicsCaptureSource::NewCapture: eliminating old capture
08:54:00: SharedTexCapture hooked
08:54:00: GraphicsCaptureSource::NewCapture: eliminating old capture
08:54:00: SharedTexCapture hooked
08:55:49: Exit signal received, terminating capture
08:57:24: Total frames encoded: 6394, total frames duplicated: 134 (2.10%)
08:57:24: Number of frames skipped due to encoder lag: 2 (0.03%)
08:57:24: Total frames rendered: 6344, number of late frames: 16 (0.25%) (it's okay for some frames to be late)
08:57:24:
08:57:24: Profiler time results:
08:57:24:
08:57:24: ==============================================================
08:57:24: video thread frame - [100%] [avg time: 0.95 ms] [children: 0.316%] [unaccounted: 99.7%]
08:57:24: | scene->Preprocess - [0.316%] [avg time: 0.003 ms]
08:57:24: GPU download and conversion - [100%] [avg time: 0.442 ms] [children: 85.1%] [unaccounted: 14.9%]
08:57:24: | flush - [62%] [avg time: 0.274 ms]
08:57:24: | CopyResource - [21.9%] [avg time: 0.097 ms]
08:57:24: | conversion to 4:2:0 - [1.13%] [avg time: 0.005 ms]
08:57:24: Convert444Threads - [100%] [avg time: 0.567 ms] [children: 98.6%] [unaccounted: 1.41%]
08:57:24: | Convert444toNV12 - [98.6%] [avg time: 0.559 ms]
08:57:24: encoder thread frame - [100%] [avg time: 1.736 ms]
08:57:24: ==============================================================
08:57:24:
08:57:24:
08:57:24: Profiler CPU results:
08:57:24:
08:57:24: ==============================================================
08:57:24: video thread frame - [cpu time: avg 0.122 ms, total 780.005 ms] [avg calls per frame: 1]
08:57:24: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
08:57:24: GPU download and conversion - [cpu time: avg 0.024 ms, total 156.001 ms] [avg calls per frame: 1]
08:57:24: | flush - [cpu time: avg 0.022 ms, total 140.401 ms] [avg calls per frame: 1]
08:57:24: | CopyResource - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
08:57:24: | conversion to 4:2:0 - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
08:57:24: Convert444Threads - [cpu time: avg 0.277 ms, total 3510.02 ms] [avg calls per frame: 2]
08:57:24: | Convert444toNV12 - [cpu time: avg 0.274 ms, total 3478.82 ms] [avg calls per frame: 2]
08:57:24: encoder thread frame - [cpu time: avg 1.175 ms, total 7503.65 ms] [avg calls per frame: 1]
08:57:24: ==============================================================
08:57:24:
08:57:24: =====Stream End: 2013-10-01, 08:57:24=================================================
08:59:44: =====Stream Start: 2013-10-01, 08:59:44===============================================
08:59:44: Multithreaded optimizations: On
08:59:44: Base resolution: 1920x1080
08:59:44: Output resolution: 1280x720
08:59:44: ------------------------------------------
08:59:44: Loading up D3D10 on AMD Radeon HD 7800 Series...
08:59:45: ------------------------------------------
08:59:45: Audio Format: 48000hz
08:59:45: Playback device Default
08:59:45: ------------------------------------------
08:59:45: Using desktop audio input: Speakers (Auzentech X-Fi Forte)
08:59:45: Using 7.1 surround speaker setup
08:59:45: ------------------------------------------
08:59:45: Using auxilary audio input: Line 2 (Virtual Audio Cable)
08:59:45: ------------------------------------------
08:59:45: Audio Encoding: AAC
08:59:45: bitrate: 160
08:59:45: Using Monitor Capture
08:59:45: ------------------------------------------
08:59:45: Video Encoding: x264
08:59:45: fps: 30
08:59:45: width: 1280, height: 720
08:59:45: preset: veryfast
08:59:45: profile: high
08:59:45: keyint: 60
08:59:45: CBR: no
08:59:45: CFR: no
08:59:45: max bitrate: 3100
08:59:45: buffer size: 5000
08:59:45: quality: 9
08:59:45: ------------------------------------------
08:59:45: MMDeviceAudioSource: Frequency for device 'Speakers (Auzentech X-Fi Forte)' is 1536000, samples per sec is 48000
08:59:45: MMDeviceAudioSource: Frequency for device 'Line 2 (Virtual Audio Cable)' is 352800, samples per sec is 44100
09:04:35: ++++++++++++++++++++++++++++++++++++++++++++++++++++++
09:04:35: New Scene
09:04:35: Using graphics capture
09:04:35: SharedTexCapture hooked
09:04:56: Exit signal received, terminating capture
09:05:10: SharedTexCapture hooked
09:05:23: GraphicsCaptureSource::NewCapture: eliminating old capture
Warning -- SharedTexCapture::Init: Could not open file mapping: 2
09:05:24: SharedTexCapture hooked
09:07:23: Exit signal received, terminating capture
09:07:50: Total frames encoded: 14538, total frames duplicated: 965 (6.64%)
09:07:50: Number of frames skipped due to encoder lag: 11 (0.08%)
09:07:50: Total frames rendered: 14287, number of late frames: 91 (0.64%) (it's okay for some frames to be late)
09:07:50:
09:07:50: Profiler time results:
09:07:50:
09:07:50: ==============================================================
09:07:50: video thread frame - [100%] [avg time: 6.103 ms] [children: 61.4%] [unaccounted: 38.6%]
09:07:50: | scene->Preprocess - [61.4%] [avg time: 3.748 ms]
09:07:50: GPU download and conversion - [100%] [avg time: 0.631 ms] [children: 87.8%] [unaccounted: 12.2%]
09:07:50: | flush - [75.4%] [avg time: 0.476 ms]
09:07:50: | CopyResource - [11.3%] [avg time: 0.071 ms]
09:07:50: | conversion to 4:2:0 - [1.11%] [avg time: 0.007 ms]
09:07:50: Convert444Threads - [100%] [avg time: 0.656 ms] [children: 98.2%] [unaccounted: 1.83%]
09:07:50: | Convert444toNV12 - [98.2%] [avg time: 0.644 ms]
09:07:50: encoder thread frame - [100%] [avg time: 1.718 ms]
09:07:50: ==============================================================
09:07:50:
09:07:50:
09:07:50: Profiler CPU results:
09:07:50:
09:07:50: ==============================================================
09:07:50: video thread frame - [cpu time: avg 4.09 ms, total 58438 ms] [avg calls per frame: 1]
09:07:50: | scene->Preprocess - [cpu time: avg 3.145 ms, total 44943.9 ms] [avg calls per frame: 1]
09:07:50: GPU download and conversion - [cpu time: avg 0.058 ms, total 842.403 ms] [avg calls per frame: 1]
09:07:50: | flush - [cpu time: avg 0.038 ms, total 546.002 ms] [avg calls per frame: 1]
09:07:50: | CopyResource - [cpu time: avg 0.005 ms, total 78 ms] [avg calls per frame: 1]
09:07:50: | conversion to 4:2:0 - [cpu time: avg 0.002 ms, total 31.201 ms] [avg calls per frame: 1]
09:07:50: Convert444Threads - [cpu time: avg 0.474 ms, total 13540.9 ms] [avg calls per frame: 2]
09:07:50: | Convert444toNV12 - [cpu time: avg 0.47 ms, total 13416.1 ms] [avg calls per frame: 2]
09:07:50: encoder thread frame - [cpu time: avg 1.226 ms, total 17815.3 ms] [avg calls per frame: 1]
09:07:50: ==============================================================
09:07:50:
09:07:50: =====Stream End: 2013-10-01, 09:07:50=================================================
Last game capture log:
2013-10-01, 09:05:09: we're booting up:
09:05:09: DXGI Present
09:05:09: (half life scientist) everything.. seems to be in order
09:05:10: DXGI: Found D3D 11
09:05:10: setting up d3d11 data
09:05:10: ---------------------- Cleared D3D11 Capture ----------------------
09:05:10: found dxgi format (dx11) of: 28, size: {1920, 1080}, multisampled: false
09:05:10: DoD3D11Hook: success
09:05:10: successfully capturing d3d11 frames via GPU
09:05:23: ---------------------- Cleared D3D11 Capture ----------------------
09:05:23: DXGI: Found D3D 11
09:05:23: setting up d3d11 data
09:05:23: ---------------------- Cleared D3D11 Capture ----------------------
09:05:23: DoD3D11Hook: success
09:05:23: ---------------------- Cleared D3D11 Capture ----------------------
09:05:24: DXGI: Found D3D 11
09:05:24: setting up d3d11 data
09:05:24: ---------------------- Cleared D3D11 Capture ----------------------
09:05:24: DoD3D11Hook: success
09:05:24: successfully capturing d3d11 frames via GPU
09:07:08: ---------------------- Cleared D3D11 Capture ----------------------
I thought maybe this could be my processor getting pegged, as it's very close to 100% utilization, but it never reaches it. It usually sits at about 80-95%. Changing the priority of BF4 doesn't do anything.

