HyperFrames Video Creation Pipeline
HyperFrames = “Write HTML. Render video. Built for agents.” — An open-source framework by HeyGen for creating programmatic videos using HTML/CSS/JS compositions rendered to MP4 via headless Chrome + FFmpeg.
Master To-Do List
Phase 1: Research & Setup
-
1. Research HyperFrames Ecosystem
- Main repo:
github.com/heygen-com/hyperframes— 25K+ stars, Apache 2.0, TypeScript - Launch compositions:
github.com/heygen-com/hyperframes-launches— open-source storyboards - NPM package:
hyperframesv0.6.79+ - Requirements: Node.js 22+, FFmpeg
- Main repo:
-
2. Install Dependencies
- Check Node.js version (needs 22+)
- Check FFmpeg installation (needs full codec support)
- Install HyperFrames CLI:
npm install -g hyperframes
-
3. Create Project & Validate
- Run:
hyperframes init <project-name> - Verify:
hyperframes lint(0 errors, 0 warnings) - First render: creates a test 10s MP4 at 1920×1080, 30fps
- Run:
Phase 2: Brand Extraction
-
4. Extract Target Website Brand Assets
- Navigate to the website URL
- Extract:
- Logo (SVG/PNG)
- Color palette (from CSS)
- Typography (fonts, sizes)
- Hero images and screenshots
- Categories / features / messaging copy
-
5. Define Video Structure
- Determine video length (e.g., 22 seconds)
- Plan scene breakdown:
- Logo intro
- Categories/features grid
- Value proposition / pricing
- Outro with CTA
Phase 3: Composition Building
-
6. Build HyperFrames Composition
- Create scenes using HTML template structure
- Wire GSAP animations for entrances and transitions
- Use data attributes for timing & track control
- Apply extracted brand colors, fonts, logo
- Supported animation libraries: GSAP, CSS, Lottie, Three.js
-
7. Validate & Iterate
- Run
hyperframes lintto catch errors - Render a test clip
- Preview the MP4 output
- Fix any issues:
- Clip visibility conflicts
- GSAP timeline timing
- Scene transition synchronization
- Run
Phase 4: Render & Deliver
-
8. Final Render
- Resolution: 1920×1080 (or custom)
- Framerate: 30fps
- Output: MP4 file
- Typical render time: ~30s–2min depending on complexity
-
9. Deliver to User
- Share the MP4 file
- Option to: add music, adjust timing, embed site screenshots, try another site
Detailed Step-by-Step (Actual Execution Steps)
Step 1 — Research Repos
1. Go to github.com/heygen-com/hyperframes
2. Read the README — understand the "HTML → Video" pipeline
3. Check NPM: npm view hyperframes
4. Browse github.com/heygen-com/hyperframes-launches for reference storyboards
5. Note: Uses headless Chrome (Puppeteer) + FFmpeg for frame capture + encoding
6. Supports AWS Lambda for distributed renderingStep 2 — Install & Verify
# Check requirements
node --version # Need >=22
ffmpeg -version # Need full codec support
# Install HyperFrames CLI globally
npm install -g hyperframes
# Verify installation
hyperframes --versionStep 3 — Init Project & Test Render
# Create a new project
hyperframes init my-video-project
cd my-video-project
# Check for errors
hyperframes lint
# Do a test render to verify the pipeline works end-to-end
hyperframes render
# Output: renders/<name>_<timestamp>.mp4 at 1920×1080, 30fpsStep 4 — Extract Brand from Website
1. Open target URL (e.g., https://0cap.org)
2. Check:
- Logo: look for SVG in the page source or download images
- Colors: inspect CSS for primary/accent/background colors
- Fonts: check @font-face declarations or Google Fonts
- Categories/features: scrape the page content
- Screenshots: take full-page screenshots of key sections
3. Compile extracted assets into a brand reference fileStep 5 — Plan the Video Scenes
Example scene breakdown (22-second promo):
| Time | Scene | Content |
|------|-------|---------|
| 0–3.5s | Logo Intro | Logo mark fades in + tagline |
| 3.5–9s | Categories Grid | Category cards stagger in (AI, Design, Dev, etc.) |
| 9–14s | Features | Feature cards slide in (Discover, Curate, Build) |
| 14–18s | Pricing | "Free · Open Source · Zero Capital" callout |
| 18–22s | Outro | Logo on dark + CTA (e.g., 0cap.org) |
Define transitions, animation styles, and timing for each scene.Step 6 — Write the Composition HTML
HyperFrames uses HTML with special data attributes:
- data-hf-track="N" — assigns scene to a track
- data-hf-label="name" — names the scene
Structure:
1. Each scene is a <div class="scene"> or equivalent
2. GSAP timeline orchestrates entrances/exits
3. Use CSS for base styling (brand colors, fonts)
4. Each scene has its own animation timeline
Key technical notes:
- Use GSAP .fromTo() or .to() for animations
- Set display:none initially on non-first scenes to prevent flash
- Master timeline controls all scene transitions
- Stagger animations for grid/card entrancesStep 7 — Validate, Render, Fix
# After writing the composition:
hyperframes lint # Check for errors
# Render a first pass:
hyperframes render
# Check the MP4 output visually
# Common issues:
- Scenes not transitioning → check track/index data attributes
- Content flashing → set display:none on hidden scenes
- GSAP not firing → check timeline registration
- Wrong timing → adjust scene durations
# Fix issues → re-lint → re-render → repeat until perfectStep 8 — Final Render
hyperframes render
# Output file size gives a rough check:
# - Basic composition: ~100-200 KB for 10s
# - Full multi-scene with assets: ~400-600 KB for 22s
# - With embedded screenshots/media: largerStep 9 — Delivery & Iteration
1. Share the rendered MP4 path
2. Ask: want music? different timing? capture site screenshots? another site?
3. If adjustments needed → go back to Step 6, edit, re-renderTool Stack
| Purpose | Tool |
|---|---|
| Video framework | HyperFrames (npm: hyperframes) |
| Runtime | Node.js 22+ |
| Video encoding | FFmpeg |
| Browser engine | Headless Chrome (Puppeteer) |
| Animation | GSAP (GreenSock) |
| Brand extraction | Manual browser inspection |
| Reference storyboards | github.com/heygen-com/hyperframes-launches |
Known Pitfalls & Fixes
| Issue | Fix |
|---|---|
| Scenes not transitioning | Remove class=“clip” + data-track-index; use GSAP display toggles instead |
| Content flashing before animation | Set display:none on all non-first scenes in initial CSS |
| GSAP timeline conflicts | Use one master timeline with absolute time markers (0s, 3.5s, 9s, etc.) |
| Render stuck/hanging | Check headless Chrome launch options; kill hung Chrome processes |
| Lint errors | Check data attribute syntax, closing tags, valid GSAP calls |
Real-World Example: 0cap.org Promo Video
Built for: https://0cap.org
Length: 22 seconds
Scenes: 5
| Time | Scene | Animation |
|---|---|---|
| 0–3.5s | Logo + tagline “Zero Capital Tools & Tips” | Fade in |
| 3.5–9s | 10 category cards (AI, Design, Dev Tools, Sales, Marketing, Finance, Analytics, Productivity, Communication, & more) | Stagger entrance |
| 9–14s | Three feature cards: Discover, Curate, Build | Slide in |
| 14–18s | ”Everything Free · Open Source · Zero Capital” | Scale/emphasis |
| 18–22s | Logo + 0cap.org CTA on dark | Final hold |
Brand used: fafaf8 bg, 2b283d brand purple, Inter font, stone text tones, real 0CAP logo SVG