autokap 1.3.9 → 1.3.10
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.
|
@@ -55,11 +55,17 @@ export class FfmpegX11Recorder {
|
|
|
55
55
|
'-movflags', '+faststart',
|
|
56
56
|
outputPath,
|
|
57
57
|
];
|
|
58
|
-
|
|
58
|
+
// Cloud-runner ships two ffmpeg binaries side-by-side: the static one at
|
|
59
|
+
// /usr/local/bin (first in PATH, has `-fps_mode` for VFR encoding but
|
|
60
|
+
// NO x11grab) and the system one at /usr/bin (Jammy 4.4.2, has x11grab).
|
|
61
|
+
// AUTOKAP_FFMPEG_X11_BIN is set in cloud-runner/Dockerfile to point at
|
|
62
|
+
// the system binary. Falls back to PATH ffmpeg for local testing.
|
|
63
|
+
const ffmpegBin = process.env.AUTOKAP_FFMPEG_X11_BIN || 'ffmpeg';
|
|
64
|
+
logger.info(`[ffmpeg-x11] starting capture on ${display} → ${outputPath} (${width}×${height} @ ${fps}fps, bin=${ffmpegBin})`);
|
|
59
65
|
this.startedAt = performance.now();
|
|
60
66
|
// stdin is `pipe` so we can send 'q' for graceful shutdown (writes the
|
|
61
67
|
// moov atom; SIGTERM produces an unplayable file).
|
|
62
|
-
this.process = spawn(
|
|
68
|
+
this.process = spawn(ffmpegBin, args, { stdio: ['pipe', 'pipe', 'pipe'] });
|
|
63
69
|
let exited = false;
|
|
64
70
|
let exitError = null;
|
|
65
71
|
this.process.stderr?.on('data', (chunk) => {
|