node-mac-recorder 2.22.8 → 2.22.9

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.8",
3
+ "version": "2.22.9",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -132,11 +132,9 @@ extern "C" bool startAVFoundationRecording(const std::string& outputPath,
132
132
  codecKey = AVVideoCodecH264;
133
133
  }
134
134
 
135
- // QUALITY FIX: ULTRA HIGH quality screen recording
136
- // ProMotion displays may capture at 10 FPS - use very high bitrate for perfect quality
137
- NSInteger bitrate = (NSInteger)(recordingSize.width * recordingSize.height * 60);
138
- bitrate = MAX(bitrate, 70 * 1000 * 1000); // Minimum 70 Mbps
139
- bitrate = MIN(bitrate, 250 * 1000 * 1000); // Maximum 250 Mbps
135
+ NSInteger bitrate = (NSInteger)(recordingSize.width * recordingSize.height * 100);
136
+ bitrate = MAX(bitrate, 120 * 1000 * 1000);
137
+ bitrate = MIN(bitrate, 500 * 1000 * 1000);
140
138
 
141
139
  NSLog(@"🎬 ULTRA QUALITY AVFoundation: %dx%d, bitrate=%.2fMbps",
142
140
  (int)recordingSize.width, (int)recordingSize.height, bitrate / (1000.0 * 1000.0));
@@ -155,7 +153,7 @@ extern "C" bool startAVFoundationRecording(const std::string& outputPath,
155
153
  AVVideoMaxKeyFrameIntervalKey: @((int)fps),
156
154
  AVVideoAllowFrameReorderingKey: @YES,
157
155
  AVVideoExpectedSourceFrameRateKey: @((int)fps),
158
- AVVideoQualityKey: @(0.95), // 0.0-1.0, higher is better
156
+ AVVideoQualityKey: @(1.0),
159
157
  AVVideoProfileLevelKey: AVVideoProfileLevelH264HighAutoLevel,
160
158
  AVVideoH264EntropyModeKey: AVVideoH264EntropyModeCABAC
161
159
  }
@@ -214,9 +214,9 @@ static void SCKQualityBitrateForDimensions(NSString *preset,
214
214
  minBitrate = 18 * 1000 * 1000;
215
215
  maxBitrate = 80 * 1000 * 1000;
216
216
  } else { // high/default - ULTRA quality
217
- multiplier = 80;
218
- minBitrate = 100 * 1000 * 1000;
219
- maxBitrate = 400 * 1000 * 1000;
217
+ multiplier = 120;
218
+ minBitrate = 120 * 1000 * 1000;
219
+ maxBitrate = 600 * 1000 * 1000;
220
220
  }
221
221
 
222
222
  double base = ((double)MAX(1, width)) * ((double)MAX(1, height)) * (double)multiplier;
@@ -783,7 +783,7 @@ extern "C" NSString *ScreenCaptureKitCurrentAudioPath(void) {
783
783
  NSString *normalizedQuality = SCKNormalizeQualityPreset(g_qualityPreset);
784
784
  SCKQualityBitrateForDimensions(normalizedQuality, width, height, &bitrate, &bitrateMultiplier, &minBitrate, &maxBitrate);
785
785
 
786
- NSNumber *qualityHint = @0.95;
786
+ NSNumber *qualityHint = @1.0;
787
787
  if ([normalizedQuality isEqualToString:@"medium"]) {
788
788
  qualityHint = @0.9;
789
789
  } else if ([normalizedQuality isEqualToString:@"low"]) {
@@ -1349,14 +1349,6 @@ static void SCKPerformRecordingSetup(NSDictionary *config, SCShareableContent *c
1349
1349
  g_targetFPS = 60;
1350
1350
  }
1351
1351
 
1352
- // CRITICAL ELECTRON FIX: Lower FPS to 30 when recording with camera
1353
- // This prevents resource conflicts and crashes when running both simultaneously
1354
- BOOL isCameraEnabled = captureCamera && [captureCamera boolValue];
1355
- if (isCameraEnabled && g_targetFPS > 30) {
1356
- MRLog(@"📹 Camera recording detected - lowering ScreenCaptureKit FPS from %ld to 30 for stability", (long)g_targetFPS);
1357
- g_targetFPS = 30;
1358
- }
1359
-
1360
1352
  MRLog(@"🎬 Starting PURE ScreenCaptureKit recording (NO AVFoundation)");
1361
1353
  MRLog(@"🔧 Config: cursor=%@ mic=%@ system=%@ display=%@ window=%@ crop=%@",
1362
1354
  captureCursor, includeMicrophone, includeSystemAudio, displayId, windowId, captureRect);