commit bd70afe7e163f079b5a8d60cf73ee76da4b72f52
parent cea68057fb5c4a8a0908d86210cdd7634f287927
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 23 Oct 2026 18:48:05 -0400
umtool render: UMTOOL_CHROME_WORKERS sets the deck/feed/teaser capture workers for a run (default 4)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/umtool/report-to-video/build-video.mjs b/umtool/report-to-video/build-video.mjs
@@ -222,6 +222,10 @@ const execFileP = promisify(execFile);
const YTDLP = process.env.YTDLP_BIN ?? "yt-dlp";
const FFMPEG = process.env.FFMPEG_BIN ?? "ffmpeg";
+// Chromium workers for the 4-worker chrome regions (deck, feed, teaser): a
+// render on an idle 8-core machine is capture-bound, and 4 leaves cores idle.
+// UMTOOL_CHROME_WORKERS raises it for one run; absent, 4 as before.
+const CHROME_WORKERS = Math.max(1, Math.min(16, Number(process.env.UMTOOL_CHROME_WORKERS) || 4));
const FFPROBE = process.env.FFPROBE_BIN ?? "ffprobe";
const QRENCODE = process.env.QRENCODE_BIN ?? "qrencode";
@@ -2578,7 +2582,7 @@ export async function buildTeaserSegment(entry, { manifestPath, render, outDir,
const t0 = Date.now();
const r = await composeChrome({
manifestPath, outDir, variant, region: "teaser", segment: entry.id, doRender: true,
- fps: render.fps, workers: 4, quality: "high", format: "png-sequence", transition,
+ fps: render.fps, workers: CHROME_WORKERS, quality: "high", format: "png-sequence", transition,
});
EMIT("chrome", {
phase: r.cached ? "cached" : "render", region: "teaser", segment: entry.id,
@@ -4718,7 +4722,7 @@ async function renderDeck({ manifestPath, render, outDir, variant, schedule, fro
const t0 = Date.now();
const r = await composeChrome({
manifestPath, outDir, variant, region: "deck", doRender: true,
- fps: render.fps, workers: 4, quality: "high", format: "png-sequence",
+ fps: render.fps, workers: CHROME_WORKERS, quality: "high", format: "png-sequence",
...(duration != null ? { from, duration } : {}),
});
const want = frameCount(duration ?? schedule.total, render.fps);
@@ -4744,7 +4748,7 @@ async function renderDeck({ manifestPath, render, outDir, variant, schedule, fro
const t1 = Date.now();
const f = await composeChrome({
manifestPath, outDir, variant, region: "feed", doRender: true,
- fps: render.fps, workers: 4, quality: "high", format: "png-sequence",
+ fps: render.fps, workers: CHROME_WORKERS, quality: "high", format: "png-sequence",
...(duration != null ? { from, duration } : {}),
});
if (f.frameCount !== want) {
@@ -4839,7 +4843,7 @@ async function renderDeck({ manifestPath, render, outDir, variant, schedule, fro
const t1 = Date.now();
const fr = await composeChrome({
manifestPath, outDir, variant, region: "fx", doRender: true,
- fps: render.fps, workers: 4, quality: "high", format: "png-sequence",
+ fps: render.fps, workers: CHROME_WORKERS, quality: "high", format: "png-sequence",
...(duration != null ? { from, duration } : {}),
});
if (fr.frameCount !== want) {