Question / Help Bad performance in game when using x264

justcallmekush

New Member
Hello I am having trouble streaming to twitch using OBS and the x264 encoding preset.

My CPU is a core i5 6600k OC to 4.6 GHZ. I have 8 GB of RAM and a GTX 1080.

When using x264, at first it was stuttering really bad on stream, like unwatchably bad. I addressed this by changing a setting in the advanced tab under something called 'process priority' or something similar to 'high'. This allows me to stream using x264 BUT there is a strange performance issue. Also, if I use zerolatency tuning option for x264, I am able to stream but it lags my game just like I describe below.

My computer itself starts lagging, its like its skipping frames and just overall lagging and chugging a bit. When using NVENC or Quicksync I don't have this problem. FPS COUNTER IN GAME STAYS ABOVE 55-60

I feel like my computer is powerful enough for this task, what is my problem?
Code:
]6
18:24:12.039: CPU Name: Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz
18:24:12.039: CPU Speed: 3504MHz
18:24:12.039: Physical Cores: 4, Logical Cores: 4
18:24:12.039: Physical Memory: 7887MB Total, 1617MB Free
18:24:12.039: Windows Version: 10.0 Build 15063 (revision: 296; 64-bit)
18:24:12.039: Running as administrator: false
18:24:12.039: Aero is Enabled (Aero is always on for windows 8 and above)
18:24:12.039: Portable mode: false
18:24:12.074: OBS 20.0.1 (64bit, windows)
18:24:12.074: ---------------------------------
18:24:12.075: ---------------------------------
18:24:12.075: audio settings reset:
18:24:12.075:    samples per sec: 48000
18:24:12.075:    speakers:  2
18:24:12.077: ---------------------------------
18:24:12.077: Initializing D3D11...
18:24:12.077: Available Video Adapters:
18:24:12.080:    Adapter 1: NVIDIA GeForce GTX 1080
18:24:12.080:     Dedicated VRAM: 4174053376
18:24:12.080:     Shared VRAM:  4135385088
18:24:12.080:     output 1: pos={0, 0}, size={1920, 1080}, attached=true
18:24:12.080:    Adapter 2: Intel(R) HD Graphics 530
18:24:12.080:     Dedicated VRAM: 134217728
18:24:12.080:     Shared VRAM:  4135385088
18:24:12.135: Loading up D3D11 on adapter NVIDIA GeForce GTX 1080 (0)
18:24:13.081: D3D11 loaded successfully, feature level used: 45056
18:24:14.287: ---------------------------------
18:24:14.287: video settings reset:
18:24:14.287:    base resolution:  1920x1080
18:24:14.287:    output resolution: 1280x720
18:24:14.287:    downscale filter:  Lanczos
18:24:14.287:    fps:  60/1
18:24:14.287:    format:  NV12
18:24:14.309: Audio monitoring device:
18:24:14.309:    name: Default
18:24:14.309:    id: default
18:24:14.309: ---------------------------------
18:24:14.312: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/chrome_elf.dll' not found, loading of module failed
18:24:14.314: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
18:24:14.316: [AMF] Encountered Exception during AMF initialization: Unable to load 'amfrt64.dll', error code 126.
18:24:14.316: Failed to initialize module 'enc-amf.dll'
18:24:14.346: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
18:24:14.347: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libEGL.dll' not found, loading of module failed
18:24:14.350: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
18:24:14.350: Failed to load 'en-US' text for module: 'obs-browser.dll'
18:24:14.350: [browser_source: 'Version: 1.29.0']
18:24:14.369: NVENC supported
18:24:14.467: Couldn't find VLC installation, VLC video source disabled
18:24:14.497: No blackmagic support
18:24:15.285: ---------------------------------
18:24:15.285:  Loaded Modules:
18:24:15.285:  win-wasapi.dll
18:24:15.285:  win-mf.dll
18:24:15.285:  win-ivcam.dll
18:24:15.285:  win-dshow.dll
18:24:15.285:  win-decklink.dll
18:24:15.285:  win-capture.dll
18:24:15.285:  vlc-video.dll
18:24:15.285:  text-freetype2.dll
18:24:15.285:  rtmp-services.dll
18:24:15.285:  obs-x264.dll
18:24:15.285:  obs-vst.dll
18:24:15.285:  obs-transitions.dll
18:24:15.285:  obs-text.dll
18:24:15.285:  obs-qsv11.dll
18:24:15.285:  obs-outputs.dll
18:24:15.285:  obs-filters.dll
18:24:15.285:  obs-ffmpeg.dll
18:24:15.285:  obs-browser.dll
18:24:15.285:  image-source.dll
18:24:15.285:  frontend-tools.dll
18:24:15.285:  enc-amf.dll
18:24:15.285:  coreaudio-encoder.dll
18:24:15.285: ---------------------------------
18:24:15.285: ==== Startup complete ===============================================
18:24:15.287: All scene data cleared
18:24:15.287: ------------------------------------------------
18:24:15.319: WASAPI: Device 'Speakers (Sound Blaster Z)' initialized
18:24:15.328: WASAPI: Device 'Microphone (DYNEX USB MIC Device)' initialized
18:24:15.328: source 'Mic/Aux' enabled push-to-talk
18:24:15.354: ---------------------------------
18:24:15.354: [DShow Device: 'DroidCam'] settings updated:
18:24:15.354:    video device: DroidCam Source 3
18:24:15.354:    video path: \\?\root#media#0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global
18:24:15.354:    resolution: 640x480
18:24:15.354:    fps: 29.97 (interval: 333667)
18:24:15.354:    format: XRGB
18:24:15.354: DShow: HDevice::ConnectPins: failed to connect pins (0x80040207): The owner SID on a per-user subscription doesn't exist
18:24:15.354:
18:24:15.373: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds
18:24:17.227: adding 21 milliseconds of audio buffering, total audio buffering is now 42 milliseconds
18:24:20.572: adding 21 milliseconds of audio buffering, total audio buffering is now 64 milliseconds
18:24:23.301: Switched to scene 'Scene'
18:24:23.336: ------------------------------------------------
18:24:23.336: Loaded scenes:
18:24:23.336: - scene 'Scene':
18:24:23.337:  - source: 'EPSXE' (game_capture)
18:24:23.337:  - source: 'SNES9X' (game_capture)
18:24:23.337:  - source: 'Display ' (monitor_capture)
18:24:23.337:  - source: 'Twitch Alerts' (browser_source)
18:24:23.337:  - source: 'DroidCam' (dshow_input)
18:24:23.337: ------------------------------------------------
18:24:24.460: adding 21 milliseconds of audio buffering, total audio buffering is now 85 milliseconds
18:24:28.443: ---------------------------------
18:24:28.443: [x264 encoder: 'streaming_h264'] preset: veryfast
18:24:28.443: [x264 encoder: 'streaming_h264'] profile: high
18:24:28.459: [x264 encoder: 'streaming_h264'] settings:
18:24:28.459:    rate_control: VBR
18:24:28.459:    bitrate:  5000
18:24:28.459:    buffer size:  5000
18:24:28.459:    crf:  23
18:24:28.459:    fps_num:  60
18:24:28.459:    fps_den:  1
18:24:28.459:    width:  1280
18:24:28.459:    height:  720
18:24:28.459:    keyint:  250
18:24:28.459:
18:24:28.475: [Media Foundation AAC: 'Track1']: encoder created
18:24:28.475:    bitrate: 160
18:24:28.475:    channels: 2
18:24:28.475:    sample rate: 48000
18:24:28.475:    bits-per-sample: 16
18:24:28.475:
18:24:28.475: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://live-lax.twitch.tv/app...
18:24:28.495: [rtmp stream: 'adv_stream'] Interface: Killer e2400 Gigabit Ethernet Controller (ethernet, 1000 mbps)
18:24:29.451: [rtmp stream: 'adv_stream'] Connection to rtmp://live-lax.twitch.tv/app successful
18:24:29.453: ==== Streaming Start ===============================================
18:25:43.351: [rtmp stream: 'adv_stream'] User stopped the stream
18:25:43.351: Output 'adv_stream': stopping
18:25:43.351: Output 'adv_stream': Total frames output: 4158
18:25:43.351: Output 'adv_stream': Total drawn frames: 3894 (4493 attempted)
18:25:43.351: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 599 (13.3%)
18:25:43.351: Video stopped, number of skipped frames due to encoding lag: 2875/4434 (64.8%)
18:25:43.353: ==== Streaming Stop ================================================
18:25:54.095: Settings changed (outputs)
18:25:54.095: ------------------------------------------------
18:25:57.181: ==== Shutting down ==================================================
18:25:57.184: Switched to scene '(null)'
18:25:57.187: WASAPI: Device 'Speakers (Sound Blaster Z)' Terminated
18:25:57.189: WASAPI: Device 'Microphone (DYNEX USB MIC Device)' Terminated
18:25:57.190: All scene data cleared
18:25:57.190: ------------------------------------------------
18:25:57.287: Freeing OBS context data
18:25:57.545: == Profiler Results =============================
18:25:57.545: run_program_init: 11437 ms
18:25:57.545:  ┣OBSApp::AppInit: 15.573 ms
18:25:57.545:  ┃ ┗OBSApp::InitLocale: 1.345 ms
18:25:57.545:  ┗OBSApp::OBSInit: 11407.2 ms
18:25:57.545:  ┣obs_startup: 1.042 ms
18:25:57.545:  ┗OBSBasic::OBSInit: 11338.4 ms
18:25:57.545:  ┣OBSBasic::InitBasicConfig: 0.736 ms
18:25:57.545:  ┣OBSBasic::ResetAudio: 0.364 ms
18:25:57.545:  ┣OBSBasic::ResetVideo: 2233.89 ms
18:25:57.545:  ┣OBSBasic::InitOBSCallbacks: 0.004 ms
18:25:57.545:  ┣OBSBasic::InitHotkeys: 0.027 ms
18:25:57.545:  ┣obs_load_all_modules: 976.072 ms
18:25:57.545:  ┃ ┣obs_init_module(coreaudio-encoder.dll): 0.953 ms
18:25:57.545:  ┃ ┣obs_init_module(enc-amf.dll): 0.306 ms
18:25:57.545:  ┃ ┣obs_init_module(frontend-tools.dll): 0.983 ms
18:25:57.545:  ┃ ┣obs_init_module(image-source.dll): 0.004 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-browser.dll): 0.073 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-ffmpeg.dll): 3.227 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-filters.dll): 0.009 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-outputs.dll): 0.004 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-qsv11.dll): 9.612 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-text.dll): 0.873 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-transitions.dll): 0.004 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-vst.dll): 0.002 ms
18:25:57.545:  ┃ ┣obs_init_module(obs-x264.dll): 0.001 ms
18:25:57.545:  ┃ ┣obs_init_module(rtmp-services.dll): 2.239 ms
18:25:57.545:  ┃ ┣obs_init_module(text-freetype2.dll): 0.096 ms
18:25:57.545:  ┃ ┣obs_init_module(vlc-video.dll): 0.028 ms
18:25:57.545:  ┃ ┣obs_init_module(win-capture.dll): 0.174 ms
18:25:57.545:  ┃ ┣obs_init_module(win-decklink.dll): 15.407 ms
18:25:57.545:  ┃ ┣obs_init_module(win-dshow.dll): 1.739 ms
18:25:57.545:  ┃ ┣obs_init_module(win-ivcam.dll): 0.001 ms
18:25:57.545:  ┃ ┣obs_init_module(win-mf.dll): 773.063 ms
18:25:57.545:  ┃ ┣obs_init_module(win-wasapi.dll): 0.004 ms
18:25:57.545:  ┃ ┗reset_win32_symbol_paths: 0.066 ms
18:25:57.545:  ┣OBSBasic::ResetOutputs: 0.275 ms
18:25:57.545:  ┣OBSBasic::CreateHotkeys: 0.084 ms
18:25:57.546:  ┣OBSBasic::InitService: 0.743 ms
18:25:57.546:  ┣OBSBasic::InitPrimitives: 0.216 ms
18:25:57.546:  ┗OBSBasic::Load: 8050.06 ms
18:25:57.546: obs_hotkey_thread(25 ms): min=0.001 ms, median=0.004 ms, max=23.251 ms, 99th percentile=0.266 ms, 100% below 25 ms
18:25:57.546: audio_thread(Audio): min=0 ms, median=0.19 ms, max=31.877 ms, 99th percentile=6.803 ms
18:25:57.546:  ┗receive_audio: min=0.001 ms, median=0.18 ms, max=31.845 ms, 99th percentile=6.888 ms, 0.789294 calls per parent call
18:25:57.546:  ┣buffer_audio: min=0 ms, median=0 ms, max=4.661 ms, 99th percentile=0.001 ms
18:25:57.546:  ┗do_encode: min=0.06 ms, median=0.177 ms, max=31.843 ms, 99th percentile=6.839 ms
18:25:57.546:  ┗encode(Track1): min=0.057 ms, median=0.15 ms, max=20.286 ms, 99th percentile=5.402 ms
18:25:57.546: obs_video_thread(16.6667 ms): min=0.213 ms, median=1.869 ms, max=8004.54 ms, 99th percentile=50.295 ms, 83.1829% below 16.667 ms
18:25:57.546:  ┣tick_sources: min=0 ms, median=0.154 ms, max=8003.08 ms, 99th percentile=4.417 ms
18:25:57.546:  ┣render_displays: min=0 ms, median=0.562 ms, max=48.793 ms, 99th percentile=8.914 ms
18:25:57.546:  ┗output_frame: min=0.084 ms, median=0.471 ms, max=64.71 ms, 99th percentile=49.285 ms
18:25:57.546:  ┣gs_context(video->graphics): min=0.083 ms, median=0.318 ms, max=64.572 ms, 99th percentile=49.282 ms
18:25:57.546:  ┃ ┣render_video: min=0.016 ms, median=0.084 ms, max=22.648 ms, 99th percentile=2.236 ms
18:25:57.546:  ┃ ┃ ┣render_main_texture: min=0.002 ms, median=0.035 ms, max=13.532 ms, 99th percentile=0.68 ms
18:25:57.546:  ┃ ┃ ┣render_output_texture: min=0.002 ms, median=0.006 ms, max=13.635 ms, 99th percentile=0.181 ms
18:25:57.546:  ┃ ┃ ┣render_convert_texture: min=0.001 ms, median=0.007 ms, max=9.732 ms, 99th percentile=0.172 ms
18:25:57.546:  ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.002 ms, max=22.592 ms, 99th percentile=1.208 ms
18:25:57.546:  ┃ ┣download_frame: min=0 ms, median=0.001 ms, max=63.695 ms, 99th percentile=48.951 ms
18:25:57.546:  ┃ ┗gs_flush: min=0.017 ms, median=0.106 ms, max=15.712 ms, 99th percentile=1.92 ms
18:25:57.546:  ┗output_video_data: min=0 ms, median=0.103 ms, max=14.716 ms, 99th percentile=2.955 ms
18:25:57.546: video_thread(video): min=0 ms, median=0.449 ms, max=3780.59 ms, 99th percentile=610.226 ms
18:25:57.546:  ┗receive_video: min=0.387 ms, median=0.684 ms, max=773.298 ms, 99th percentile=191.595 ms, 1.72061 calls per parent call
18:25:57.546:  ┗do_encode: min=0.386 ms, median=0.684 ms, max=773.298 ms, 99th percentile=191.594 ms
18:25:57.546:  ┗encode(streaming_h264): min=0.383 ms, median=0.668 ms, max=773.285 ms, 99th percentile=191.585 ms
18:25:57.546: OBSBasic::ResetOutputs: 0.425 ms
18:25:57.546: =================================================
18:25:57.546: == Profiler Time Between Calls ==================
18:25:57.546: obs_hotkey_thread(25 ms): min=24.594 ms, median=25.267 ms, max=109.602 ms, 53.4366% within ±2% of 25 ms (0% lower, 46.5634% higher)
18:25:57.546: obs_video_thread(16.6667 ms): min=0.266 ms, median=16.852 ms, max=8004.55 ms, 14.053% within ±2% of 16.667 ms (38.0373% lower, 47.9097% higher)
18:25:57.546: =================================================
18:25:57.857: Number of memory leaks: 9
 
isnt that off your cpu if so that is why it would be try using the amd or nvidia encoder(depending on gpu you have) see if you have the same issue
 
there is something lagging me in game, you can see it on stream too but it doesn't look as bad as it feels in game. I tried NVENC encoder but Quicksync has less noise. I am wondering if I had a 6700k if I'd be having this same lag.

I've looked at other people's streams and they look cleaner than mine with lower specs, so I know there is something I am missing here.
 
Back
Top