βοΈ Node 22+ and FFmpeg
Two required binaries: Node.js version 22 or higher and FFmpeg accessible in PATH. Without them, HyperFrames can't render a single frame.
HyperFrames uses Native ESM and APIs for fs/promises available starting with Node 18, but version 22 brings the --experimental-strip-types and the updated V8 that speeds up composition parsing. Older versions (16, 18) may work partially but cause warnings and unexpected behavior in build-index.mjs.
- β FFmpeg in
C:\ffmpeg\bin\ffmpeg.exe - β PATH configured in the system (non-user)
- β Node 22+ verified with
node --version - β Open a new terminal after changing PATH
- β Use the FFmpeg installed by
chocowithout checking PATH - β Node 16 or 18 β causes errors with native ESM
- β Test
ffmpegin the old terminal (PATH not updated) - β ffmpeg.exe outside the subdirectory
bin
β¨οΈ ffmpeg -nostdin in git-bash
The most subtle setup gotcha: running FFmpeg inside git-bash without -nostdin causes exit 0 without generating any files. No visible error β nothing is simply created.
β οΈ Critical gotchaβexits with code 0 without a file
In git-bash (MinTTY), FFmpeg tries to read stdin and silently blocks. The process exits with code 0 (success), but no MP4 is generated. Itβs the hardest bug to diagnose because everything seems to have worked.
The HyperFrames CLI (npx hyperframes render) passes -nostdin automatically in internal calls to FFmpeg. You only need to worry about it if you invoke FFmpeg directly in git-bash for manual post-processing, concatenation scripts, etc.
π HyperFrames headless Chrome
HyperFrames includes its own headless Chrome β it doesn't depend on Chrome installed on the system. A single command downloads and links the exact version tested with the CLI.
Different Chrome versions render CSS and GSAP animations with subtle pixel differences. To make the output deterministic (same HTML β same MP4), HyperFrames pins to a specific version of Chromium via Puppeteer, downloaded and managed internally. You don't need to touch the system Chrome.
Read the pinned version in HyperFramesβ package.json
The field puppeteer.chromiumRevision specifies exactly which Chromium build to use β no "latest".
Checks local cache (~/.cache/puppeteer/)
If the build already exists, skip the download. The second project you create waits for nothing β instant.
Downloads ~170MB from the Chromium CDN if needed
Only the first time or when the HyperFrames version is updated. A stable connection is recommended.
π Kokoro TTS
100% local PT-BR narration, no API key required. Kokoro has its own Portuguese phonemizer, so espeak-ng isnβt needed. On the first run, it downloads ~340MB of model files.
- β
pip install kokoro-onnx soundfile - β Python 3.10+ on PATH
- β First run: wait for a ~340MB download
- β Default voice:
pf_dorawith--speed 0.98
- β espeak-ng β Kokoro doesnβt need it and it causes a conflict
- β Other TTS packages that depend on espeak
- β Interrupt the model's first download
- β Use
speed 1.0+β sounds mechanical in Brazilian Portuguese
espeak-ng phonemizes Portuguese poorly β technical words sound robotic. Kokoro has its own PT-BR phonemizer trained specifically for the language.
The model (~340MB) is cached in ~/.cache/kokoro/. From the second invocation onward, generating a 10s segment takes less than 2 seconds.
π©Ί npx hyperframes doctor
The diagnostic command checks the entire stack at once: Node, FFmpeg, Chrome, and Kokoro. If something is wrong, it tells you exactly whatβs missing.
Especially in a new environment or after updating HyperFrames. The npx hyperframes render fails midway through the process if a dependency is missing β the doctor detects it beforehand.
Node.js β minimum version 18, recommended 22+
Read process.version and compares it with the field engines from package.json.
FFmpeg β runs ffmpeg -version and parses the output
Checks whether the binary is accessible via PATH and shows the full path found.
Chrome β checks Puppeteer cache
Checks whether the stuck build is in ~/.cache/puppeteer/. If not, suggest running browser ensure.
Kokoro β import the Python module and check
Runs python -c "import kokoro_onnx" e import soundfile. Minimum versions checked.
π¦ Start a project
With the environment ready, the next step is to create the project structure. The template blank + --non-interactive generates everything without questions β ideal for scripts and CI.
O --example blank creates a minimal project with the correct folder structure but no prebuilt scenes β you start from scratch. This is the recommended entry point for learning the pipeline, since every file that appears was created intentionally.
init blank- β Read the
design.mdto understand the palette - β Run
node scripts/fetch-fonts.mjsbefore the render - β Use
narration-template.shas a scriptwriting foundation - β Run
doctoronce in the new project
- β Render without running
fetch-fonts.mjsβ font not found - β Ignore the
design.mdand invent a color palette - β Skip the
npm installafter init - β Use spaces in the project name (e.g.,
meu video)
Each project has a design.md with the main palette, typography, and visual style. For INEMA.CLUB videos, the default palette is: background #0D1321, amber accent #FACC15, white/gray text. Claude reads this file before writing any scene.
π Module 2.2 Summary
What you learned in this module
- β Node.js 22+ installed and verified with
node --version - β FFmpeg in
C:\ffmpeg\binadded to the system PATH - β Headless Chrome installed via
npx hyperframes browser ensure - β Kokoro TTS installed (
pip install kokoro-onnx soundfile), without espeak-ng - β
npx hyperframes doctorreturning "All systems go" - β First project created with
npx hyperframes init <nome> --example blank --non-interactive - β
fetch-fonts.mjsexecuted, fonts downloaded - β Understood why
-nostdinis required in git-bash
narration-template.sh, generate the audio files with Kokoro (pf_dora --speed 0.98) and measure durations with ffprobe to sync with the scenes.