macOS 13+ Windows 10/11 x64 Node 18+ MIT License

Native screen recording for
Node.js & Electron

Open-source screen recording that feels simple to ship: no fragile setup, no install-time surprises, and no paid SDK lock-in.

Record screen, system audio, and microphone to MP4 on macOS and Windows using native OS APIs, with prebuilt binaries included from the start.

npm install screenwire
View on npm GitHub

Start recording in a few lines.

const recorder = require('screenwire')
const path = require('path')
const os = require('os')

const outputPath = path.join(os.homedir(), 'Desktop', 'recording.mp4')
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms))

async function main() {
  await recorder.startAsync(outputPath)
  console.log('Recording started...')

  await sleep(5000)

  const status = await recorder.stopAsync()
  console.log(status)
}

main()

Choose what to capture

// Screen + system audio + microphone (default)
await recorder.startAsync(outputPath)

// Screen + microphone only
await recorder.startAsync(outputPath, {
  audio: false
})

// Screen + system audio only
await recorder.startAsync(outputPath, {
  microphone: false
})

// Screen only
await recorder.startAsync(outputPath, {
  audio: false,
  microphone: false
})

Options

audio controls system audio capture. microphone controls mic input. Both default to true.

Option Type Default Description
audio boolean true Capture system audio played through speakers
microphone boolean true Capture microphone input when available

Prefer callbacks? That works too.

const recorder = require('screenwire')
const path = require('path')
const os = require('os')

const outputPath = path.join(os.homedir(), 'Desktop', 'recording.mp4')

recorder.start(outputPath, { microphone: false }, (status) => {
  console.log('[status]', status)
})

setTimeout(() => {
  recorder.stop((status) => {
    console.log('[done]', status)
  })
}, 5000)

Why developers choose Screenwire

speed

Native performance

Built on the native capture stack of each platform, with ScreenCaptureKit on macOS and a NativeAOT Windows bridge for video and audio capture.

mic

Audio included

Capture system audio and microphone input together, or disable either one with simple audio and microphone options.

settings_power

Zero configuration

Install the package and start recording. No Xcode, no .NET SDK, and no node-gyp required on the user’s machine.

movie

Single MP4 output

Outputs standard H.264/AAC MP4 files directly to disk, ready for immediate playback or sharing.

code

Promise + callback APIs

Fits cleanly into modern async flows or older callback-based code without extra wrappers.

data_object

Tiny surface area

A small CommonJS API that drops into Node.js or Electron projects without extra bundler work.

Platform support

Platform Video System audio Microphone Status
macOS 13+ (Apple Silicon) H.264 MP4 macOS 15+ Stable
Windows 10/11 (x64) H.264 MP4 Stable
Linux Not yet

On macOS, Screen Recording permission is required and the OS prompts on first use. Microphone capture on macOS requires macOS 15 or newer.

On Windows, screen video is captured through GDI and ffmpeg, system audio uses direct WASAPI loopback COM interop, and microphone input uses NAudio when a device is available.

API

recorder.startAsync(outputPath[, options]) → Promise<string>

Starts recording to the given .mp4 path and resolves once recording is active.

recorder.stopAsync() → Promise<string>

Stops recording, finalizes the file, and resolves with the final status string once it is saved.

recorder.start(outputPath[, options], onStatus)

Callback version of startAsync. The onStatus(message) callback receives progress strings while recording starts and runs.

recorder.stop(onStatus)

Callback version of stopAsync. The onStatus(message) callback receives the final status string.

recorder.isRecording()

Returns true while a capture is in progress.

Status strings

String Meaning
Checking permissions... Verifying screen recording permission on macOS
Preparing screen capture... Setting up the capture pipeline before recording starts
Recording to /path/file.mp4 Recording is active and writing to the target file
Stopping recording... Stop was called and the MP4 is being finalized
Saved recording to /path/file.mp4 The recording file was successfully written

Why we built it

We built Screenwire because we needed dependable screen recording inside an Electron app at BreakingPoint and the existing options were awkward to ship: ffmpeg-heavy wrappers, abandoned native modules, or paid SDKs with licensing friction. So we made a package that installs cleanly, uses the native APIs each platform already provides, and stays simple from first install to first recording.

Frequently asked questions

Does Screenwire work with both Node.js and Electron?

Yes. The package is built for both plain Node.js projects and Electron apps, with a small CommonJS API and no special bundler setup.

Can it record system audio and microphone audio?

Yes. Both are enabled by default, and you can disable either one with the audio or microphone option.

Do I need ffmpeg or extra native tooling?

No. Screenwire ships with prebuilt binaries and uses native platform APIs, so developers can skip ffmpeg installs, Xcode setup, .NET SDKs, and node-gyp troubleshooting.

Which platforms are supported right now?

Today, Screenwire supports macOS 13+ on Apple Silicon and Windows 10/11 on x64. On macOS, microphone capture requires macOS 15+. Linux support is planned, but not available yet.

Try it now

npm install screenwire

MIT licensed · Built and maintained by BreakingPoint