dashcam 1.4.1-beta → 1.4.2-beta

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.
Files changed (2) hide show
  1. package/lib/recorder.js +7 -0
  2. package/package.json +1 -1
package/lib/recorder.js CHANGED
@@ -320,8 +320,14 @@ export async function startRecording({
320
320
 
321
321
  // Construct FFmpeg command arguments
322
322
  const platformArgs = await getPlatformArgs({ fps, includeAudio });
323
+
324
+ // Detect platform for encoder settings
325
+ const platform = os.platform();
326
+ const isWindows = platform === 'win32';
323
327
 
324
328
  const outputArgs = [
329
+ // Convert pixel format first to handle transparency issues on Windows
330
+ '-pix_fmt', 'yuv420p', // Force YUV420P format (no alpha channel)
325
331
  '-c:v', 'libvpx', // Use VP9 codec for better quality and compression
326
332
  '-quality', 'realtime', // Use realtime quality preset for faster encoding
327
333
  '-cpu-used', '8', // Maximum speed (0-8, higher = faster but lower quality)
@@ -330,6 +336,7 @@ export async function startRecording({
330
336
  '-r', fps.toString(), // Ensure output framerate matches input
331
337
  '-g', fps.toString(), // Keyframe interval = 1 second (every fps frames) - ensures frequent keyframes
332
338
  '-force_key_frames', `expr:gte(t,n_forced*1)`, // Force keyframe every 1 second
339
+ '-auto-alt-ref', '0', // Disable auto alternate reference frames (fixes transparency encoding error)
333
340
  // WebM options for more frequent disk writes and proper stream handling
334
341
  '-f', 'webm', // Force WebM container format
335
342
  '-flush_packets', '1', // Flush packets immediately to disk - critical for short recordings
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashcam",
3
- "version": "1.4.1-beta",
3
+ "version": "1.4.2-beta",
4
4
  "description": "Minimal CLI version of Dashcam desktop app",
5
5
  "main": "bin/dashcam.js",
6
6
  "bin": {