From 6c6adac9c96a8f581c511be6c03af5b3d1c439f3 Mon Sep 17 00:00:00 2001 From: jcm <6864788+jcm93@users.noreply.github.com> Date: Thu, 15 Jan 2026 13:22:55 -0600 Subject: [PATCH] mac-capture: Use 64RGBAHalf pixel format for screen capture when available --- plugins/mac-capture/mac-sck-video-capture.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/plugins/mac-capture/mac-sck-video-capture.m b/plugins/mac-capture/mac-sck-video-capture.m index c4baaec35..7c8d06da3 100644 --- a/plugins/mac-capture/mac-sck-video-capture.m +++ b/plugins/mac-capture/mac-sck-video-capture.m @@ -209,9 +209,13 @@ API_AVAILABLE(macos(12.5)) static bool init_screen_stream(struct screen_capture } else { blog(LOG_WARNING, "Unable to retrieve OBS output FPS when initializing macOS Screen Capture"); } - FourCharCode l10r_type = 0; - l10r_type = ('l' << 24) | ('1' << 16) | ('0' << 8) | 'r'; - [sc->stream_properties setPixelFormat:l10r_type]; + // Use 64RGBAHalf where available, for superior 16-bit float color and alpha depth. On prior macOS versions where + // 64RGBAHalf is unavailable, fall back to 32BGRA (8-bit UInt color and alpha). + if (@available(macOS 15.0, *)) { + [sc->stream_properties setPixelFormat:kCVPixelFormatType_64RGBAHalf]; + } else { + [sc->stream_properties setPixelFormat:kCVPixelFormatType_32BGRA]; + } if (@available(macOS 13.0, *)) { [sc->stream_properties setCapturesAudio:YES];