https://github.com/jonluca/buggy-avassetwriter
This is a repo containing sample code demonstrating the bugginess of ScreenCaptureKit and AVAssetWriter
https://github.com/jonluca/buggy-avassetwriter
Last synced: 12 months ago
JSON representation
This is a repo containing sample code demonstrating the bugginess of ScreenCaptureKit and AVAssetWriter
- Host: GitHub
- URL: https://github.com/jonluca/buggy-avassetwriter
- Owner: jonluca
- Created: 2023-02-01T04:01:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-01T04:23:04.000Z (over 3 years ago)
- Last Synced: 2025-04-04T23:12:13.385Z (about 1 year ago)
- Language: Swift
- Size: 38.1 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ScreenCaptureKit and AVAssetWriter
This repo is being used as a demonstration of a bug with AVAssetWriter when used in conjunction with ScreenCaptureKit. I could be doing something wrong here, but this code looks pretty similar to the code that is published by apple as their walkthrough https://developer.apple.com/documentation/screencapturekit/capturing_screen_content_in_macos
## The Error
If the error shows up on your machine, you should see about a thousand `Error writing video - The operation could not be completed` within seconds.
Digging into the error gets you this, which is not particularly useful.
"Optional(Error Domain=AVFoundationErrorDomain Code=-11800 \"The operation could not be completed\" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12785), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x600000c066d0 {Error Domain=NSOSStatusErrorDomain Code=-12785 \"(null)\"}})"
Whats even weirder is that this code works here! https://github.com/garethpaul/ScreenRecorderMacOS - if you run this repo, it should work perfectly.