Question / Help Video Lag Develops as stream goes on

tbull

New Member
Hi - I have streamed dozens of times with my setup without issue, but the last two sessions I have developed issues as the stream goes on. At some point the video on YT/OBS becomes choppy, while the audio remains functioning as normal. Closing OBS and then starting it up again resolves the issue, but it has been coming back later on.

Please let me know what looks like its an issue :


10:14:50.207: image-source.dll
10:14:50.207: frontend-tools.dll
10:14:50.207: enc-amf.dll
10:14:50.207: decklink-ouput-ui.dll
10:14:50.207: coreaudio-encoder.dll
10:14:50.207: ---------------------------------
10:14:50.208: ==== Startup complete ===============================================
10:14:50.217: All scene data cleared
10:14:50.217: ------------------------------------------------
10:14:50.273: WASAPI: Device 'Speakers (Yeti Stereo Microphone)' initialized
10:14:50.298: WASAPI: Device 'Microphone (Yeti Stereo Microphone)' initialized
10:14:50.307: WASAPI: Device 'Microphone (Yeti Stereo Microphone)' initialized
10:14:50.343: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds (source: Audio Input Capture)
10:14:50.343:
10:14:51.101: Switched to scene 'Scene'
10:14:51.102: signal_handler_connect: signal 'item_visible' not found
10:14:51.102: signal_handler_connect: signal 'item_visible' not found
10:14:51.102: signal_handler_connect: signal 'item_visible' not found
10:14:51.103: ------------------------------------------------
10:14:51.103: Loaded scenes:
10:14:51.103: - scene 'Scene':
10:14:51.103: - source: 'El Gato' (dshow_input)
10:14:51.103: - source: 'Alerts' (browser_source)
10:14:51.103: - monitoring: monitor only
10:14:51.103: - source: 'Audio Input Capture' (wasapi_input_capture)
10:14:51.103: ------------------------------------------------
10:14:54 AM.627: ---------------------------------
10:14:54 AM.627: [DShow Device: 'El Gato'] settings updated:
10:14:54 AM.627: video device: Elgato Game Capture HD
10:14:54 AM.627: video path: __elgato
10:14:54 AM.627: resolution: 1280x720
10:14:54 AM.627: fps: 60.00 (interval: 166666)
10:14:54 AM.627: format: UYVY
10:14:54 AM.627: using video device audio: yes
10:14:54 AM.627: sample rate: 48000
10:14:54 AM.627: channels: 2
10:14:54 AM.627: audio type: Capture
10:30:12 AM.329: [jim-nvenc: 'simple_h264_stream'] settings:
10:30:12 AM.329: rate_control: CBR
10:30:12 AM.329: bitrate: 2500
10:30:12 AM.329: cqp: 20
10:30:12 AM.329: keyint: 60
10:30:12 AM.329: preset: hq
10:30:12 AM.329: profile: high
10:30:12 AM.329: width: 1280
10:30:12 AM.329: height: 720
10:30:12 AM.329: 2-pass: false
10:30:12 AM.329: b-frames: 2
10:30:12 AM.329: lookahead: false
10:30:12 AM.329: psycho_aq: true
10:30:12 AM.329:
10:30:12 AM.341: ---------------------------------
10:30:12 AM.341: [FFmpeg aac encoder: 'simple_aac'] bitrate: 160, channels: 2, channel_layout: 3
10:30:12 AM.341:
10:30:12 AM.347: [rtmp stream: 'simple_stream'] Connecting to RTMP URL rtmp://a.rtmp.youtube.com/live2...
10:30:12 AM.364: [rtmp stream: 'simple_stream'] Interface: Realtek PCIe GBE Family Controller (ethernet, 1000 mbps)
10:30:12 AM.657: [rtmp stream: 'simple_stream'] Connection to rtmp://a.rtmp.youtube.com/live2 successful
10:30:12 AM.664: ==== Streaming Start ===============================================
12:23:47 PM.924: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: El Gato)
12:23:47 PM.924:
12:25:14 PM.578: adding 46 milliseconds of audio buffering, total audio buffering is now 92 milliseconds (source: El Gato)
12:25:14 PM.578:
12:25:14 PM.692: adding 23 milliseconds of audio buffering, total audio buffering is now 116 milliseconds (source: El Gato)
12:25:14 PM.692:
12:25:58 PM.282: adding 417 milliseconds of audio buffering, total audio buffering is now 534 milliseconds (source: El Gato)
12:25:58 PM.282:
12:26:43 PM.326: ==== Shutting down ==================================================
12:26:43 PM.338: Switched to scene '(null)'
12:26:46 PM.546: WASAPI: Device 'Microphone (Yeti Stereo Microphone)' Terminated
12:26:46 PM.551: WASAPI: Device 'Speakers (Yeti Stereo Microphone)' Terminated
12:26:46 PM.557: WASAPI: Device 'Microphone (Yeti Stereo Microphone)' Terminated
12:26:46 PM.563: All scene data cleared
12:26:46 PM.563: ------------------------------------------------
12:26:46 PM.572: [rtmp stream: 'simple_stream'] User stopped the stream
12:26:46 PM.572: Output 'simple_stream': stopping
12:26:46 PM.572: Output 'simple_stream': Total frames output: 209796
12:26:46 PM.572: Output 'simple_stream': Total drawn frames: 209756 (209827 attempted)
12:26:46 PM.572: Output 'simple_stream': Number of lagged frames due to rendering lag/stalls: 71 (0.0%)
12:26:46 PM.573: Video stopped, number of skipped frames due to encoding lag: 108/209816 (0.1%)
12:26:46 PM.628: warning: 2 frames left in the queue on closing
12:26:46 PM.683: Freeing OBS context data
12:26:46 PM.757: [Scripting] Total detached callbacks: 0
12:26:46 PM.774: == Profiler Results =============================
12:26:46 PM.774: run_program_init: 3822.79 ms
12:26:46 PM.774: ┣OBSApp::AppInit: 28.244 ms
12:26:46 PM.774: ┃ ┗OBSApp::InitLocale: 3.402 ms
12:26:46 PM.774: ┗OBSApp::OBSInit: 3694.77 ms
12:26:46 PM.774: ┣obs_startup: 9.082 ms
12:26:46 PM.774: ┗OBSBasic::OBSInit: 2847.34 ms
12:26:46 PM.774: ┣OBSBasic::InitBasicConfig: 0.445 ms
12:26:46 PM.774: ┣OBSBasic::ResetAudio: 0.163 ms
12:26:46 PM.774: ┣OBSBasic::ResetVideo: 1398.95 ms
12:26:46 PM.774: ┣OBSBasic::InitOBSCallbacks: 0.352 ms
12:26:46 PM.774: ┣OBSBasic::InitHotkeys: 0.383 ms
12:26:46 PM.774: ┣obs_load_all_modules: 369.449 ms
12:26:46 PM.774: ┃ ┣obs_init_module(coreaudio-encoder.dll): 0.81 ms
12:26:46 PM.774: ┃ ┣obs_init_module(decklink-ouput-ui.dll): 1.291 ms
12:26:46 PM.774: ┃ ┣obs_init_module(enc-amf.dll): 50.877 ms
12:26:46 PM.774: ┃ ┣obs_init_module(frontend-tools.dll): 10.91 ms
12:26:46 PM.774: ┃ ┣obs_init_module(image-source.dll): 0.004 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-browser.dll): 1.82 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-ffmpeg.dll): 18.197 ms
12:26:46 PM.774: ┃ ┃ ┗nvenc_check: 17.667 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-filters.dll): 0.012 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-outputs.dll): 0.296 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-qsv11.dll): 30.294 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-text.dll): 0.277 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-transitions.dll): 0.01 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-vst.dll): 0.002 ms
12:26:46 PM.774: ┃ ┣obs_init_module(obs-x264.dll): 0.001 ms
12:26:46 PM.774: ┃ ┣obs_init_module(rtmp-services.dll): 3.003 ms
12:26:46 PM.774: ┃ ┣obs_init_module(StreamDeckPlugin.dll): 7.56 ms
12:26:46 PM.774: ┃ ┣obs_init_module(text-freetype2.dll): 0.322 ms
12:26:46 PM.774: ┃ ┣obs_init_module(vlc-video.dll): 0.04 ms
12:26:46 PM.774: ┃ ┣obs_init_module(win-capture.dll): 0.393 ms
12:26:46 PM.774: ┃ ┣obs_init_module(win-decklink.dll): 4.128 ms
12:26:46 PM.774: ┃ ┣obs_init_module(win-dshow.dll): 5.045 ms
12:26:46 PM.774: ┃ ┣obs_init_module(win-mf.dll): 0 ms
12:26:46 PM.774: ┃ ┣obs_init_module(win-wasapi.dll): 0.02 ms
12:26:46 PM.774: ┃ ┗reset_win32_symbol_paths: 0.654 ms
12:26:46 PM.774: ┣OBSBasic::ResetOutputs: 1.825 ms
12:26:46 PM.774: ┣OBSBasic::CreateHotkeys: 0.289 ms
12:26:46 PM.774: ┣OBSBasic::InitService: 3.516 ms
12:26:46 PM.774: ┣OBSBasic::InitPrimitives: 0.086 ms
12:26:46 PM.774: ┗OBSBasic::Load: 896.065 ms
12:26:46 PM.774: obs_hotkey_thread(25 ms): min=0.004 ms, median=0.011 ms, max=25.934 ms, 99th percentile=0.19 ms, 99.9997% below 25 ms
12:26:46 PM.774: audio_thread(Audio): min=0 ms, median=0.497 ms, max=706.4 ms, 99th percentile=3.445 ms
12:26:46 PM.774: ┗receive_audio: min=0.011 ms, median=0.409 ms, max=428.731 ms, 99th percentile=2.433 ms, 0.884477 calls per parent call
12:26:46 PM.774: ┣buffer_audio: min=0 ms, median=0.001 ms, max=4.111 ms, 99th percentile=0.01 ms
12:26:46 PM.774: ┗do_encode: min=0.093 ms, median=0.403 ms, max=428.687 ms, 99th percentile=2.377 ms
12:26:46 PM.774: ┗encode(simple_aac): min=0.088 ms, median=0.389 ms, max=428.631 ms, 99th percentile=2.149 ms
12:26:46 PM.775: obs_graphics_thread(33.3333 ms): min=0.113 ms, median=1.74 ms, max=801.117 ms, 99th percentile=7.788 ms, 99.9827% below 33.333 ms
12:26:46 PM.775: ┣tick_sources: min=0.001 ms, median=0.011 ms, max=800.924 ms, 99th percentile=0.142 ms
12:26:46 PM.775: ┣output_frame: min=0.109 ms, median=0.865 ms, max=239.818 ms, 99th percentile=5.282 ms
12:26:46 PM.775: ┃ ┗gs_context(video->graphics): min=0.108 ms, median=0.865 ms, max=239.816 ms, 99th percentile=5.279 ms
12:26:46 PM.775: ┃ ┣render_video: min=0.006 ms, median=0.79 ms, max=210.69 ms, 99th percentile=4.823 ms
12:26:46 PM.775: ┃ ┃ ┣render_main_texture: min=0.003 ms, median=0.432 ms, max=209.709 ms, 99th percentile=3.202 ms
12:26:46 PM.775: ┃ ┃ ┣render_convert_texture: min=0.011 ms, median=0.02 ms, max=21.095 ms, 99th percentile=0.142 ms, 0.883532 calls per parent call
12:26:46 PM.775: ┃ ┃ ┗output_gpu_encoders: min=0 ms, median=0.057 ms, max=22.439 ms, 99th percentile=0.238 ms, 0.883532 calls per parent call
12:26:46 PM.775: ┃ ┗gs_flush: min=0.02 ms, median=0.068 ms, max=234.898 ms, 99th percentile=0.569 ms
12:26:46 PM.775: ┗render_displays: min=0.001 ms, median=0.844 ms, max=227.758 ms, 99th percentile=2.743 ms
12:26:46 PM.775: =================================================
12:26:46 PM.775: == Profiler Time Between Calls ==================
12:26:46 PM.775: obs_hotkey_thread(25 ms): min=24.075 ms, median=25.92 ms, max=362.39 ms, 9.34932% within ±2% of 25 ms (0.117525% lower, 90.5332% higher)
12:26:46 PM.775: obs_graphics_thread(33.3333 ms): min=1.944 ms, median=33.333 ms, max=801.127 ms, 97.2615% within ±2% of 33.333 ms (1.36734% lower, 1.37113% higher)
12:26:46 PM.775: =================================================
12:26:47 PM.112: Number of memory leaks: 0
 

Narcogen

Active Member
The below log lines indicates your computer is unable to keep up with the stream of content from your capture device-- either your CPU or your USB bus/controller are overloaded by something.

12:23:47 PM.924: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: El Gato)
12:25:14 PM.578: adding 46 milliseconds of audio buffering, total audio buffering is now 92 milliseconds (source: El Gato)
12:25:14 PM.692: adding 23 milliseconds of audio buffering, total audio buffering is now 116 milliseconds (source: El Gato)
12:25:58 PM.282: adding 417 milliseconds of audio buffering, total audio buffering is now 534 milliseconds (source: El Gato)
 
Top