OBS Dropped Frames (Network) on Apple Silicon — update and solved

TFE

Member
I stream two live talk shows per week using OBS at 1080/30 on a Mac Studio via Restream to FB, YT, X and sometimes more CDNs. Long form, often for two hours or more. Lots of graphics via a Keynote (images and embedded videos) running on a Mac mini connected via HDMI capture card. Live guests on a third Mac (M1 MBP 14") using Skype or Zoom connected to the Mac Studio streaming computer via NDI. Over seven years we have done nearly 700 shows. Started with an old iMac, then M1 Mac Mini, now M1 Mac Studio.

Lately I've had big problems with Dropped Frames (Network), from a few per show to as many as 15%. Four green bars, to yellow bars, to red, back to maybe three green bars. Bitrate up and down like a yo-yo (even though set at CBR). No problems with encoding or rendering.

OBS, of course, says Dropped Frames (Network) are the fault of your internet or network hardware, etc., not OBS. So, I've changed the Cable Modem to the latest and greatest from Comcast/xFinity (have the top tier service with 1.2 GB/s down and 40 up. Changed ethernet cables from the Studio to the modem. Fiddled with the network settings in the Mac Studio. Re-booted the modem and Studio before every show. Had the xFinity technician out to check the network from the street in. Had Restream and xFinity on the phone for hours checking and advising. Yada yada. All to no avail.

This problem is fairly recent over the last three or four months. I see others on here and Reddit complaining, recently, about unexplained Dropped Frames (Network). And the problem persists for me regardless of MacOS version and which (recent) version of OBS is being used. I test not only on the main Mac Studio, but also another similar test machine with various recent versions of the OS and OBS — same problem.

Apparently the recommendations by many on here, Reddit, etc., to use the Apple VT Hardware encoder with Apple Silicon apparently is what has been causing the Dropped Frames, at least in my case.

Today I switched back to x264, CBR, 5500 Kbps, 2s keyframe, veryfast, and "None" for Profile and Tune. Voilá — back to ZERO dropped frames. Only 13% CPU usage (up from approx 8% with the Apple VT Hardware encoder). Tested for over three hours with lots of scene changes, video and a fake guest via NDI pushed through the system, etc. Also ran the same test on my test machine. Then re-booted, re-started everything, and did another three-hour test (same x264 settings). All good — zero frames dropped.

Perhaps the VT Hardware encoder is okay for a streamer with one camera, game capture, a mic and maybe some music from Spotify. Apparently not so for my setup.

I hope this helps others, and, as always, would appreciate any feedback.
 

Lawrence_SoCal

Active Member
Thanks for sharing your results

Yes, and overloaded system can cause all kinds of havoc
This is where having real-time monitoring in place is critical. All of your network troubleshooting you described can sometimes help, but without some monitoring, you don't really know which problem you are chasing. And that monitoring is both the local computer, as well as LAN and WAN/router.
- Most people skip such troubleshooting as they don't know how, but are doing the equivalent of driving blind-folded.
- Most people have no idea what exact traffic types and bandwidth consumed are on their LAN, with all of the various Smart and other networked devices. Those devices can cause a conflict (usually not, but...)

on MacOS, using System Monitor *might* have identified the bottleneck/resource contention ... not sure

Typically, one wants to offload real-time video rendering (which is _REALLY_ computationally intensive) to a dedicated chip (GPU encode offload), BUT, free, open-source software (FOSS) has to make due (usually) with other FOSS libraries for certain functions. And Apple's M* chips are new, with new (not mature) developer tools, etc. so, some hiccups are to be expected, from my experience (no matter how inconvenient to us users).

What I suspect might be helpful to the community (if this isn't already well known??) is
- what exactly were your encoding settings in OBS Studio before? (way more detail than you posted above.. like all the associated settings listings in the session OBS Log, if not the entire log from sessions where you had problem)
I ask in case that should have worked, and there is a conflict/bug? or if the settings ended up being a known edge case where overloading the VT hardware encoder is known to happen?
 

TFE

Member
FURTHER UPDATE — The problem of Dropped Frames (Network) returned! So after more trial and error, I tried changing Settings | Output | Output Mode back to Simple. I have been using OBS on Macs for 5+ years with Output Mode "Advanced" without any dropped frames (network) until recently. Sometimes I can stream for two hours no problem, sometimes for an hour then OBS starts dropping frames, sometimes OBS drops frames from the start. Re-boot the router, the Mac, still problem comes and goes. After extensive testing, of everything from the internet connection/modem/cabling, to OBS settings, to video and audio inputs, NDI connections, monitor settings, yada yada, nothing helped. Until a couple days ago, when I just switched Output Mode back to Simple (not used that for years!). 5500 Kbps, 128 audio bitrate, everything else default: "Hardware (Apple, H.264)" and Audio "AAC (Default)" and "Recording Format Matroska Video (.mkv)". As far as I can tell the same settings as I was using on the Advanced tab. However, on Simple the dropped frames problem has disappeared. And testing extensively the last two days, Simple has worked flawlessly, like the good ol' days.
 

Larry76

New Member
Thanks for posting this. I'm having dropped frame issues when streaming a church service. I'm using ver 30.1.2 and streaming to Restream. I use a 2022 MacBook Air M2 8gb running Sonoma 14.5. I connect a Honey Optics NDI PTZ camera and two NDI Mevos. Connect a mixer with multiple mics as a sound source. During the week I connect my system and have no dropped frames on a test webcast, but then it falls apart on Sunday when frames start dropping. Like you, I have had Comcast visit, give me the latest modem and check the system. I've got over 100mbs upload speed. I keep trying all the settings I see suggested online, but this morning we had choppy video again. I haven't tried the Apple hardware encoding as I just discovered that setting exists,. Thinking I may try simple mode and see what happens. I've only been using OBS since the Sunday after Easter.
 

Lawrence_SoCal

Active Member
I haven't tried the Apple hardware encoding as I just discovered that setting exists,. Thinking I may try simple mode and see what happens.
Not using the offload encoder will certainly have a CPU impact, which can in turn create dropped frames... your OBS Studio Log will tell you whether a network issue, or encoding/rendering lag, or other issue... usually... unless it is a network issue, in which case all you will see if network bandwidth warning and dropped frames... in which case, most of the time one needs to fix their network... but can occasionally be caused by somethign at Operating System level (and then is always the rare, other, cases)
 

Larry76

New Member
Yesterday I went back to church, connected all cameras and the audio mixer, and did some test webcasts out to Facebook and YouTube through Restream. Using the settings I had on Sunday I started getting dropped frames after about 5 minutes of streaming. Long story short, after trying several settings I found I would get zero dropped frames using the Apple VT H264 hardware encoder and 5,000 Kbs bitrate. Ran for 15 minutes, disconnected and did it again. I ran the Activity Monitor and using the Apple encoder dropped CPU usage from about 115% to 85%. Using the activity monitor clearly showed my 2022 base level MacBook Air has all the capability I need even with three NDI cameras connected at 30fps in HD. Will see what happens next Sunday. Thanks to all that have posted under this topic. Amazing how difficult this "quest" for 0 dropped frames can be.
 

Larry76

New Member
My church has a Comcast Business modem/router model GCA4332COM. Does anyone know of a way to monitor the upload rate in real time? I've gone into the internal software on the modem and don't see any pages where that stat is reported.
 

Lawrence_SoCal

Active Member
Regarding network monitoring
1. that Comcast modem, sorry I don't [did you typo that model #? I can't find any reference to it] ... maybe someone else will respond
the closest I cam across was the Xfinity xFi Advanced Gateway (XB7) Model # CGM4331COM

Alternatively, depending on your network setup, you may be able to monitor from a downstream switch
- for example, I can monitor our dedicated streaming network, as I have it isolated from the rest of the parish network by its own router and managed PoE VLAN switch. But that would NOT tell me about other office and guest network traffic... for that I'd need to
- depending on your layout, you might be able to move all but 1 LAN Ethernet connection from your ISPs mode/router {assuming no subnetting/routing involved. if yes, just a bit more involved, but similar concept still applicable} and move to a downstream switch(es) which you can monitor?
 

Larry76

New Member
Sorry that should have been CGA not GCA. So CGA4332COM. Thanks you've given me an idea! I'll look into monitoring from a switch. My OBS computer is hardwired back to the office but the signal does pass through two switches. Thanks again!
 

Lawrence_SoCal

Active Member
Sounds good but realize you are looking for 2 things... your upload actual bandwidth consumption, and overall network upload bandwidth (in case something using upload bandwidth you aren't expecting... teens on guest WiFi being notorious in that regards)
 

TFE

Member
Thanks for the feedback above. I owe you all an update (please see my original post above), and hope this helps....

Knock on wood this is now solved. But just saying that probably jinxes me, as you never know when the dropped frames (network) problem is going to recur. I'll go four or five shows with zero frames dropped, then it happens again. I continue to experiment with different settings, and again am on a roll with four, approx two-hour shows in a row with zero frames dropped, using these updated settings:

1. Before each show, I fully shut down (not sleep then restart) the Mac Studio. Am told this helps clear cache, whereas sleep/restart does not.
2. I check the network using OOKLA Speedtest. It always comes back with 1.3G or so down, and 40M up, no problem. In day to day computing I rarely notice any internet hiccups. Regardless, on a friend's advice I do re-boot the XB8 gateway once a month or so, but whether that helps I have no idea.
3. The network settings (Ethernet) on the Mac Studio are set to automatic, though I did turn off "Limit IP address tracking" per a suggestion I found online. The Mac Studio's WiFi connection is turned off.
4. In the OBS settings under "Stream" the nearest Restream.io server is now selected instead of "autodetect."
5. Under "Output" I switched back to the "Apple VT H264 Hardware Encoder." Rate Control is CBR, Bitrate 4500, Keyframe 2s, Profile high, and, in another change from my previous set-up, "Use B-Frames" is now checked.
6. One other change: Under "Advanced | Network" I have now checked "Dynamically change bitrate to manage congestions (Beta)."

Finally, I did one other thing. Using the Xfinity app (on my phone) I turned off "Participate in Xfinity WiFi" so that my xFi Gateway does NOT double as an Xfinity WiFi hotspot. It's a slider button that is not easy to find. Open the Xfinity app, tap "WiFi" at the bottom then "View WiFi Equipment," then "Advanced Settings," then the last option at the bottom "Xfinity WiFi hotspot network." There you will find the aforementioned on-off slider button.

Again, hope this helps. And any feedback always very much appreciated.
 
Last edited:

TFE

Member
P.S. In case any of you is interested, here is a photo of my desktop streaming set-up....
444501678_10163681896304746_2113169713368720017_n.jpg
 

Lawrence_SoCal

Active Member
1. Before each show, I fully shut down (not sleep then restart) the Mac Studio. Am told this helps clear cache, whereas sleep/restart does not.
true of all computers, regardless of consumer Operating System (ie Windows, Linux, MacOS, iOS, Android, etc)
And like most of those devices, developers know most people want convenience so they auto-start background services to make their application more responsive, to potential detriment of entire system. Making sure unnecessary background processes aren't runnig is a user's responsibility if they desire to optimize system performance (which you NEED to do with real-time video compositing, as you are doing with OBS Studio)
- especially make sure background sync (iCloud, etc) are NOT running while livestreaming.
2. I check the network using OOKLA Speedtest. It always comes back with 1.3G or so down, and 40M up, no problem. In day to day computing I rarely notice any internet hiccups. Regardless, on a friend's advice I do re-boot the XB8 gateway once a month or so, but whether that helps I have no idea.
Beware your interpretation of that SpeedTest result. Ookla (and others) drop (and/or significantly discount low) threshold results ... but it is exactly that low threshold that matters to livestreaming. Still means you should be fine at streaming much higher than 4500kbps... but does NOT mean you could reliably theoretically stream at 40,000kbps...
3. The network settings (Ethernet) on the Mac Studio are set to automatic, though I did turn off "Limit IP address tracking" per a suggestion I found online. The Mac Studio's WiFi connection is turned off.
Good to turn off WiFi if not using it, no sure Limit IP address tracking relevant at home (more of a mobile use thing, iirc
4. In the OBS settings under "Stream" the nearest Restream.io server is now selected instead of "autodetect."
5. Under "Output" I switched back to the "Apple VT H264 Hardware Encoder." Rate Control is CBR, Bitrate 4500, Keyframe 2s, Profile high, and, in another change from my previous set-up, "Use B-Frames" is now checked.
I suspect this was the main change (lowering CPU utilization rate) that addressed the dropped frame problem for you in this circumstance.
Once stable, I'd be inclined to increase that bitrate, if that is an option, for 1080p video to closer to 7000kbps.
6. One other change: Under "Advanced | Network" I have now checked "Dynamically change bitrate to manage congestions (Beta)."
If it is working for you... ok, but I'd avoid that Dynamic bitrate setting unless absolutely necessary
Finally, I did one other thing. Using the Xfinity app (on my phone) I turned off "Participate in Xfinity WiFi" so that my xFi Gateway does NOT double as an Xfinity WiFi hotspot. It's a slider button that is not easy to find. Open the Xfinity app, tap "WiFi" at the bottom then "View WiFi Equipment," then "Advanced Settings," then the last option at the bottom "Xfinity WiFi hotspot network." There you will find the aforementioned on-off slider button.
Absolutely.... you could easily have been allowing others to use you Upload bandwidth (especially in a condo/apartment setting, vs rural residence with no (WiFi range) nearby neighbor) depending on other settings
Having WiFi is often required for mobile devices, and misc others... I personally hard wire Ethernet everything I can ... but for some devices that isn't practical. If you have your own WiFi Access Point (AP) either in consumer router, or dedicated (stanad-alone) AP, then absolutely, turn off the extra (and potentially conflicting other AP)
 
Top