Open-Source macOS Screen Recorder for Node.js
Native ScreenCaptureKit + AVFoundation recorder with window selection, multi-display, overlay exclusion, granular audio, camera capture and cursor tracking. The same engine that powers Creavit Studio.
- MIT license
- Node.js + Electron
- Apple Silicon + Intel
Install and record from Node.js
Install the native package on a Mac with Xcode Command Line Tools. Allow screen recording in macOS Privacy & Security before capturing.
npm install node-mac-recorderconst MacRecorder = require("node-mac-recorder");
async function recordExample() {
const recorder = new MacRecorder();
await recorder.startRecording("./recording.mov");
await new Promise((resolve) => setTimeout(resolve, 5000));
await recorder.stopRecording();
}
recordExample().catch(console.error);The screen video and audio companion are separate outputs. Stop the recording before reading the completed files; use the documented audio options to choose microphone and system sound.
Read the API reference and audio setup on GitHub ↗Powered by ScreenCaptureKit
Modern, high-performance capture with native macOS APIs.
Window / Display / Area Recording
Full screen, window-specific or custom region recording with automatic overlay window exclusion via ScreenCaptureKit.
Camera Capture
Video-only camera companion clip saved with shared session timestamp. Device listing with resolution metadata.
Granular Audio Control
Separate microphone and system audio toggles with device selection. Audio saved to a synchronized companion file.
Cursor Tracking
Track mouse position, cursor types (pointer, text, grab, crosshair) and click events to JSON in real time.
Multi-Display Support
Accurate coordinate mapping across multiple displays. Automatic display detection for window recording.
Electron Compatible
Native capture integration for Electron applications, with window/display thumbnails for source selection. Review the documented permissions and lifecycle when integrating it.
Why ScreenCaptureKit + AVFoundation?
ScreenCaptureKit handles display and window capture; AVFoundation supports camera and audio capture. Your application chooses the sources and handles the resulting files.
- Native overlay window exclusion for clean videos
- Display, window and selected-area capture
- Multi-display awareness with coordinate mapping
- Window and display thumbnails for source selection
Built for Creavit Studio
node-mac-recorder powers Creavit Studio's recording engine. We open-sourced it so other developers can build their own screen recording applications with native macOS performance.
- MIT licensed — free for commercial use
- Simple API: startRecording, stopRecording, getWindows
- Synchronized output files with shared session timestamp
- macOS 12.3+, Node.js 14+, Xcode CLI Tools
A capture library, and the app built with it
node-mac-recorder is the open-source capture engine. It provides media and interaction data for your own application; it does not include Creavit Studio's video editor, Motion Studio, or paid export plans.
To record and edit without writing code, explore Creavit Studio for Mac. To compare ready-to-use recording apps, read our Mac screen recorder guide.
Frequently Asked Questions
Common questions about the open-source recording library.
Is it free and open source?
Yes, MIT licensed. Free to use in commercial projects. The full source code is available on GitHub.
Where is audio saved?
The screen recording remains silent. Audio is written to a separate companion file (e.g. temp_audio_timestamp.webm) so you can mix microphone and system sound in post.
How do I capture system audio?
Enable includeSystemAudio in the recording options. Audio is written to a companion file. See the package README for supported native capture and device-routing options in your installed version.
Does it work with Electron?
Yes. The native layer includes crash protections for Electron apps and supports window/display thumbnails for selection UIs.
Is it macOS only?
Yes, built with native macOS APIs (ScreenCaptureKit + AVFoundation). Windows/Linux support welcome via contributions.
What are the system requirements?
macOS 12.3+ (ScreenCaptureKit), Node.js 14+, Xcode Command Line Tools. Grant screen and microphone permissions.