-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Environment:
- macOS Version: 15 (darwin 24.1.0)
- Python Version: 3.9.9 (via pyenv)
- PyObjC Version: 11.0 (installed via
pip install pyobjc)
Problem Description:
We are trying to capture system audio output using ScreenCaptureKit with PyObjC, specifically without relying on external tools like BlackHole. We understand that ScreenCaptureKit's primary purpose is screen recording, but native Swift/Objective-C implementations have confirmed that capturing system audio is possible with this framework.
However, using PyObjC (version 11.0) on macOS 15, we consistently fail to achieve this. The main issues encountered are:
- The
SCStreamstarts but stops almost immediately, reportingError Domain=com.apple.ScreenCaptureKit.SCStreamErrorDomain Code=-3805 "流播放期间,应用程序连接中断而导致失败" UserInfo={NSLocalizedDescription=流播放期间,应用程序连接中断而导致失败}(equivalent toSCStreamError.connectionInvalid). - Alternatively, the stream appears to start successfully ("流已成功启动!正在监听音频...") but the audio sample buffer callback (
stream_didOutputSampleBuffer_ofType_forSCStreamOutputTypeAudio) is never invoked, even when system
Describe the bug
A clear and concise description of what the bug is.
Platform information
- Python version
- How was python installed (python.org, anaconda, homebrew, ...)
- macOS version
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working