diff --git a/marketing/.gitignore b/marketing/.gitignore --- a/marketing/.gitignore +++ b/marketing/.gitignore @@ -20,3 +20,6 @@ podcast/publish/ # av-reels working outputs (regen-able) av-reels/out/ + +# capur logo studies — regen with capur/gen-capur.mjs +capur/out/ diff --git a/marketing/bin/caption-burn.mjs b/marketing/bin/caption-burn.mjs new file mode 100644 --- /dev/null +++ b/marketing/bin/caption-burn.mjs @@ -0,0 +1,110 @@ +#!/usr/bin/env node +// caption-burn.mjs — burn styled captions onto a video + attach an audio track. +// +// This ffmpeg build has NO libass, so captions are drawn in node-canvas over a +// raw-frame pump (same approach as pop/menuband/bin/finalize-vo.mjs), then the +// audio (VO) is muxed in by the encoder. Portrait-friendly defaults. +// +// Usage: node marketing/bin/caption-burn.mjs [W H FPS] + +import { readFileSync } from "node:fs"; +import { spawn } from "node:child_process"; +import { once } from "node:events"; +import { createCanvas, registerFont } from "canvas"; +import { spawnFFmpegEncode } from "../../pop/lib/preview-shared.mjs"; + +const [VIDEO, AUDIO, SRT, OUT, wArg, hArg, fpsArg, crfArg] = process.argv.slice(2); +if (!VIDEO || !AUDIO || !SRT || !OUT) { + console.error("usage: caption-burn.mjs