Building a Screen Recording App in Swift with ScreenCaptureKit
I needed a screen recorder triggered by scripts, not a human clicking Record. No app could do it, so I built a Screen Studio alternative in Swift.
By Mike Hodgen
I'm building a system where AI creates product demo videos automatically — it writes the script, performs the demo in a browser, and records the whole thing without me touching a single button. To make that work, I needed a screen recording app that could be triggered by a script, not by a human clicking "Record."
Nothing on the market did what I needed. So I built my own.
Why Build a Screen Recorder When You Can Buy One
Screen Studio is a popular recording app. It costs $89 a year, produces beautiful videos, and for most people it's a great choice. But it's designed for humans. You open it, click a button, record, click stop. There's no way for another program to tell it "start recording now" — which is exactly what my automated demo pipeline requires.
Think of it like this. I needed a camera operator that takes orders from a robot. Every screen recorder on the market is a camera operator that only takes orders from a person standing in the room.
OBS is free but built for livestreamers — the controls look like an airplane cockpit. QuickTime can record your screen but gives you zero control over anything useful.
My requirements were specific. I needed a tiny app that sits quietly in the corner of the screen. I needed it to record with a webcam circle in the corner (so the demo has a human face). I needed it to capture my voice alongside whatever's happening on screen. I needed a smooth zoom effect that follows wherever I click, so viewers can see small details. And most importantly, I needed my automation scripts to be able to start and stop recordings on their own.
That last requirement killed every existing option.
This is the same pattern I follow everywhere. When a tool costs more than a few hours of building time and can't do the one thing you actually need, the math changes. Build what you need, own the result.
What I Built and How It Works
Apple gives developers a set of building blocks for screen recording. Think of it like LEGO pieces specifically designed for capturing what's on your screen. I assembled those pieces into an app that does exactly what I need.
The app lives in the menu bar — that little strip at the top of your Mac screen. No big window, no clutter. Just a small circle that turns red when it's recording. Hit a keyboard shortcut and recording starts. Hit it again and it stops. Simple for a human, but also controllable by a script running in the background.
The webcam circle. You know those demo videos where there's a little round video of the presenter's face in the corner? My app does that by running two cameras at once — one capturing the screen, one capturing my face — and stitching them together in real time, 60 times per second. It's like picture-in-picture on your TV, except the small picture is cropped into a circle.
The auto-zoom. This is the feature that separates amateur recordings from professional ones. When you click something on screen, the recording smoothly zooms in to show the detail, holds for a moment, then eases back out. My app captures the screen at extremely high resolution — think of it as filming with a 5K camera — and then crops into a smaller area when it needs to zoom. Because the source image is so large, the zoomed-in version still looks perfectly sharp. Zero quality loss.
The audio. Two separate audio streams — the sounds coming from the computer and my voice from the microphone — get mixed together and saved in sync. Getting those two streams to line up properly cost me an entire afternoon of debugging. Without the fix, my voice would slowly drift out of sync over a five-minute recording. Subtle, but it makes your video feel "off" in a way viewers can't quite identify.
The whole app is about 2,400 lines of code and uses roughly 30 megabytes of memory while recording. Screen Studio, built on web browser technology under the hood, uses over 400 megabytes. When my machine is simultaneously running the AI demo system, a web browser, and whatever I'm recording, that difference matters.
The Real Math: Build vs. Buy
Honest accounting. The app took about 12 hours to build across a weekend. Screen Studio is $89 a year. So purely on dollars, this only "pays for itself" if you value those 12 hours at less than $7.40 each. That math obviously doesn't work if saving $89 is your goal.
The real value is the capability I now own.
Since that initial weekend, I've added: a way for scripts to trigger recordings automatically, automatic upload to cloud storage when a recording finishes, and full integration with my demo video pipeline — where AI performs the demo and the recorder captures it, all without human intervention.
None of that would be possible with Screen Studio. Not even close.
I'll be honest about the tradeoffs. Screen Studio's visual polish — pretty borders around windows, smooth cursor effects, background blur — is genuinely good. Replicating all of that would take another 20-plus hours. For a one-off recording where you want maximum visual flair, just buy Screen Studio.
For a production system where recordings need to happen automatically, feed into an automated editing process, and run without anyone watching — build your own. The 12-hour investment pays dividends every single time a recording happens without me.
This is the same philosophy behind everything I build for my DTC fashion brand, where 29 automation systems run daily and save over 3,000 hours a year. I don't recommend tools I haven't built alternatives to. I build the tools because that's the only way to know what's actually possible and where the real limits are.
Thinking About AI for Your Business?
If this resonated — building exactly what you need instead of duct-taping tools together and hoping they don't change their pricing — let's have a conversation. I do free 30-minute discovery calls where we look at your operations and identify where AI or custom tooling could actually move the needle. No slides, no pitch deck. Just an honest conversation about what's possible.
Get AI insights for business leaders
Practical AI strategy from someone who built the systems — not just studied them. No spam, no fluff.
Ready to automate your growth?
Book a free 30-minute strategy call with Hodgen.AI.
Book a Strategy Call