Audio is way ahead of video during stream

iamshylarenae

New Member
Hi! I just recently started streaming from my 2017 MacBook Pro, the processor is 2.3 GHz Dual-Core Intel Core i5, and the graphic are Intel Iris Plus Graphics 640 1536 MB.
I've recently been having issues in recording and streaming where the audio about 1-2 minutes in will randomly speed up and not link up with the video at all. After saving the recording, it cuts out minutes of the video but leaves the sped up audio in.
I'm also using Apple VT H624 Hardware encoder, 1280x720 resolution, and 3000 bitrate.
Is there a way to easily fix this or am I just screwed with the laptop I'm using?
Here's my log file as well: https://obsproject.com/logs/Yln6d53Siptbi4Bs
Thanks in advanced!
 

Lawrence_SoCal

Active Member
Audio is SOOOO much easier (therfore computationally faster) to process than video
However, getting out of sync is usually a result of having sperate sources (ie separate microphone vs camera source, instead of example a webcam with mic) and system getting overloaded

i5-7360U CPU @ 2.30GHz - the U means ultra-lower power (long battery life) = very susceptible to thermal throttling.. so beware
lots is possible, but presume you'll need to get into real-time system monitoring, and finding out if way to monitor thermals

log fails to show a Recording and/or Streaming session.. so missing key details (like encoding option in use, encoding performance, etc.). We need a full log

beware streamlements... my perspective is all function, low code maturity.. in everything of theirs I've seen. ie, crap ... but ... do what you gotta do... but worth testing without that browser session running at all

And with that old of a system, assume you need to do Operating System optimization as well (an art in itself). Do NOT be typical Mac user with lots of things open in the background, assuming MacOS will handle everything for you... it can't when asking to do more than is possible... this is when user has to take control and stop/disable unnecessary background processes, ensure default video settings not creating unnecessary workloads (ie, OS eye candy).. etc.

There is a lot possible, but squeaking out on an old system takes care and expertise, usually. And doing something to keep system cool (like using an external fan, or ?? sorry, I don't know that model so not sure exact options) to reduce/minimize thermal throttling. And then being realistic with expectations on OBS Studio performance
 

iamshylarenae

New Member
Audio is SOOOO much easier (therfore computationally faster) to process than video
However, getting out of sync is usually a result of having sperate sources (ie separate microphone vs camera source, instead of example a webcam with mic) and system getting overloaded

i5-7360U CPU @ 2.30GHz - the U means ultra-lower power (long battery life) = very susceptible to thermal throttling.. so beware
lots is possible, but presume you'll need to get into real-time system monitoring, and finding out if way to monitor thermals

log fails to show a Recording and/or Streaming session.. so missing key details (like encoding option in use, encoding performance, etc.). We need a full log

beware streamlements... my perspective is all function, low code maturity.. in everything of theirs I've seen. ie, crap ... but ... do what you gotta do... but worth testing without that browser session running at all

And with that old of a system, assume you need to do Operating System optimization as well (an art in itself). Do NOT be typical Mac user with lots of things open in the background, assuming MacOS will handle everything for you... it can't when asking to do more than is possible... this is when user has to take control and stop/disable unnecessary background processes, ensure default video settings not creating unnecessary workloads (ie, OS eye candy).. etc.

There is a lot possible, but squeaking out on an old system takes care and expertise, usually. And doing something to keep system cool (like using an external fan, or ?? sorry, I don't know that model so not sure exact options) to reduce/minimize thermal throttling. And then being realistic with expectations on OBS Studio performance
Sorry, I'm very new to this. I just did a recording where the issue is still happening, here's that log file: https://obsproject.com/logs/FslG4KURQOql2tEi

I'm using a docking station with a yeti mic and an meet webcam, would using the webcam mic help this issue at all?
I also have nothing but OBS running on my Mac when recording/going live
 

iamshylarenae

New Member
Sorry, I'm very new to this. I just did a recording where the issue is still happening, here's that log file: https://obsproject.com/logs/FslG4KURQOql2tEi

I'm using a docking station with a yeti mic and an meet webcam, would using the webcam mic help this issue at all?
I also have nothing but OBS running on my Mac when recording/going live
Audio is SOOOO much easier (therfore computationally faster) to process than video
However, getting out of sync is usually a result of having sperate sources (ie separate microphone vs camera source, instead of example a webcam with mic) and system getting overloaded

i5-7360U CPU @ 2.30GHz - the U means ultra-lower power (long battery life) = very susceptible to thermal throttling.. so beware
lots is possible, but presume you'll need to get into real-time system monitoring, and finding out if way to monitor thermals

log fails to show a Recording and/or Streaming session.. so missing key details (like encoding option in use, encoding performance, etc.). We need a full log

beware streamlements... my perspective is all function, low code maturity.. in everything of theirs I've seen. ie, crap ... but ... do what you gotta do... but worth testing without that browser session running at all

And with that old of a system, assume you need to do Operating System optimization as well (an art in itself). Do NOT be typical Mac user with lots of things open in the background, assuming MacOS will handle everything for you... it can't when asking to do more than is possible... this is when user has to take control and stop/disable unnecessary background processes, ensure default video settings not creating unnecessary workloads (ie, OS eye candy).. etc.

There is a lot possible, but squeaking out on an old system takes care and expertise, usually. And doing something to keep system cool (like using an external fan, or ?? sorry, I don't know that model so not sure exact options) to reduce/minimize thermal throttling. And then being realistic with expectations on OBS Studio performance
I also forgot to mention, I do use a laptop cooling station, which has significantly helped with the CPU usage.
 

Lawrence_SoCal

Active Member
Sorry, I'm very new to this. I just did a recording where the issue is still happening, here's that log file: https://obsproject.com/logs/FslG4KURQOql2tEi

I'm using a docking station with a yeti mic and an meet webcam, would using the webcam mic help this issue at all?
maybe with sync, at loss of audio quality... I'd focus on seeing if you can get system working better / more optimally before changing mics
I also have nothing but OBS running on my Mac when recording/going live
Not sure your MacOS expertise level. so, I'll just beware background tasks (not necessarily a user UI foreground type application). You have to get into process level details (typically) to see what all is actually running. Don't assume

I also forgot to mention, I do use a laptop cooling station, which has significantly helped with the CPU usage.
Makes sense, and glad you already have one. Still worthwhile looking into how one uses software to monitor real-time thermals inside the laptop and find/figure out how to detect thermal throttling. This is important as performance could be fine, then tank with no workload change... 'cuz of thermals. So you either have to monitor, or come up with settings that never approach your systems thermal limits (which will be hard to do)

Yup, system overloaded with those settings (rendering lag)
15:37:52.788: Output 'Replay Buffer': Number of lagged frames due to rendering lag/stalls: 2 (16.7%)​
15:37:52.789: ==== Replay Buffer Stop ============================================​
...​
15:40:06.165: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 386 (9.6%)​
15:40:06.171: ==== Recording Stop ================================================​
....​
15:40:44.616: Output 'Vertical Backtrack': Number of lagged frames due to rendering lag/stalls: 478 (9.3%)​
15:40:44.629: Video stopped, number of skipped frames due to encoding lag: 49/5163 (0.9%)​

Now, I'm not a subject matter expert on your system or MacOS, so someone else will need to comment on your OBS Studio settings in terms of whether they are optimal for your system or not (ie, making best use of GPU encoding offload).

15:37:52.442: [VideoToolbox vertical_canvas_record_video_encoder: 'h264']: session created with hardware encoding​
15:37:52.454: [VideoToolbox vertical_canvas_record_video_encoder: 'h264']: settings:​
15:37:52.454: vt_encoder_id com.apple.videotoolbox.videoencoder.h264.gva​
with available options being (from earlier in log)
15:37:18.874: - com.apple.videotoolbox.videoencoder.prores-422 (Apple VT ProRes Software Encoder)​
15:37:18.874: - com.apple.videotoolbox.videoencoder.h264.gva (Apple VT H264 Hardware Encoder)​
15:37:18.874: - com.apple.videotoolbox.videoencoder.h264 (Apple VT H264 Software Encoder)​
15:37:18.874: - com.apple.videotoolbox.videoencoder.hevc.gva (Apple VT HEVC Hardware Encoder)​
15:37:18.874: - com.apple.videotoolbox.videoencoder.hevc.vcp (Apple VT HEVC Software Encoder)​

15:37:52.454: rate_control: ABR​
15:37:52.454: bitrate: 2500 (kbps)​
15:37:52.454: quality: 0.600000​
15:37:52.454: fps_num: 30​
15:37:52.454: fps_den: 1​
15:37:52.454: width: 1080​
15:37:52.454: height: 1920​
15:37:52.454: keyint: 2 (s)​
15:37:52.454: limit_bitrate: off​
15:37:52.454: rc_max_bitrate: 2500 (kbps)​
15:37:52.454: rc_max_bitrate_window: 1.500000 (s)​
15:37:52.454: hw_enc: on​
15:37:52.454: profile: high​
15:37:52.454: codec_type: h264​

Dang,,, i really hate streamelements... such a piece of %$#!
- anyway... see your own log.. see all those errors. not helping when CPU is already overloaded.
- have you tested without streamelements in OBS Browser at all?
- either on you, or maybe someone will comment on how to clean up all those errors (presume fixing your config, and or using other browser, or ??) see above starting comment ;^)
 

Lawrence_SoCal

Active Member
I also have nothing but OBS running on my Mac when recording/going live
I'm guessing that is not true... as I saw replay bufer, so gaming right? so gaming app running right, and that is what you are capturing?
OBS Studio is used for far more than just gaming, so many of us (incl me) don't always assume gaming as use case

In your case, is the gaming just on the Nintendo/Wii? in which case you have both webcam and (guessing HDMI video capture card)?
in which case, make sure those settings optimized
And a 4K webcam? I suggest lowering system workload by dropping webcam output to 1080p (or even lower) to reduce system workload
 

AaronD

Active Member
Like Lawrence said, generally laptops will fail a few minutes into a stream - not right away - because their specs on paper are enough, but the cooling system is not. You have a cooling station, but it seems that that's not enough either.

If you must use a laptop, look at a Mobile Workstation. Those are thick, heavy, and expensive, because they actually DO have a full-sized cooling system that most people don't need. They'll keep their published specs at full load indefinitely. No other type of laptop will. Even gaming laptops cut some corners that these don't. It might also mean that you can't use a Mac, because I don't know that Apple actually makes a MW.

If you can use a desktop tower - maybe a cart would be portable enough? - then that's the more cost-effective way to avoid thermal throttling.
 

Lawrence_SoCal

Active Member
Aaron.. true.. but that all costs. I'm guessing this person would love to see if they can get this to work

Is there a way to easily fix this or am I just screwed with the laptop I'm using?
Easy fix... maybe (but need someone with MacOS expertise to chime in)... more likely, getting old system to work will take effort to get under the hood at Operating System level to optimize, and then optimize OBS Studio settings, with realistic settings for system constraints. then decide if that is good enough or not.
if that is too much, then, yea OP will need newer, more powerful, less thermally constrained system
 
Top