mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 23:00:03 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user