Question / Help Laggy only when streaming

CoolCapBro

New Member
Hey everyone,

So I've been running into some issues when streaming games like fortnite or rocket league. The gameplay becomes really laggy, and its become essentially an unwatchable stream. I have a wired 9mb upload speed and I am tryong to stream at 720, 30/60fps.

Here's an OBS log from the last stream

20:01:26.131: CPU Name: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
20:01:26.131: CPU Speed: 2500MHz
20:01:26.131: Physical Cores: 4, Logical Cores: 8
20:01:26.131: Physical Memory: 16384MB Total
20:01:26.131: OS Name: Mac OS X (NSMACHOperatingSystem)
20:01:26.131: OS Version: Version 10.13.6 (Build 17G65)
20:01:26.131: Kernel Version: 17.7.0
20:01:26.134: hotkeys-cocoa: Using layout 'com.apple.keylayout.British'
20:01:26.134: Portable mode: false
20:01:26.521: OBS 21.1.1-modified (mac)
20:01:26.521: ---------------------------------
20:01:26.522: ---------------------------------
20:01:26.522: audio settings reset:
20:01:26.522: samples per sec: 48000
20:01:26.522: speakers: 2
20:01:26.591: ---------------------------------
20:01:26.591: Initializing OpenGL...
20:01:26.650: Loading up OpenGL on adapter NVIDIA Corporation NVIDIA GeForce GT 750M OpenGL Engine
20:01:26.650: OpenGL loaded successfully, version 4.1 NVIDIA-10.32.0 355.11.10.10.40.102, shading language 4.10
20:01:26.750: ---------------------------------
20:01:26.782: video settings reset:
20:01:26.782: base resolution: 1280x720
20:01:26.782: output resolution: 1280x720
20:01:26.782: downscale filter: Lanczos
20:01:26.782: fps: 60/1
20:01:26.782: format: NV12
20:01:26.782: YUV mode: 709/Full
20:01:26.783: Audio monitoring device:
20:01:26.783: name: Soundflower (2ch)
20:01:26.783: id: SoundflowerEngine:0
20:01:26.783: ---------------------------------
20:01:27.332: No blackmagic support
20:01:27.558: [VideoToolbox encoder]: Adding VideoToolbox H264 encoders
20:01:28.339: VLC found, VLC video source enabled
20:01:28.403: Failed to load 'en-US' text for module: 'obs-browser.so'
20:01:28.403: [browser_source: 'Version: 1.31.0']
20:01:28.403: ---------------------------------
20:01:28.403: Loaded Modules:
20:01:28.403: obs-browser.so
20:01:28.403: vlc-video.so
20:01:28.403: text-freetype2.so
20:01:28.403: rtmp-services.so
20:01:28.403: obs-x264.so
20:01:28.403: obs-vst.so
20:01:28.403: obs-transitions.so
20:01:28.403: obs-outputs.so
20:01:28.403: obs-filters.so
20:01:28.403: obs-ffmpeg.so
20:01:28.403: mac-vth264.so
20:01:28.404: mac-syphon.so
20:01:28.404: mac-decklink.so
20:01:28.404: mac-capture.so
20:01:28.404: mac-avcapture.so
20:01:28.404: linux-jack.so
20:01:28.404: image-source.so
20:01:28.404: frontend-tools.so
20:01:28.404: coreaudio-encoder.so
20:01:28.404: ---------------------------------
20:01:28.404: ==== Startup complete ===============================================
20:01:28.513: All scene data cleared
20:01:28.513: ------------------------------------------------
20:01:28.615: coreaudio: device 'Soundflower (2ch)' initialized
20:01:28.963: coreaudio: device 'Soundflower (2ch)' initialized
20:01:28.973: Webcam: Selected device 'FaceTime HD Camera'
20:01:28.978: Webcam: Using preset 640x480
20:01:28.982: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds
20:01:29.129: adding 21 milliseconds of audio buffering, total audio buffering is now 42 milliseconds
20:01:29.461: Switched to scene 'BACK SOON'
20:01:29.461: ------------------------------------------------
20:01:29.461: Loaded scenes:
20:01:29.461: - scene 'BACK SOON':
20:01:29.462: - source: 'Background' (image_source)
20:01:29.462: - scene 'Switch Twitch':
20:01:29.462: - source: 'ElgatoHD60' (display_capture)
20:01:29.462: - source: 'Audio Output Capture' (coreaudio_output_capture)
20:01:29.462: - source: 'Follow + Hosts' (browser_source)
20:01:29.462: - source: 'Raids' (browser_source)
20:01:29.462: - source: 'Webcam' (av_capture_input)
20:01:29.462: - filter: 'Webcam Delay' (async_delay_filter)
20:01:29.462: ------------------------------------------------
20:01:30.410: adding 21 milliseconds of audio buffering, total audio buffering is now 64 milliseconds
20:01:30.434: adding 42 milliseconds of audio buffering, total audio buffering is now 106 milliseconds
20:05:45.283: User switched to scene 'Switch Twitch'
20:05:51.249: A sprite cannot be drawn without a width/height
20:05:51.266: A sprite cannot be drawn without a width/height
20:05:51.281: A sprite cannot be drawn without a width/height
20:05:51.300: A sprite cannot be drawn without a width/height
20:05:51.316: A sprite cannot be drawn without a width/height
20:05:51.333: A sprite cannot be drawn without a width/height
20:05:51.348: A sprite cannot be drawn without a width/height
20:05:51.366: A sprite cannot be drawn without a width/height
20:05:51.380: A sprite cannot be drawn without a width/height
20:05:51.400: A sprite cannot be drawn without a width/height
20:05:51.414: A sprite cannot be drawn without a width/height
20:05:51.433: A sprite cannot be drawn without a width/height
20:05:51.449: A sprite cannot be drawn without a width/height
20:05:51.465: A sprite cannot be drawn without a width/height
20:05:51.482: A sprite cannot be drawn without a width/height
20:05:51.498: A sprite cannot be drawn without a width/height
20:05:51.514: A sprite cannot be drawn without a width/height
20:05:51.531: A sprite cannot be drawn without a width/height
20:05:51.549: A sprite cannot be drawn without a width/height
20:05:51.566: A sprite cannot be drawn without a width/height
20:05:51.581: A sprite cannot be drawn without a width/height
20:05:51.599: A sprite cannot be drawn without a width/height
20:05:51.616: A sprite cannot be drawn without a width/height
20:05:51.633: A sprite cannot be drawn without a width/height
20:05:51.649: A sprite cannot be drawn without a width/height
20:05:51.667: A sprite cannot be drawn without a width/height
20:05:51.682: A sprite cannot be drawn without a width/height
20:05:51.700: A sprite cannot be drawn without a width/height
20:05:51.716: A sprite cannot be drawn without a width/height
20:05:51.730: A sprite cannot be drawn without a width/height
20:05:51.749: A sprite cannot be drawn without a width/height
20:06:27.802: Last log entry repeated for 15 more lines
20:06:27.802: User switched to scene 'BACK SOON'
20:08:41.865: User switched to scene 'Switch Twitch'
20:14:51.143: ==== Shutting down ==================================================
20:14:51.147: Switched to scene '(null)'
20:14:51.635: All scene data cleared
20:14:51.635: ------------------------------------------------
20:14:51.643: glClear failed, glGetError returned 0x506
20:14:51.643: device_clear (GL) failed
20:14:51.643: glDrawArrays failed, glGetError returned 0x506
20:14:51.643: device_draw (GL) failed
20:14:51.643: glDrawArrays failed, glGetError returned 0x506
20:14:51.643: device_draw (GL) failed
20:14:51.682: Freeing OBS context data
20:14:51.690: [Scripting] Total detached callbacks: 0
20:14:51.699: == Profiler Results =============================
20:14:51.699: run_program_init: 3905.51 ms
20:14:51.699: ┣OBSApp::AppInit: 41.839 ms
20:14:51.699: ┃ ┗OBSApp::InitLocale: 38.783 ms
20:14:51.699: ┗OBSApp::OBSInit: 3438.33 ms
20:14:51.699: ┣obs_startup: 3.277 ms
20:14:51.699: ┗OBSBasic::OBSInit: 3003.97 ms
20:14:51.699: ┣OBSBasic::InitBasicConfig: 0.284 ms
20:14:51.699: ┣OBSBasic::ResetAudio: 0.088 ms
20:14:51.699: ┣OBSBasic::ResetVideo: 260.604 ms
20:14:51.699: ┣OBSBasic::InitOBSCallbacks: 0.024 ms
20:14:51.699: ┣OBSBasic::InitHotkeys: 0.138 ms
20:14:51.699: ┣obs_load_all_modules: 1620.4 ms
20:14:51.699: ┃ ┣obs_init_module(coreaudio-encoder.so): 0.01 ms
20:14:51.699: ┃ ┣obs_init_module(frontend-tools.so): 3.248 ms
20:14:51.699: ┃ ┣obs_init_module(image-source.so): 0.012 ms
20:14:51.699: ┃ ┣obs_init_module(linux-jack.so): 0.005 ms
20:14:51.699: ┃ ┣obs_init_module(mac-avcapture.so): 13.279 ms
20:14:51.699: ┃ ┣obs_init_module(mac-capture.so): 0.007 ms
20:14:51.699: ┃ ┣obs_init_module(mac-decklink.so): 0.096 ms
20:14:51.699: ┃ ┣obs_init_module(mac-syphon.so): 0.004 ms
20:14:51.699: ┃ ┣obs_init_module(mac-vth264.so): 157.125 ms
20:14:51.699: ┃ ┣obs_init_module(obs-ffmpeg.so): 0.02 ms
20:14:51.699: ┃ ┣obs_init_module(obs-filters.so): 0.013 ms
20:14:51.699: ┃ ┣obs_init_module(obs-outputs.so): 0.009 ms
20:14:51.699: ┃ ┣obs_init_module(obs-transitions.so): 0.01 ms
20:14:51.699: ┃ ┣obs_init_module(obs-vst.so): 0.021 ms
20:14:51.699: ┃ ┣obs_init_module(obs-x264.so): 0.005 ms
20:14:51.699: ┃ ┣obs_init_module(rtmp-services.so): 11.247 ms
20:14:51.699: ┃ ┣obs_init_module(text-freetype2.so): 0.087 ms
20:14:51.699: ┃ ┣obs_init_module(vlc-video.so): 159.831 ms
20:14:51.699: ┃ ┗obs_init_module(obs-browser.so): 0.161 ms
20:14:51.699: ┣OBSBasic::ResetOutputs: 23.989 ms
20:14:51.699: ┣OBSBasic::CreateHotkeys: 0.053 ms
20:14:51.699: ┣OBSBasic::InitService: 59.325 ms
20:14:51.700: ┣OBSBasic::InitPrimitives: 0.127 ms
20:14:51.700: ┗OBSBasic::Load: 975.376 ms
20:14:51.700: obs_hotkey_thread(25 ms): min=0.02 ms, median=0.034 ms, max=5.417 ms, 99th percentile=0.213 ms, 100% below 25 ms
20:14:51.700: audio_thread(Audio): min=0 ms, median=0.076 ms, max=41.299 ms, 99th percentile=0.482 ms
20:14:51.700: obs_graphics_thread(16.6667 ms): min=0.419 ms, median=1.25 ms, max=842.642 ms, 99th percentile=27.837 ms, 95.8381% below 16.667 ms
20:14:51.700: ┣tick_sources: min=0 ms, median=0.022 ms, max=841.336 ms, 99th percentile=0.748 ms
20:14:51.700: ┣output_frame: min=0.414 ms, median=0.715 ms, max=184.042 ms, 99th percentile=19.895 ms
20:14:51.700: ┃ ┣gs_context(video->graphics): min=0.237 ms, median=0.492 ms, max=183.823 ms, 99th percentile=19.536 ms
20:14:51.700: ┃ ┃ ┣render_video: min=0.213 ms, median=0.479 ms, max=183.812 ms, 99th percentile=18.777 ms
20:14:51.700: ┃ ┃ ┃ ┣render_main_texture: min=0.03 ms, median=0.145 ms, max=81.361 ms, 99th percentile=0.733 ms
20:14:51.700: ┃ ┃ ┃ ┣render_output_texture: min=0.006 ms, median=0.04 ms, max=18.904 ms, 99th percentile=0.199 ms
20:14:51.700: ┃ ┃ ┃ ┣render_convert_texture: min=0.001 ms, median=0.038 ms, max=9.809 ms, 99th percentile=0.185 ms
20:14:51.700: ┃ ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.197 ms, max=183.179 ms, 99th percentile=18.349 ms
20:14:51.700: ┃ ┃ ┣download_frame: min=0 ms, median=0.003 ms, max=61.865 ms, 99th percentile=2.804 ms
20:14:51.700: ┃ ┃ ┗gs_flush: min=0 ms, median=0 ms, max=4.749 ms, 99th percentile=0 ms
20:14:51.700: ┃ ┗output_video_data: min=0.16 ms, median=0.209 ms, max=23.325 ms, 99th percentile=0.658 ms
20:14:51.700: ┗render_displays: min=0.001 ms, median=0.296 ms, max=102.604 ms, 99th percentile=10.276 ms
20:14:51.700: video_thread(video): min=0 ms, median=0 ms, max=1.114 ms, 99th percentile=0.01 ms
20:14:51.700: =================================================
20:14:51.700: == Profiler Time Between Calls ==================
20:14:51.700: obs_hotkey_thread(25 ms): min=25.045 ms, median=29.173 ms, max=52.08 ms, 4.44167% within ±2% of 25 ms (0% lower, 95.5583% higher)
20:14:51.700: obs_graphics_thread(16.6667 ms): min=0.985 ms, median=16.61 ms, max=842.65 ms, 18.8835% within ±2% of 16.667 ms (42.0531% lower, 39.0634% higher)
20:14:51.700: =================================================
20:14:51.782: Number of memory leaks: 16


Any help would be greatly appreciated
 

Narcogen

Active Member
Your log needs a streaming session in it to be helpful. This one only has the app opening and closing.
 

CoolCapBro

New Member
Your log needs a streaming session in it to be helpful. This one only has the app opening and closing.

Sorry, I thought this contained a session, I will check back just now and update one with a log.

EDIT: there is info on a stream in here, sorry I couldn't find one with a longer stream, but hopefully this is okay. Also, I really don't mean to be stupid, but I am recording via OBS whilst streaming, could this possibly be causing the "frames skipped due to encoder lag"
 

Attachments

  • 2018-08-10 20-14-15.txt
    20.2 KB · Views: 9
Last edited:

Narcogen

Active Member
Yes. You're slightly exceeding the capabilities of both your GPU and your CPU with your current settings:

21:27:03.232: Output 'adv_file_output': Total drawn frames: 147678 (150799 attempted)
21:27:03.232: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 3121 (2.1%)
21:27:03.233: ==== Recording Stop ================================================
21:27:05.830: [rtmp stream: 'adv_stream'] User stopped the stream
21:27:05.831: Output 'adv_stream': stopping
21:27:05.831: Output 'adv_stream': Total frames output: 149902
21:27:05.831: Output 'adv_stream': Total drawn frames: 146905 (150010 attempted)
21:27:05.831: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 3105 (2.1%)
21:27:05.831: Video stopped, number of skipped frames due to encoding lag: 7239/150955 (4.8%)


To reduce GPU load you can reduce canvas size, frame rate, and cap framerate in whatever app you are capturing if that is an option.

To reduce CPU load you can choose the superfast or ultrafast CPU preset.
 

CoolCapBro

New Member
Yes. You're slightly exceeding the capabilities of both your GPU and your CPU with your current settings:

21:27:03.232: Output 'adv_file_output': Total drawn frames: 147678 (150799 attempted)
21:27:03.232: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 3121 (2.1%)
21:27:03.233: ==== Recording Stop ================================================
21:27:05.830: [rtmp stream: 'adv_stream'] User stopped the stream
21:27:05.831: Output 'adv_stream': stopping
21:27:05.831: Output 'adv_stream': Total frames output: 149902
21:27:05.831: Output 'adv_stream': Total drawn frames: 146905 (150010 attempted)
21:27:05.831: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 3105 (2.1%)
21:27:05.831: Video stopped, number of skipped frames due to encoding lag: 7239/150955 (4.8%)


To reduce GPU load you can reduce canvas size, frame rate, and cap framerate in whatever app you are capturing if that is an option.

To reduce CPU load you can choose the superfast or ultrafast CPU preset.


I'm going to run a test tonight without recording gameplay whilst streaming. Do you think it would be necessary to reduce CPU load aswell?

Thank you very much for the response, it's very much appreciated
 

Narcogen

Active Member
Lowering framerate might resolve both, as having twice the frames has a serious impact on both GPU load for rendering and CPU load for encoding.
 
Top