dashcam 1.0.1-beta.7 → 1.0.1-beta.8
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/lib/ffmpeg.js +1 -2
- package/lib/recorder.js +5 -5
- package/package.json +1 -1
package/lib/ffmpeg.js
CHANGED
|
@@ -18,8 +18,7 @@ export async function createSnapshot(inputVideoPath, outputSnapshotPath, snapsho
|
|
|
18
18
|
'-i', inputVideoPath,
|
|
19
19
|
'-frames:v', '1',
|
|
20
20
|
'-vf', 'scale=640:-1:force_original_aspect_ratio=decrease:eval=frame',
|
|
21
|
-
'-
|
|
22
|
-
'-compression_level', '100',
|
|
21
|
+
'-compression_level', '6', // Use default compression (was 100, which is extremely slow)
|
|
23
22
|
outputSnapshotPath,
|
|
24
23
|
'-y',
|
|
25
24
|
'-hide_banner'
|
package/lib/recorder.js
CHANGED
|
@@ -279,13 +279,13 @@ export async function startRecording({
|
|
|
279
279
|
const platformArgs = await getPlatformArgs({ fps, includeAudio });
|
|
280
280
|
const outputArgs = [
|
|
281
281
|
'-c:v', 'libvpx-vp9', // Use VP9 codec for better quality and compression
|
|
282
|
-
'-quality', '
|
|
283
|
-
'-cpu-used', '
|
|
284
|
-
'-deadline', '
|
|
285
|
-
'-b:v', '
|
|
282
|
+
'-quality', 'realtime', // Use realtime quality preset for lower CPU usage
|
|
283
|
+
'-cpu-used', '5', // Faster encoding (0-5, higher = faster but lower quality)
|
|
284
|
+
'-deadline', 'realtime', // Realtime encoding mode for lower latency/CPU
|
|
285
|
+
'-b:v', '2M', // Lower bitrate to reduce CPU load (was 5M)
|
|
286
286
|
// Remove explicit pixel format to let ffmpeg handle conversion automatically
|
|
287
287
|
'-r', fps.toString(), // Ensure output framerate matches input
|
|
288
|
-
'-g', '
|
|
288
|
+
'-g', '60', // Keyframe every 60 frames (reduced frequency)
|
|
289
289
|
// WebM options for more frequent disk writes
|
|
290
290
|
'-f', 'webm', // Force WebM container format
|
|
291
291
|
'-flush_packets', '1', // Flush packets immediately to disk
|