node-mac-recorder 2.22.0 → 2.22.2
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 +1 -1
- package/src/camera_recorder.mm +5 -4
package/package.json
CHANGED
package/src/camera_recorder.mm
CHANGED
|
@@ -451,10 +451,11 @@ static void MRCameraRemoveFileIfExists(NSString *path) {
|
|
|
451
451
|
|
|
452
452
|
MRLog(@"🎥 Camera recording dimensions: %zux%zu", width, height);
|
|
453
453
|
|
|
454
|
-
// H.264 video settings
|
|
455
|
-
|
|
456
|
-
bitrate =
|
|
457
|
-
bitrate =
|
|
454
|
+
// H.264 video settings - optimized for smaller file size
|
|
455
|
+
// Using lower bitrate multiplier for camera (2x instead of 24x) to reduce file size
|
|
456
|
+
NSInteger bitrate = (NSInteger)(width * height * 2);
|
|
457
|
+
bitrate = MAX(bitrate, 1 * 1000 * 1000); // Min 1 Mbps
|
|
458
|
+
bitrate = MIN(bitrate, 6 * 1000 * 1000); // Max 6 Mbps (significantly reduced from 30)
|
|
458
459
|
|
|
459
460
|
NSDictionary *compressionProps = @{
|
|
460
461
|
AVVideoAverageBitRateKey: @(bitrate),
|