Bug Report Problem with Java-based games

Fyren

New Member
I was trying to stream Delver, which is a little FPS roguelike written in Java, but for some reason using OBS to record kills the game's framerate. Window/monitor/game capture all have the same problem.

I was watching task manager while I was fiddling with priorities/affinities and I noticed that for some reason Java's CPU usage goes way down while I record with OBS. Without OBS recording, the Java process is pegged at 25% (one of my four cores) and overall my CPU use when I was testing was 30-40%. If I start recording, Java drops down to 5-8% with 25-30% total CPU use. This happens even if I preview and tell OBS to not encode the preview. If I tab out of the game so OBS isn't actually recording it (and is getting some other window) the CPU use goes back up to 25%. Tab back in and it goes down.

I tried out Minecraft to test and I have the same issue there. I'm running 32-bit Java 7u45. I don't have this problem with any other games I've streamed. Is there any other information I can provide?

Code:
12:44:15: Open Broadcaster Software v0.592b - 32bit (´・ω・`)
12:44:15: -------------------------------
12:44:15: CPU Name: Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
12:44:15: CPU Speed: 3292MHz
12:44:15: Physical Memory:  4095MB Total, 4095MB Free
12:44:15: stepping id: 7, model 42, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
12:44:15: monitor 1: pos={-1600, 300}, size={1600, 900}
12:44:15: monitor 2: pos={0, 0}, size={1600, 1200}
12:44:15: Windows Version: 6.1 Build 7601 S
12:44:15: Aero is Disabled
12:44:15: -------------------------------
12:44:15: OBS Modules:
12:44:15: Base Address     Module
12:44:15: 00290000         OBS.exe
12:44:15: 60D20000         OBSApi.dll
12:44:15: 689D0000         DShowPlugin.dll
12:44:15: 6A740000         GraphicsCapture.dll
12:44:15: 693C0000         NoiseGate.dll
12:44:15: 67DB0000         PSVPlugin.dll
12:44:15: ------------------------------------------
12:44:15: Adapter 1
12:44:15:   Video Adapter: AMD Radeon HD 6800 Series
12:44:15:   Video Adapter Dedicated Video Memory: 1051422720
12:44:15:   Video Adapter Shared System Memory: 3243479040
12:44:15:   Video Adapter Output 1: pos={0, 0}, size={1600, 1200}, attached=true
12:44:15:   Video Adapter Output 2: pos={-1600, 300}, size={1600, 900}, attached=true
12:44:15: =====Stream Start: 2014-01-11, 12:44:15===============================================
12:44:15:   Multithreaded optimizations: On
12:44:15:   Base resolution: 1600x1181
12:44:15:   Output resolution: 1064x786
12:44:15: ------------------------------------------
12:44:15: Loading up D3D10 on AMD Radeon HD 6800 Series (Adapter 1)...
12:44:15: ------------------------------------------
12:44:15: Audio Format: 44100hz
12:44:15: Playback device Default
12:44:15: ------------------------------------------
12:44:15: Using desktop audio input: Line 1 (Virtual Audio Cable)
12:44:15: ------------------------------------------
12:44:15: Using auxilary audio input: Microphone (Realtek High Definition Audio)
12:44:15: ------------------------------------------
12:44:15: Audio Encoding: MP3
12:44:15:     bitrate: 64
12:44:15: Using graphics capture
12:44:15: Using text output
12:44:15: Scene buffering time set to 100
12:44:15: ------------------------------------------
12:44:15: Video Encoding: x264
12:44:15:     fps: 30
12:44:15:     width: 1064, height: 786
12:44:15:     preset: veryfast
12:44:15:     profile: high
12:44:15:     keyint: 60
12:44:15:     CBR: yes
12:44:15:     CFR: no
12:44:15:     max bitrate: 400
12:44:15:     buffer size: 400
12:44:15: ------------------------------------------
12:44:15: MMDeviceAudioSource: Frequency for device 'Line 1 (Virtual Audio Cable)' is 352800, samples per sec is 44100
12:44:15: MMDeviceAudioSource: Frequency for device 'Microphone (Realtek High Definition Audio)' is 352800, samples per sec is 44100
12:44:15: SharedTexCapture hooked
12:45:11: Using Window Capture
12:45:12: Total frames encoded: 1709, total frames duplicated: 41 (2.40%)
12:45:12: Total frames rendered: 1708, number of late frames: 3 (0.18%) (it's okay for some frames to be late)
12:45:12: 
12:45:12: Profiler time results:
12:45:12: 
12:45:12: ==============================================================
12:45:12: video thread frame - [100%] [avg time: 2.12 ms] [children: 78.2%] [unaccounted: 21.8%]
12:45:12: | scene->Preprocess - [25.9%] [avg time: 0.55 ms]
12:45:12: | GPU download and conversion - [52.2%] [avg time: 1.107 ms] [children: 5.09%] [unaccounted: 47.1%]
12:45:12: | | flush - [0.708%] [avg time: 0.015 ms]
12:45:12: | | CopyResource - [0.755%] [avg time: 0.016 ms]
12:45:12: | | conversion to 4:2:0 - [3.63%] [avg time: 0.077 ms]
12:45:12: Convert444Threads - [100%] [avg time: 0.259 ms] [children: 99.2%] [unaccounted: 0.772%]
12:45:12: | Convert444toNV12 - [99.2%] [avg time: 0.257 ms]
12:45:12: encoder thread frame - [100%] [avg time: 12.628 ms]
12:45:12: ==============================================================
12:45:12: 
12:45:12: 
12:45:12: Profiler CPU results:
12:45:12: 
12:45:12: ==============================================================
12:45:12: video thread frame - [cpu time: avg 0.237 ms, total 405.602 ms] [avg calls per frame: 1]
12:45:12: | scene->Preprocess - [cpu time: avg 0.045 ms, total 78 ms] [avg calls per frame: 1]
12:45:12: | GPU download and conversion - [cpu time: avg 0.054 ms, total 93.601 ms] [avg calls per frame: 1]
12:45:12: | | flush - [cpu time: avg 0.009 ms, total 15.6 ms] [avg calls per frame: 1]
12:45:12: | | CopyResource - [cpu time: avg 0.036 ms, total 62.401 ms] [avg calls per frame: 1]
12:45:12: | | conversion to 4:2:0 - [cpu time: avg 0.009 ms, total 15.6 ms] [avg calls per frame: 1]
12:45:12: Convert444Threads - [cpu time: avg 0.238 ms, total 811.204 ms] [avg calls per frame: 2]
12:45:12: | Convert444toNV12 - [cpu time: avg 0.238 ms, total 811.204 ms] [avg calls per frame: 2]
12:45:12: encoder thread frame - [cpu time: avg 12.006 ms, total 20482.9 ms] [avg calls per frame: 1]
12:45:12: ==============================================================
12:45:12: 
12:45:12: =====Stream End: 2014-01-11, 12:45:12=================================================
 

dodgepong

Administrator
Community Helper
Your computer is choking on the encoding step, though I have to admit I'm not sure why it's choking as bad as it is. That CPU should be able to encode at the settings you've given it just fine. What is your process priority set to? And have you tried the 64bit version?
 

Fyren

New Member
I mentioned I tried a preview with encoding disabled and the same thing still happens. With encoding disabled, OBS uses like 2-3% CPU.

I tried setting both OBS and Java to high priority with affinities to different cores and the same thing still happens. Just Java at high and OBS at normal also didn't change anything. OBS itself usually only reaches up to like 15% CPU even with heavy motion on screen and like 10% when not much is going on.
 
Top