node-mac-recorder 2.22.6 → 2.22.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-mac-recorder",
3
- "version": "2.22.6",
3
+ "version": "2.22.7",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -800,7 +800,10 @@ extern "C" NSString *ScreenCaptureKitCurrentAudioPath(void) {
800
800
  AVVideoExpectedSourceFrameRateKey: @(MAX(1, g_targetFPS)),
801
801
  AVVideoQualityKey: qualityHint, // 0.0-1.0, higher is better
802
802
  AVVideoProfileLevelKey: AVVideoProfileLevelH264HighAutoLevel,
803
- AVVideoH264EntropyModeKey: AVVideoH264EntropyModeCABAC
803
+ AVVideoH264EntropyModeKey: AVVideoH264EntropyModeCABAC,
804
+ // Add data rate limits for consistent quality during motion
805
+ AVVideoAverageNonDroppableFrameRateKey: @(MAX(1, g_targetFPS)),
806
+ AVVideoMaxKeyFrameIntervalDurationKey: @(1.0) // Keyframe at least every second
804
807
  };
805
808
 
806
809
  NSDictionary *videoSettings = @{
@@ -1533,6 +1536,13 @@ static void SCKPerformRecordingSetup(NSDictionary *config, SCShareableContent *c
1533
1536
  if (@available(macOS 13.0, *)) {
1534
1537
  streamConfig.queueDepth = 8;
1535
1538
  }
1539
+ if (@available(macOS 14.0, *)) {
1540
+ // Use best capture resolution for maximum quality on Retina displays
1541
+ streamConfig.captureResolution = SCCaptureResolutionBest;
1542
+ // Make stream opaque to avoid alpha channel overhead
1543
+ streamConfig.shouldBeOpaque = YES;
1544
+ MRLog(@"🎯 Using SCCaptureResolutionBest + shouldBeOpaque for maximum quality (macOS 14+)");
1545
+ }
1536
1546
 
1537
1547
  BOOL shouldCaptureMic = includeMicrophone ? [includeMicrophone boolValue] : NO;
1538
1548
  BOOL shouldCaptureSystemAudio = includeSystemAudio ? [includeSystemAudio boolValue] : NO;