Blog
Notes from building Shotnix.
What went wrong under the hood of a Mac screen recorder, how it was measured, and the code that fixed it. Everything here is in the open-source repository. New posts show up in the RSS feed.
One missing autoreleasepool made our video export grow past 70 GB
Every decoded frame stayed alive until macOS closed the app. A requestMediaDataWhenReady loop, and one autoreleasepool per frame.
· 3 min readAVVideoQualityKey: why 1.0 broke our recordings and 0.8 made them 8× smaller
Quality 1.0 switched recordings to High 4:4:4 Predictive. Quality 0.7 to 0.88 let the encoder spend bits where the screen actually changes.
· 4 min readPure red came back as (234, 0, 2): getting color right with AVAssetWriter
The file had no YCbCr matrix tag, so red came back as (234, 0, 2). Core Graphics and Core Media disagree about Rec.709's curve, so exports came back lighter.
The app these notes come from.
Shotnix is free and open source: screenshots, screen recordings, and a video editor for Mac.
11.7 MB · Apple silicon (M1 or later) · macOS 13+ · notarized by Apple · MIT license