The system automatically detects macOS version and uses the most compatible recording method:
- macOS 15+: Uses ScreenCaptureKit (30fps, full features)
- macOS 14: Uses AVFoundation fallback (15fps, stable)
- macOS 13: Uses AVFoundation fallback (15fps, limited features)
- macOS < 13: Not supported
When running your application, check for these log messages:
macOS 14:
π₯οΈ macOS Version: 14.x.x
π― macOS 14 detected - using AVFoundation for better compatibility
π₯ Using AVFoundation for macOS 14 compatibility
π₯ RECORDING METHOD: AVFoundation (Fallback)
macOS 13:
π₯οΈ macOS Version: 13.x.x
π― macOS 13 detected - using AVFoundation (limited features)
π₯ Using AVFoundation for macOS 13 compatibility (limited features)
π₯ RECORDING METHOD: AVFoundation (Fallback)
You can force AVFoundation mode for testing:
// Set environment variable before running
process.env.FORCE_AVFOUNDATION = "1";
const MacRecorder = require('node-mac-recorder');
const recorder = new MacRecorder();
async function test() {
const success = await recorder.startRecording('./test.mov', {
captureCursor: true,
includeMicrophone: false,
includeSystemAudio: true
});
if (success) {
console.log('β
AVFoundation recording started');
setTimeout(async () => {
await recorder.stopRecording();
console.log('β
Recording completed');
}, 3000);
} else {
console.log('β Recording failed');
}
}
test();Issue: Recording starts but no video file created
- Cause: Permission issues
- Solution: Check Screen Recording permission in System Preferences
Issue: Audio not recorded
- Cause: Microphone permission missing
- Solution: Check Microphone permission in System Preferences
Issue: Recording fails silently
- Cause: Invalid display ID or output path
- Solution: Use default display (don't specify displayId) and ensure output directory exists
macOS 14 requires these permissions:
- β Screen Recording (System Preferences > Privacy & Security)
- β Microphone (if includeMicrophone: true)
- β Accessibility (for cursor tracking)
AVFoundation Implementation (macOS 14):
- Video: H.264 encoding at 15fps
- Audio: AAC encoding at 44.1kHz
- Screen capture: CGDisplayCreateImage
- Memory management: Automatic cleanup
Differences from ScreenCaptureKit:
- Lower frame rate (15fps vs 30fps) for stability
- No automatic window exclusion
- Simpler audio routing
macOS 13 Specific Limitations:
- Audio features may have reduced compatibility
- Some advanced recording options may not work
- Recommended to test thoroughly on target systems
If recording still fails on macOS 14 after following this guide, please provide:
- macOS version (
sw_vers) - Console logs from the application
- Permission status screenshots
- Minimal reproduction code