Home / Tutorial
HyperFrames tutorial: your first HTML to MP4
This HyperFrames tutorial walks the official CLI end to end: install prerequisites, scaffold a project, write a seekable HTML composition, preview with live reload, and render a frame-accurate MP4. Prefer not to install Node? Jump to the hosted Html2MP4 shortcut. Commands match the project README — check upstream docs if a flag changes.
Skip the CLI? Start from an official template
This page teaches the local HyperFrames CLI. If you want a finished MP4 without Node/FFmpeg, open a Templates pack below (fill a short schema → enqueue). Cards go to the Templates tab / video templates, not a create form on this tutorial page.
Product launchBrand, headline, feature beats, CTA — via Templates.
Sale promoOffer, deadline, shop CTA — via Templates.
Event inviteDate, venue, RSVP — via Templates.
Full library: Video templates. Free-form brief: Prompt to video. Paste your own markup: HTML to MP4.
Who this tutorial is for
People who search “HyperFrames tutorial” usually want a working first MP4, not another product pitch. Typical readers:
- Developers and technical marketers — Comfortable with Node terminals; want HTML/CSS/JS → deterministic video without After Effects.
- Engineers wiring agent or CI pipelines — Need a non-interactive
init / preview / renderpath they can script. - Motion-curious web folks — Prefer GSAP or CSS in the browser over learning a React video DSL first.
- Evaluators comparing stacks — Trying HyperFrames locally before choosing Remotion, hosted HTML→MP4, or another tool — see HyperFrames alternatives.
If you only need a finished file and do not want to install Node, skip to CLI vs Html2MP4 hosted or open video templates / prompt to video.
CLI tutorial vs Html2MP4 hosted
Honest boundary: Html2MP4 is an independent hosted product that creates MP4 videos online. It is not an official HeyGen product, not a HyperFrames subsidiary, and not affiliated with or endorsed by HeyGen. “HyperFrames” remains a trademark of its owner.
- This CLI tutorial — You install Node 22+ and FFmpeg, write HTML, run
npx hyperframes previewandnpx hyperframes renderon your machine (or Docker / your CI). Full control, your infra. Setup help: install HyperFrames. - Html2MP4 hosted — Browser forms that use AI to create or adapt HTML and export video online. No local Node/FFmpeg. Paths: prompt to video, video templates, website to video, brand kit, pasted HTML to MP4, showcase. Check the credit estimate before creating. There is no submit-time preview editor. Html2MP4 does not expose a public REST API for video jobs.
Choose CLI when you need repo-native pipelines and custom adapters. Choose hosted when you want an MP4 from a brief, template fields, URL or pasted markup without operating Chrome yourself.
What you’ll get
- Frame-accurate MP4 — Headless Chrome seeks each frame; FFmpeg encodes. Slow machines do not drop frames the way a screen recorder would.
- Web-native project — An HTML composition you can diff in git, lint, and drive from agents or CI.
- Repeatable output — Same input → same frames, useful for A/B variants and batch personalization.
- Standard delivery — H.264 MP4 suitable for site embeds, social and decks (exact codecs depend on encode settings).
Checklist before first render
Run through this before your first full encode — it catches most first-day failures:
node -vshows 22 or newer;ffmpeg -versionis on PATH.- Root has
data-composition-id,data-width,data-height(and usuallydata-start). - Timed elements use
class="clip"plusdata-startand a duration (and usuallydata-track-index). - GSAP (or other) timeline is created paused and registered on
window.__timelines[<composition-id>]— same id string asdata-composition-id. - Fonts and media are bundled in the project (remote URLs can fail on CORS, expiry or permissions).
- Run
npx hyperframes doctor,npx hyperframes check, andnpx hyperframes lintbeforerender. - While iterating, prefer
-q draft; use full quality for the final pass.
1. Requirements
- Node.js 22 or newer (
node -v) - FFmpeg on your PATH (
ffmpeg -version) - Chrome is downloaded automatically by Puppeteer
Stuck on setup (Node version, “FFmpeg not found”, git-lfs or Windows Chrome errors)? See how to install HyperFrames, then come back here. New to the concept? Skim what HyperFrames is first.
2. Install and scaffold
npm install -g hyperframes # optional; npx works too npx hyperframes init my-video cd my-video
init scaffolds a composition project directory. From here on, CLI commands take the project directory (not a single HTML file) as the positional argument.
3. Write the composition
Edit index.html. The root element declares size and id; children with class clip get data-start, data-duration and data-track-index. Register a paused GSAP timeline on window.__timelines so the renderer can seek it. For CSS/@keyframes export patterns see CSS animation to video; for GSAP seek notes see GSAP to MP4.
<div id="stage" data-composition-id="launch" data-start="0"
data-width="1920" data-height="1080">
<h1 id="title" class="clip" data-start="1" data-duration="4"
data-track-index="1">Launch day</h1>
<script src="https://cdn.jsdelivr.net/npm/gsap@3/dist/gsap.min.js"></script>
<script>
const tl = gsap.timeline({ paused: true });
tl.from("#title", { opacity: 0, y: 40, duration: 0.8 }, 1);
window.__timelines = window.__timelines || {};
window.__timelines.launch = tl;
</script>
</div>
4. Preview
npx hyperframes preview
Opens a browser preview with live reload so you can tweak timing before a full render. Prefer preview + draft quality over long full encodes while you iterate.
5. Render to MP4
npx hyperframes render
The positional argument is the project directory (not a single file). Use -c to point at a specific composition and -o for the output path, for example -o output.mp4. Deeper pipeline notes: render HTML to MP4.
Common pitfalls (from real GitHub issues)
Most first-time problems fall into a few groups. Run npx hyperframes doctor and npx hyperframes check before anything else — and prefer the checklist above on day one.
- Animation doesn’t move in the output. The timeline must be paused and registered on
window.__timelinesunder the exactdata-composition-id. It can’t be driven bysetTimeoutor user interaction. - A timed element is always visible. Give it
class="clip"as well asdata-startand a duration.npx hyperframes lintcatches this. - Every render waits about 45 seconds. The composition never registered a timeline. Register one, or add
data-no-timelineto the root. - Fonts or remote assets missing. Bundle fonts and media inside the project. Remote URLs can fail on permissions, expiry or CORS.
- Render stuck at one percentage. Known hangs, like the calibration hang in #1231 and the low-memory freezes in #1218, were fixed in later releases. Update with
npx hyperframes@latestand try--low-memory-mode. - Render is just slow. Use
-q draftwhile iterating. Under WSL2, check whether Chrome fell back to software rendering (#5548).
Symptom-by-symptom fixes with the exact flags are in HyperFrames render slow or stuck: fixes.
Common questions
What does this HyperFrames tutorial cover?
A hands-on CLI path: install Node 22+ and FFmpeg, run npx hyperframes init, write a seekable HTML composition, preview with live reload, and render an MP4. It also explains when to skip the CLI and use Html2MP4 hosted forms instead.
Do I need React for this HyperFrames tutorial?
No. HyperFrames is HTML-native. The sample composition uses plain HTML plus a paused GSAP timeline. There is no React requirement. Remotion is the React-based alternative — compare stacks on HyperFrames alternatives.
Can I skip the CLI and still get an MP4?
Yes. Html2MP4 is an independent hosted product for creating and exporting videos online. Paths such as Prompt to video, Video templates, and HTML to MP4 run the render on the server. Check the credit estimate before creating. There is no submit-time preview editor. Html2MP4 is not affiliated with or endorsed by HeyGen.
Why is my HyperFrames animation frozen in the MP4?
The timeline must be created paused and registered on window.__timelines under the exact data-composition-id. Wall-clock setTimeout or click-driven motion will not seek correctly. Run npx hyperframes doctor, check, and lint before rendering. More cases: render troubleshooting.
What should I run before the first HyperFrames render?
Use the checklist: Node 22+, FFmpeg on PATH, paused timeline registered, timed elements with class="clip", assets bundled, then doctor / check / lint.
Does Html2MP4 offer a public REST API for HyperFrames jobs?
No. Html2MP4 does not expose a public REST API for video jobs. Batch-style work today is form/hosted or your own HyperFrames CLI pipeline — see programmatic video from HTML.
How much does a hosted Html2MP4 render cost?
Check the credit estimate before creating a video. Signup credit exists to try; packs are listed on Pricing. There is no submit-time preview editor — flow is form → enqueue → download.
Related
- What is HyperFrames
- Install HyperFrames
- HyperFrames render troubleshooting
- HyperFrames alternatives
- HTML to MP4
- Video templates
- Prompt to video
- GSAP to MP4
- CSS animation to video
- HTML animation to video
- Render HTML to MP4
- Programmatic video from HTML
- Html2MP4 home
Prefer the hosted tool? Start from a prompt, template, website URL, brand kit, pasted HTML, or a showcase reel. Broader conversion paths: convert HTML to video, no-code HTML to video.