fix(engine): hide ffmpeg console windows on Windows (#3381)

ffmpeg and ffprobe are console-subsystem binaries and Node defaults
windowsHide to false, so every spawn opened a visible console window on
Windows. A render shells out dozens of times across parallel workers,
which flashed a burst of windows across the user's desktop.

Applied at every production spawn site rather than only the two named in
the report, since they all share the cause: runFfmpeg, both gpuEncoder
probes, ffprobe, streamingEncoder, audioExtractor and the distributed
version check. windowsHide is a no-op on macOS and Linux.

The dev-only parity and regression harnesses are left alone; they never
run on a user's desktop.

Closes #3379
This commit is contained in:
Miguel Ángel
2026-08-21 11:37:21 -04:00
committed by GitHub
parent a9ea07edde
commit 315a7b758c
7 changed files with 59 additions and 3 deletions
+5 -1
View File
@@ -92,7 +92,11 @@ export function formatFfmpegError(
export async function runFfmpeg(args: string[], opts?: RunFfmpegOptions): Promise<RunFfmpegResult> {
const timeout = opts?.timeout ?? DEFAULT_TIMEOUT;
const ffmpeg = spawn(getFfmpegBinary(), args);
// windowsHide: ffmpeg/ffprobe are console-subsystem binaries, so without
// this Node opens a visible console window per spawn on Windows. A render
// shells out dozens of times across parallel workers, which flashes a burst
// of windows across the user's desktop. No-op on macOS and Linux.
const ffmpeg = spawn(getFfmpegBinary(), args, { windowsHide: true });
trackChildProcess(ffmpeg);
const managed = new ManagedChildProcess(ffmpeg, {
signal: opts?.signal,