Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS Screen Capture performance degradation in macOS Sonoma #10636

Open
jcm93 opened this issue May 3, 2024 · 7 comments
Open

macOS Screen Capture performance degradation in macOS Sonoma #10636

jcm93 opened this issue May 3, 2024 · 7 comments

Comments

@jcm93
Copy link

jcm93 commented May 3, 2024

This issue is largely additional public tracking for a known macOS-side issue, filed as FB13691162.

Operating System Info

macOS 14

Other OS

No response

OBS Studio Version

30.1.2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/BaJhSqdClapbHqzK

OBS Studio Crash Log URL

No response

Expected Behavior

macOS Screen Capture performance should remain relatively consistent between macOS updates; users should not notice significant degradation in the framerate, performance, or number of simultaneous captures their system can support. macOS Screen Capture should also not significantly impact the responsiveness of macOS in general.

Current Behavior

In macOS Sonoma, SCK (macOS Screen Capture) performance has degraded somewhat significantly. Users have noted degraded framerates, increased incidence of rendering lag for setups that used to perform acceptably, a decrease in the number of simultaneous captures their system can support, as well as degraded performance around the rest of macOS while SCK is active. The Window Capture mode is noted as being particularly unusable at present due to the amount of rendering lag it creates.

Steps to Reproduce

  1. Update to the current version of macOS Sonoma (14.4.1 as of writing).
  2. Add one or multiple macOS Screen Capture sources.

Anything else we should know?

It is apparent that these performance concerns primarily exist with the Window Capture mode.

There are also performance concerns even with the Display and Application Capture modes, though they generally seem less severe than the degradation involving Window Capture.

@Developer-Ecosystem-Engineering
Copy link
Contributor

Around here setting [sc->stream_properties setCaptureResolution:SCCaptureResolutionNominal] should workaround this issue.

@RytoEX
Copy link
Member

RytoEX commented May 3, 2024

cc @PatTheMav

@PatTheMav
Copy link
Member

Around here setting [sc->stream_properties setCaptureResolution:SCCaptureResolutionNominal] should workaround this issue.

The problem with Nominal is that it effectively downscales a capture from its point size to a corresponding pixel size (so 1920x1080 points becomes 1920x1080 pixels). This makes window captures blurrier than their representation on the users' screens and especially for capturing games (of which many use bespoke windows to present their content) would make it impossible for users to capture their games at their native resolution.

The way I understand this bug report, is that using window capture in macOS 13 provided samples at the native window resolution (identical to the resolution observed in desktop capture) but performance regressed in macOS 14 (the expectation being that users can still capture window contents at their retina size with the same performance impact as on macOS 13).

@jcm93 do you remember/can you confirm that window capture in macOS 13 provided window contents at their actual retina resolutions?

@jcm93
Copy link
Author

jcm93 commented May 3, 2024

Yes, macOS 13 certainly provided retina-resolution buffers to OBS in the window capture mode. The provided resolution of captures for OBS has, to my knowledge, always been consistent (other than an issue in the Sonoma beta, since resolved). The performance while maintaining the same functionality is the sole concern here.

@dinvlad
Copy link

dinvlad commented May 14, 2024

Any updates on this? Facing the same issue (sorry for the bump!)

@Developer-Ecosystem-Engineering
Copy link
Contributor

Hi @dinvlad,

Definitive steps would be helpful. We've seen anecdotal data that capturing a Safari tab while playing a video, or doing multiple independent window captures, or capturing while editing a file in preview cause issues. When we investigate, we don't really see much difference of note between macOS 13 and macOS 14 while performing these actions within OBS.

We remain interested in understanding the issue!

@dinvlad
Copy link

dinvlad commented May 15, 2024

Thanks @Developer-Ecosystem-Engineering - for me it's severely lagging while doing anything at all with a single capture of the entire external display (4k@240Hz native resolution captured at 1080p@60), seemingly whether it's navigating in a browser or another app.

I don't get the same lag when I disconnect the external display and capture my Macbook M2 Max's XDR screen directly, but the GPU is still pegged at ~40% (compared to ~80% with external). Perhaps the high refresh rate on the external monitor matters?

The ~2x factor in GPU load between 4k@240Hz on the external vs ~4k@~120hz (adaptive) on internal display would seem to explain this. However, I feel like even 40% is already pretty high, for something like this (especially that it encodes only to 1080p). Or is that indeed a pretty heavy task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants