Question / Help Game audio progressively going out of sync during stream.

MRogerss

New Member
Hi there,

I currently stream using a MacBook Pro, Elgato HD60S and my PS4. When I start streaming the game audio is in sync but after an hour or so there is a delay of eventually up to about 1 second.

I have looked online and I've seen suggestions about unchecking a timestamps box which isn't an option on Mac.

Here is a log file from my most recent stream:

21:18:05.314: CPU Name: Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
21:18:05.314: CPU Speed: 2300MHz
21:18:05.314: Physical Cores: 2, Logical Cores: 4
21:18:05.314: Physical Memory: 8192MB Total
21:18:05.314: OS Name: Mac OS X (NSMACHOperatingSystem)
21:18:05.314: OS Version: Version 10.14.6 (Build 18G87)
21:18:05.314: Kernel Version: 18.7.0
21:18:05.319: hotkeys-cocoa: Using layout 'com.apple.keylayout.British'
21:18:05.319: Portable mode: false
21:18:05.407: OBS 23.2.1 (mac)
21:18:05.407: ---------------------------------
21:18:05.408: ---------------------------------
21:18:05.408: audio settings reset:
21:18:05.408: samples per sec: 44100
21:18:05.408: speakers: 2
21:18:05.409: ---------------------------------
21:18:05.409: Initializing OpenGL...
21:18:05.436: Loading up OpenGL on adapter Intel Inc. Intel(R) Iris(TM) Plus Graphics 640
21:18:05.436: OpenGL loaded successfully, version 4.1 INTEL-12.10.12, shading language 4.10
21:18:05.520: ---------------------------------
21:18:05.520: video settings reset:
21:18:05.520: base resolution: 1280x720
21:18:05.520: output resolution: 1280x720
21:18:05.520: downscale filter: Bicubic
21:18:05.520: fps: 30/1
21:18:05.520: format: NV12
21:18:05.520: YUV mode: 601/Partial
21:18:05.520: NV12 texture support not available
21:18:05.521: Audio monitoring device:
21:18:05.521: name: Default
21:18:05.521: id: default
21:18:05.521: ---------------------------------
21:18:05.526: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
21:18:05.534: os_dlopen(libpython3.6m.dylib->libpython3.6m.dylib): dlopen(libpython3.6m.dylib, 257): image not found
21:18:05.534:
21:18:05.534: [Python] Could not load library: libpython3.6m.dylib
21:18:05.585: No blackmagic support
21:18:05.655: [VideoToolbox encoder]: Adding VideoToolbox H264 encoders
21:18:05.694: [obs-browser]: Version 2.4.0
21:18:05.716: os_dlopen(/Applications/VLC.app/Contents/MacOS/lib/libvlccore.dylib->/Applications/VLC.app/Contents/MacOS/lib/libvlccore.dylib): dlopen(/Applications/VLC.app/Contents/MacOS/lib/libvlccore.dylib, 257): image not found
21:18:05.716:
21:18:05.716: Couldn't find VLC installation, VLC video source disabled
21:18:05.716: Ignoring old obs-browser.so version
21:18:05.718: [obs-ndi] hello ! (version 4.6.0)
21:18:05.718: [obs-ndi] Trying ''
21:18:05.718: [obs-ndi] Trying '/usr/lib'
21:18:05.718: [obs-ndi] Trying '/usr/local/lib'
21:18:05.718: [obs-ndi] Found NDI library at '/usr/local/lib/libndi.3.dylib'
21:18:05.720: [obs-ndi] NDI runtime loaded successfully
21:18:05.720: [obs-ndi] NDI library initialized successfully (NDI SDK APPLE 17:46:42 Apr 23 2019 3.8.0)
21:18:05.723: ---------------------------------
21:18:05.723: Loaded Modules:
21:18:05.723: obs-ndi.so
21:18:05.723: vlc-video.so
21:18:05.723: text-freetype2.so
21:18:05.723: rtmp-services.so
21:18:05.723: obs-x264.so
21:18:05.723: obs-vst.so
21:18:05.723: obs-transitions.so
21:18:05.723: obs-outputs.so
21:18:05.723: obs-filters.so
21:18:05.723: obs-ffmpeg.so
21:18:05.723: obs-browser.so
21:18:05.723: mac-vth264.so
21:18:05.723: mac-syphon.so
21:18:05.723: mac-decklink.so
21:18:05.723: mac-capture.so
21:18:05.723: mac-avcapture.so
21:18:05.723: linux-jack.so
21:18:05.723: image-source.so
21:18:05.723: frontend-tools.so
21:18:05.723: decklink-ouput-ui.so
21:18:05.723: coreaudio-encoder.so
21:18:05.723: ---------------------------------
21:18:05.723: ==== Startup complete ===============================================
21:18:05.756: Switched to Preview/Program mode
21:18:05.756: ------------------------------------------------
21:18:05.757: All scene data cleared
21:18:05.757: ------------------------------------------------
21:18:05.786: coreaudio: device 'Built-in Microphone' initialized
21:18:05.832: WEBCAM: Selected device 'FaceTime HD Camera'
21:18:05.835: WEBCAM: Using preset 1280x720
21:18:09.635: Failed to open file '/Users/matthew/Desktop/STREAMING/RESUME.jpg': No such file or directory
21:18:09.635: gs_image_file_init_internal: Failed to load file '/Users/matthew/Desktop/STREAMING/RESUME.jpg'
21:18:09.635: [image_source: 'RESUME'] failed to load texture '/Users/matthew/Desktop/STREAMING/RESUME.jpg'
21:18:09.637: [obs-ndi] started A/V threads for source 'MATTHEWS-MBP (OBS Link)'
21:18:09.637: Switched to scene 'Stream'
21:18:09.639: [obs-ndi] A/V thread for 'ELGATO' started
21:18:09.640: ------------------------------------------------
21:18:09.640: Loaded scenes:
21:18:09.640: - scene 'RESUME SHORTLY':
21:18:09.640: - source: 'RESUME' (image_source)
21:18:09.640: - scene 'Stream':
21:18:09.640: - source: 'ELGATO' (ndi_source)
21:18:09.640: - source: 'WEBCAM' (av_capture_input)
21:18:09.640: - source: 'ALERT BOX' (browser_source)
21:18:09.640: - source: 'WEBCAM OVERLAY' (image_source)
21:18:09.640: - source: 'FOLLOWER GOAL' (browser_source)
21:18:09.640: - scene 'INTERNET':
21:18:09.640: ------------------------------------------------
21:18:09.790: adding 23 milliseconds of audio buffering, total audio buffering is now 23 milliseconds (source: Mic/Aux)
21:18:09.790:
21:18:09.893: adding 23 milliseconds of audio buffering, total audio buffering is now 46 milliseconds (source: Mic/Aux)
21:18:09.893:
21:18:14.910: Switched to scene 'Stream'
21:18:14.948: Switched to regular Preview mode
21:18:14.948: ------------------------------------------------
21:18:17.848: ---------------------------------
21:18:17.848: [x264 encoder: 'simple_h264_stream'] preset: veryfast
21:18:17.848: [x264 encoder: 'simple_h264_stream'] settings:
21:18:17.848: rate_control: CBR
21:18:17.848: bitrate: 1650
21:18:17.848: buffer size: 1650
21:18:17.848: crf: 0
21:18:17.848: fps_num: 30
21:18:17.848: fps_den: 1
21:18:17.848: width: 1280
21:18:17.848: height: 720
21:18:17.848: keyint: 60
21:18:17.848:
21:18:17.848: [x264 encoder: 'simple_h264_stream'] custom settings: scenecut=0
21:18:17.854: [CoreAudio AAC: 'simple_aac']: settings:
21:18:17.854: mode: AAC
21:18:17.854: bitrate: 160
21:18:17.854: sample rate: 44100
21:18:17.854: cbr: on
21:18:17.854: output buffer: 1536
21:18:17.855: [rtmp stream: 'simple_stream'] Connecting to RTMP URL rtmp://live-lhr.twitch.tv/app...
21:18:19.508: [rtmp stream: 'simple_stream'] Connection to rtmp://live-lhr.twitch.tv/app successful
21:18:19.510: ==== Streaming Start ===============================================
21:32:06.939: adding 23 milliseconds of audio buffering, total audio buffering is now 69 milliseconds (source: ELGATO)
21:32:06.939:
23:28:18.050: [rtmp stream: 'simple_stream'] User stopped the stream
23:28:18.056: Output 'simple_stream': stopping
23:28:18.056: Output 'simple_stream': Total frames output: 233749 (233928 attempted)
23:28:18.056: Output 'simple_stream': Total drawn frames: 233994 (234005 attempted)
23:28:18.056: Output 'simple_stream': Number of lagged frames due to rendering lag/stalls: 11 (0.0%)
23:28:18.056: Output 'simple_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 179 (0.1%)
23:28:18.059: ==== Streaming Stop ================================================
23:28:25.699: ==== Shutting down ==================================================
23:28:25.703: Switched to scene '(null)'
23:28:25.729: [obs-ndi] audio thread for 'ELGATO' completed
23:28:26.352: All scene data cleared
23:28:26.352: ------------------------------------------------
23:28:26.402: Freeing OBS context data
23:28:26.407: [obs-ndi] goodbye !
23:28:26.444: [Scripting] Total detached callbacks: 0
23:28:26.455: == Profiler Results =============================
23:28:26.455: run_program_init: 4651.01 ms
23:28:26.455: ┣OBSApp::AppInit: 4.685 ms
23:28:26.455: ┃ ┗OBSApp::InitLocale: 2.346 ms
23:28:26.455: ┗OBSApp::OBSInit: 4396.04 ms
23:28:26.455: ┣obs_startup: 4.566 ms
23:28:26.455: ┗OBSBasic::OBSInit: 4302.77 ms
23:28:26.455: ┣OBSBasic::InitBasicConfig: 0.261 ms
23:28:26.455: ┣OBSBasic::ResetAudio: 0.089 ms
23:28:26.455: ┣OBSBasic::ResetVideo: 113.045 ms
23:28:26.455: ┣OBSBasic::InitOBSCallbacks: 0.006 ms
23:28:26.455: ┣OBSBasic::InitHotkeys: 0.071 ms
23:28:26.455: ┣obs_load_all_modules: 201.638 ms
23:28:26.455: ┃ ┣obs_init_module(coreaudio-encoder.so): 0.01 ms
23:28:26.455: ┃ ┣obs_init_module(decklink-ouput-ui.so): 0.665 ms
23:28:26.455: ┃ ┣obs_init_module(frontend-tools.so): 3.842 ms
23:28:26.455: ┃ ┣obs_init_module(image-source.so): 0.008 ms
23:28:26.455: ┃ ┣obs_init_module(linux-jack.so): 0.004 ms
23:28:26.455: ┃ ┣obs_init_module(mac-avcapture.so): 40.198 ms
23:28:26.455: ┃ ┣obs_init_module(mac-capture.so): 0.006 ms
23:28:26.456: ┃ ┣obs_init_module(mac-decklink.so): 0.092 ms
23:28:26.456: ┃ ┣obs_init_module(mac-syphon.so): 0.005 ms
23:28:26.456: ┃ ┣obs_init_module(mac-vth264.so): 65.674 ms
23:28:26.456: ┃ ┣obs_init_module(obs-browser.so): 0.082 ms
23:28:26.456: ┃ ┣obs_init_module(obs-ffmpeg.so): 0.02 ms
23:28:26.456: ┃ ┣obs_init_module(obs-filters.so): 0.027 ms
23:28:26.456: ┃ ┣obs_init_module(obs-outputs.so): 0.011 ms
23:28:26.456: ┃ ┣obs_init_module(obs-transitions.so): 0.007 ms
23:28:26.456: ┃ ┣obs_init_module(obs-vst.so): 0.021 ms
23:28:26.456: ┃ ┣obs_init_module(obs-x264.so): 0.006 ms
23:28:26.456: ┃ ┣obs_init_module(rtmp-services.so): 1.282 ms
23:28:26.456: ┃ ┣obs_init_module(text-freetype2.so): 0.014 ms
23:28:26.456: ┃ ┣obs_init_module(vlc-video.so): 0.21 ms
23:28:26.456: ┃ ┗obs_init_module(obs-ndi.so): 4.304 ms
23:28:26.456: ┣OBSBasic::ResetOutputs: 17.32 ms
23:28:26.456: ┣OBSBasic::CreateHotkeys: 0.034 ms
23:28:26.456: ┣OBSBasic::InitService: 2.301 ms
23:28:26.456: ┣OBSBasic::InitPrimitives: 0.083 ms
23:28:26.456: ┗OBSBasic::Load: 3892.81 ms
23:28:26.456: obs_hotkey_thread(25 ms): min=0.014 ms, median=0.022 ms, max=7.382 ms, 99th percentile=0.174 ms, 100% below 25 ms
23:28:26.456: audio_thread(Audio): min=0.012 ms, median=0.616 ms, max=33.205 ms, 99th percentile=2.599 ms
23:28:26.456: ┗receive_audio: min=0.002 ms, median=0.42 ms, max=21.888 ms, 99th percentile=1.461 ms, 1.33009 calls per parent call
23:28:26.456: ┣buffer_audio: min=0 ms, median=0.001 ms, max=2.681 ms, 99th percentile=0.004 ms
23:28:26.456: ┗do_encode: min=0.177 ms, median=0.415 ms, max=21.884 ms, 99th percentile=1.448 ms
23:28:26.456: ┗encode(simple_aac): min=0.169 ms, median=0.401 ms, max=21.857 ms, 99th percentile=1.343 ms
23:28:26.456: obs_graphics_thread(33.3333 ms): min=0.076 ms, median=1.541 ms, max=3861.06 ms, 99th percentile=5.138 ms, 99.9591% below 33.333 ms
23:28:26.456: ┣tick_sources: min=0 ms, median=0.014 ms, max=3848.37 ms, 99th percentile=0.103 ms
23:28:26.456: ┣output_frame: min=0.033 ms, median=1.285 ms, max=140.458 ms, 99th percentile=3.777 ms
23:28:26.456: ┃ ┣gs_context(video->graphics): min=0.032 ms, median=1.105 ms, max=138.894 ms, 99th percentile=3.245 ms
23:28:26.456: ┃ ┃ ┣render_video: min=0.02 ms, median=1.094 ms, max=51.002 ms, 99th percentile=3.189 ms
23:28:26.456: ┃ ┃ ┃ ┣render_main_texture: min=0.017 ms, median=0.923 ms, max=44.446 ms, 99th percentile=2.704 ms
23:28:26.456: ┃ ┃ ┃ ┣render_output_texture: min=0.001 ms, median=0.024 ms, max=9.278 ms, 99th percentile=0.149 ms
23:28:26.456: ┃ ┃ ┃ ┣render_convert_texture: min=0 ms, median=0.023 ms, max=11.921 ms, 99th percentile=0.124 ms
23:28:26.456: ┃ ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.098 ms, max=31.249 ms, 99th percentile=0.438 ms
23:28:26.456: ┃ ┃ ┣gs_flush: min=0 ms, median=0 ms, max=5.752 ms, 99th percentile=0 ms
23:28:26.456: ┃ ┃ ┗download_frame: min=0 ms, median=0.002 ms, max=138.197 ms, 99th percentile=0.006 ms
23:28:26.456: ┃ ┗output_video_data: min=0.12 ms, median=0.165 ms, max=76.992 ms, 99th percentile=0.799 ms
23:28:26.456: ┗render_displays: min=0 ms, median=0.213 ms, max=66.556 ms, 99th percentile=1.649 ms
23:28:26.456: video_thread(video): min=0.467 ms, median=0.742 ms, max=89.144 ms, 99th percentile=2.059 ms
23:28:26.456: ┗receive_video: min=0.465 ms, median=0.74 ms, max=84.382 ms, 99th percentile=2.047 ms
23:28:26.456: ┗do_encode: min=0.464 ms, median=0.739 ms, max=84.379 ms, 99th percentile=2.044 ms
23:28:26.456: ┗encode(simple_h264_stream): min=0.456 ms, median=0.722 ms, max=84.36 ms, 99th percentile=1.968 ms
23:28:26.456: =================================================
23:28:26.456: == Profiler Time Between Calls ==================
23:28:26.456: obs_hotkey_thread(25 ms): min=25.036 ms, median=33.824 ms, max=94.649 ms, 0.491994% within ±2% of 25 ms (0% lower, 99.508% higher)
23:28:26.456: obs_graphics_thread(33.3333 ms): min=1.643 ms, median=33.358 ms, max=3861.06 ms, 43.344% within ±2% of 33.333 ms (27.419% lower, 29.237% higher)
23:28:26.456: =================================================
23:28:26.566: Number of memory leaks: 0


And here is a link to the stream https://www.twitch.tv/videos/479669194

Any help would be much appreciated.

Thanks
 

Narcogen

Active Member
I'm guessing your capture device and your camera are on the same USB controller. Does it still go out of sync if you remove the face cam?
 

MRogerss

New Member
No sorry it's nothing to do with the camera, the game audio is behind my gameplay sometimes, disabling and reenabling the capture card seems to fix it but annoying having to do that mid stream
 

MRogerss

New Member
I'm guessing your capture device and your camera are on the same USB controller. Does it still go out of sync if you remove the face cam?

Hi sorry I've replied above, I haven't tried it without the webcam but I don't want to stream without a facecam. Thanks
 

Narcogen

Active Member
I'm not suggesting you need to stream without a webcam, I'm suggesting a method of troubleshooting the problem that will narrow down the source of the issue.
 

fatzeblack

New Member
hi, im also having the same similar issue, I'm streaming from Mac with hd60s from a playstation, im finding the issue im having is purely the gameplay and game audio randomly going in and out of sync. if I reset everything and reconnect it it seems to go back but sometimes its not noticed until mid stream... is there any settings that I can change that would prevent it going out of sync?
 
Top