Question / Help Optimizing Battlefield 4 Streaming

defterOG

New Member
hey guys,

a recent GPU upgrade (GTX670 -> GTX670 SLI) has been allowing me to play BF4 on ultra settings but, it seems like streaming while playing has been taking a bigger toll on my CPU because of the higher graphics quality.

i currently have my i7 3770k overclocked @ 4.6GHz and i've been getting some noticeable FPS drops during intense graphical scenes such as my tank blowing up. i was wondering what would be the ideal way to avoid such FPS drops?

i've thought about overclocking the CPU a bit further to around 4.8GHz as i do have the headroom but, i'd like to avoid this if at all possible. i've also overclocked my RAM to 2400MHz but, i wasn't sure if this would help streaming capabilities (if it does, which would be the bigger contributor? latency timings? or just pure frequency?).

here's my log just in case you guys can catch anything odd.

thanks!

Code:
02:04:33: Open Broadcaster Software v0.584b - 64bit ( ^ω^)
02:04:33: -------------------------------
02:04:33: CPU Name: Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz
02:04:33: CPU Speed: 3500MHz
02:04:33: Physical Memory:  8137MB Total, 4492MB Free
02:04:33: stepping id: 9, model 58, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 8, total cores 4
02:04:33: monitor 1: pos={0, 0}, size={1920, 1080}
02:04:33: Windows Version: 6.2 Build 9200 
02:04:33: Aero is Enabled
02:04:33: -------------------------------
02:04:33: OBS Modules:
02:04:33: Base Address     Module
02:04:33: 00000000DD070000 OBS.exe
02:04:33: 000000001C4D0000 OBSApi.dll
02:04:33: 0000000027300000 DShowPlugin.dll
02:04:33: 00000000277D0000 GraphicsCapture.dll
02:04:33: 00000000272E0000 NoiseGate.dll
02:04:33: 0000000026AE0000 PSVPlugin.dll
02:04:33: ------------------------------------------
02:04:33: Adapter 1
02:04:33:   Video Adapter: NVIDIA GeForce GTX 670
02:04:33:   Video Adapter Dedicated Video Memory: 2047537152
02:04:33:   Video Adapter Shared System Memory: 2147807232
02:04:33:   Video Adapter Output 1: pos={0, 0}, size={1920, 1080}, attached=true
02:04:33: =====Stream Start: 2013-12-04, 02:04:33===============================================
02:04:33:   Multithreaded optimizations: On
02:04:33:   Base resolution: 1920x1080
02:04:33:   Output resolution: 1280x720
02:04:33: ------------------------------------------
02:04:33: Loading up D3D10 on NVIDIA GeForce GTX 670...
02:04:33: ------------------------------------------
02:04:33: Audio Format: 44100hz
02:04:33: Playback device Default
02:04:33: ------------------------------------------
02:04:33: Using desktop audio input: Line Out (2- Forte)
02:04:33: ------------------------------------------
02:04:33: Audio Encoding: AAC
02:04:33:     bitrate: 128
02:04:33: Using graphics capture
02:04:33: Scene buffering time set to 400
02:04:33: ------------------------------------------
02:04:33: Video Encoding: x264
02:04:33:     fps: 59
02:04:33:     width: 1280, height: 720
02:04:33:     preset: veryfast
02:04:33:     profile: high
02:04:33:     keyint: 250
02:04:33:     CBR: no
02:04:33:     CFR: no
02:04:33:     max bitrate: 3350
02:04:33:     buffer size: 3350
02:04:33:     quality: 9
02:04:33: ------------------------------------------
02:04:33: MMDeviceAudioSource: Frequency for device 'Line Out (2- Forte)' is 352800, samples per sec is 44100
02:04:34: SharedTexCapture hooked
02:04:34: GraphicsCaptureSource::NewCapture:  eliminating old capture
02:04:34: SharedTexCapture hooked
02:04:34: GraphicsCaptureSource::NewCapture:  eliminating old capture
02:04:34: SharedTexCapture hooked
02:04:35: Using RTMP service: Twitch / Justin.tv
02:04:35:   Server selection: rtmp://live-lax.justin.tv/app
02:04:35:   Interface: Intel(R) 82579V Gigabit Network Connection (ethernet, 1000 mbps)
02:04:35: Completed handshake with rtmp://live-lax.justin.tv/app in 43 ms.
02:04:35: SO_SNDBUF was at 65536
02:04:35: SO_SNDBUF is now 65536
02:04:36: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 131072 (buffer: 15265 / 444416)
02:04:45: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 262144 (buffer: 0 / 444416)
02:05:05: RTMPPublisher::SocketLoop: Increasing send buffer to ISB 524288 (buffer: 0 / 444416)
02:27:29: GraphicsCaptureSource::NewCapture:  eliminating old capture
02:27:29: SharedTexCapture hooked
02:27:35: Total frames encoded: 81497, total frames duplicated: 423 (0.52%)
02:27:35: Total frames rendered: 81449, number of late frames: 19 (0.02%) (it's okay for some frames to be late)
02:27:35: RTMPPublisher::SocketLoop: Graceful loop exit
02:27:35: Average send payload: 7694 bytes, average send interval: 18 ms
02:27:35: Number of times waited to send: 0, Waited for a total of 0 bytes
02:27:35: Number of b-frames dropped: 0 (0%), Number of p-frames dropped: 0 (0%), Total 0 (0%)
02:27:35: Number of bytes sent: 583664421
02:27:35: 
02:27:35: Profiler time results:
02:27:35: 
02:27:35: ==============================================================
02:27:35: video thread frame - [100%] [avg time: 0.606 ms] [children: 38.1%] [unaccounted: 61.9%]
02:27:35: | scene->Preprocess - [0.165%] [avg time: 0.001 ms]
02:27:35: | GPU download and conversion - [38%] [avg time: 0.23 ms] [children: 10.1%] [unaccounted: 27.9%]
02:27:35: | | flush - [6.93%] [avg time: 0.042 ms]
02:27:35: | | CopyResource - [2.97%] [avg time: 0.018 ms]
02:27:35: | | conversion to 4:2:0 - [0.165%] [avg time: 0.001 ms]
02:27:35: Convert444Threads - [100%] [avg time: 0.348 ms] [children: 99.4%] [unaccounted: 0.575%]
02:27:35: | Convert444toNV12 - [99.4%] [avg time: 0.346 ms]
02:27:35: encoder thread frame - [100%] [avg time: 0.757 ms]
02:27:35: ==============================================================
02:27:35: 
02:27:35: 
02:27:35: Profiler CPU results:
02:27:35: 
02:27:35: ==============================================================
02:27:35: video thread frame - [cpu time: avg 0.046 ms, total 3796.88 ms] [avg calls per frame: 1]
02:27:35: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
02:27:35: | GPU download and conversion - [cpu time: avg 0.013 ms, total 1062.5 ms] [avg calls per frame: 1]
02:27:35: | | flush - [cpu time: avg 0.007 ms, total 609.375 ms] [avg calls per frame: 1]
02:27:35: | | CopyResource - [cpu time: avg 0.001 ms, total 156.25 ms] [avg calls per frame: 1]
02:27:35: | | conversion to 4:2:0 - [cpu time: avg 0 ms, total 31.25 ms] [avg calls per frame: 1]
02:27:35: Convert444Threads - [cpu time: avg 0.148 ms, total 24156.3 ms] [avg calls per frame: 2]
02:27:35: | Convert444toNV12 - [cpu time: avg 0.147 ms, total 24062.5 ms] [avg calls per frame: 2]
02:27:35: encoder thread frame - [cpu time: avg 0.09 ms, total 7375 ms] [avg calls per frame: 1]
02:27:35: ==============================================================
02:27:35: 
02:27:35: =====Stream End: 2013-12-04, 02:27:35=================================================


Last game capture log:
2013-12-04, 02:04:33: we're booting up: 
02:04:33: D3D9 Present
02:04:33: DXGI Present
02:04:33: (half life scientist) everything..  seems to be in order
02:04:34: DXGI: Found D3D 11
02:04:34: setting up d3d11 data
02:04:34: ---------------------- Cleared D3D11 Capture ----------------------
02:04:34: found dxgi format (dx11) of: 28, size: {1280, 720}, multisampled: false
02:04:34: DoD3D11Hook: success
02:04:34: successfully capturing d3d11 frames via GPU
02:04:34: ---------------------- Cleared D3D11 Capture ----------------------
02:04:34: DXGI: Found D3D 11
02:04:34: setting up d3d11 data
02:04:34: ---------------------- Cleared D3D11 Capture ----------------------
02:04:34: found dxgi format (dx11) of: 28, size: {1920, 1080}, multisampled: false
02:04:34: DoD3D11Hook: success
02:04:34: ---------------------- Cleared D3D11 Capture ----------------------
02:04:34: DXGI: Found D3D 11
02:04:34: setting up d3d11 data
02:04:34: ---------------------- Cleared D3D11 Capture ----------------------
02:04:34: DoD3D11Hook: success
02:04:34: successfully capturing d3d11 frames via GPU
02:27:29: ---------------------- Cleared D3D11 Capture ----------------------
02:27:29: DXGI: Found D3D 11
02:27:29: setting up d3d11 data
02:27:29: ---------------------- Cleared D3D11 Capture ----------------------
02:27:29: found dxgi format (dx11) of: 28, size: {1280, 720}, multisampled: false
02:27:29: DoD3D11Hook: success
02:27:29: successfully capturing d3d11 frames via GPU
02:27:35: stop requested, terminating d3d11 capture
02:27:35: ---------------------- Cleared D3D11 Capture ----------------------

EDIT: here's the archive of the stream regarding the log file: http://www.twitch.tv/deftergaming/b/484851319
 

Bonius

New Member
I have a nearly identical setup as you, what helped me was disabling core parking and setting the render ahead to 3. I'm running everything just fine with vanilla settings (3.9ghz on the CPU, no speed stepping) on ultra.

However, I do have stream lag every so often - still trying to find the cause of this since it seems to be on Twitch's end. CPU never goes above 70%, GPU's are chugging away nicely at 45-50%.
 

defterOG

New Member
thanks for your reply,

yeah, i guess i could try setting the pre-rendered frames to 3 but, i'm afraid it might introduce input lag as it did in BF3. i'll definitely go ahead and try setting it with the in-game command as well as the nvidia control panel though.

just a quick question, which drivers are you using? 331.82 WHQL gave a weird stuttering effect on the stream every second or so.
 

Sapiens

Forum Moderator
BF4 is an extremely demanding game, and especially with SLI making your CPU the bottleneck it will be quite difficult to stream with a 1PC setup. You should look into using QuickSync instead.
 

defterOG

New Member
Sapiens said:
BF4 is an extremely demanding game, and especially with SLI making your CPU the bottleneck it will be quite difficult to stream with a 1PC setup. You should look into using QuickSync instead.

hey i was curious about QuickSync but, i never really got into doing some research on it.

is it as simple as turning on the integrated GPU in my CPU? or does it require something like Lucid Logix Virtu software? if you could point me in the right direction, i'd appreciate it.

i could also try an up the clock speed on my CPU but, i'm not sure if the gains would outweigh the diminishing returns. BF4 also seems to be extremely unstable at times... it tends to shoot my CPU usage into the high 70% and low 80% for a split second. i'm really hoping some some optimizations later down the road will stabilize this.

do you think if i set everything to "High," settings, it would tax my CPU a bit less while streaming? i wasn't sure if raising the graphics quality would use additional resources from the CPU.
 

Sapiens

Forum Moderator
I have a GTX580 and an i5-2500K at 4 GHz, and BF3 had no problem pushing both into the 90%+ range, so I'm sure BF4 is at least as bad, especially when your graphics hardware isn't bottlenecking things. For QuickSync to work you need to enable your iGPU in the BIOS and get the latest drivers from Intel's site. Once everything is installed, look at this guide to make it available for use in OBS.
 

defterOG

New Member
Sapiens said:
I have a GTX580 and an i5-2500K at 4 GHz, and BF3 had no problem pushing both into the 90%+ range, so I'm sure BF4 is at least as bad, especially when your graphics hardware isn't bottlenecking things. For QuickSync to work you need to enable your iGPU in the BIOS and get the latest drivers from Intel's site. Once everything is installed, look at this guide to make it available for use in OBS.

wow, 90%+? that seems awfully high for BF3, my previous i5 3570k hit a max around 75% in BF3 with a small overclock around 4.2GHz. my 3770k, with it's current OC, averages around 45%-50% most of the time in BF4, it's just these certain areas that tend to bog it down. :(

i'll definitely take a look @ the link you posted, seems like it's one of the only ways i'll be able to take a load off the CPU when streaming for now. thanks!
 
Top