HyperFrames vs Remotion vs Manim vs PIL: Choosing Animation Engine Options in video-use

The video-use repository treats HyperFrames, Remotion, Manim, and PIL as interchangeable plug-ins selected per "animation slot," allowing language models to delegate complex motion graphics to the most appropriate rendering backend while maintaining a unified overlay contract.

In the browser-use/video-use codebase, the animation engine options are not hardcoded dependencies but rather lazy-loaded capabilities that the LLM selects based on the specific visual requirements of each project. This architecture enables sophisticated video editing workflows where different animation styles—ranging from browser-native UI motion to mathematical formalism—can coexist within a single rendered output.

How Engine Selection Works in video-use

The repository implements a slot-based architecture where each animation lives in its own isolated directory under edit/animations/slot_<id>/. According to SKILL.md, you must "Pick the engine per animation slot. Do not default to Remotion just because the animation is web-adjacent."

Lazy Installation and Requirements

Engines are installed on-demand rather than at clone time. As noted in install.md#L53, "Animation engines such as HyperFrames, Remotion, and Manim are installed lazily the first time a project actually needs them."

Node.js is only required for specific engines. install.md#L159-L160 specifies that "Node.js/npm are only needed for HyperFrames or Remotion slots. HyperFrames currently requires Node.js 22+." Manim and PIL operate purely within the Python environment.

The Unified Overlay Contract

Regardless of which engine generates the motion, the output must satisfy the contract defined in helpers/render.py. As documented in SKILL.md#L88-L90, "overlays are rendered animation clips … render.py defaults the scale to 1080p from any source." Each slot produces a video file (MP4 or WebM) that the EDL (Edit Decision List) references as a compositing layer.

Comparing the Four Animation Engines

HyperFrames: Browser-Native HTML/CSS/GSAP

HyperFrames excels at UI-centric motion, website-to-video captures, and kinetic typography. It treats animations as deterministic, frame-by-frame HTML compositions using GSAP.

Key characteristics:

  • No React build step required; uses familiar web tooling
  • Built-in validation via npx --yes hyperframes lint and validate commands
  • Ideal for: Web-adjacent animations that need to be authored and verified like standard HTML/CSS

Limitations: Requires Node.js 22+ and offers less precision for mathematically heavy diagrams compared to Manim.

Remotion: React/CSS Compositions

Remotion is the engine of choice when working with existing React component libraries or when users explicitly request React-based animation workflows.

Key characteristics:

  • Leverages the React ecosystem for component reuse and modern web dev pipelines
  • Scaffolded via npx create-video@latest
  • Renders via npx remotion render src/Video.tsx out.mp4

Limitations: Heavy npm dependency tree and slightly longer startup time compared to HyperFrames.

Manim: Mathematical and Formal Diagrams

Manim (Mathematical Animation Engine) is the specialized choice for formal visualizations, state-machine diagrams, algorithm animations, and graph morphing.

Key characteristics:

  • Declarative scene language with precise vector and equation control
  • Python-native; requires uv pip install manim or equivalent
  • Renders via manim scene.py SceneName -ql -o render.mp4

Limitations: No web preview capability; steeper learning curve for non-technical designers; Python-only environment.

PIL + ffmpeg: Lightweight Raster Overlays

PIL (Pillow) combined with ffmpeg serves as the minimal-overhead option for simple overlay cards—counters, typewriter text, or static bar reveals—where iteration speed outweighs visual complexity.

Key characteristics:

  • Minimal dependencies: only requires Pillow and ffmpeg
  • Fastest iteration cycle for simple raster-based effects
  • Encodes via ffmpeg PNG-to-video conversion: ffmpeg -loop 1 -i input.png -t 5 -vf "format=yuv420p" output.mp4

Limitations: Limited to raster effects; no native animation timeline or advanced motion capabilities.

Implementation Workflow

The animation pipeline follows a strict five-stage process orchestrated without the LLM directly processing raw video frames:

  1. Transcription layer – helpers/transcribe.py converts raw footage into a word-level transcript.

  2. Decision layer – The LLM proposes cuts, color grades, subtitles, and required animation slots based on the transcript and PNG visualizations.

  3. Slot creation – For each animation, the system creates a slot directory and runs engine-specific scaffolding:

    • HyperFrames: npx --yes hyperframes init . --example blank --non-interactive
    • Remotion: npx create-video@latest .
    • Manim: Direct Python file creation
    • PIL: Python script generation
  4. Render and validation – Each engine produces a video artifact:

    • HyperFrames: hyperframes render . -o render.mp4 (or .webm for alpha)
    • Remotion: remotion render
    • Manim: Direct MP4 output
    • PIL: PNG sequence encoded via ffmpeg
  5. Self-evaluation – helpers/render.py composites overlays onto the base cut, followed by a timeline_view visual check. Failed slots regenerate automatically (max 3 attempts).

Code Examples for Each Engine

HyperFrames Scaffold and Render

slot_id=1
mkdir -p edit/animations/slot_${slot_id}
cd edit/animations/slot_${slot_id}

# Initialize blank HyperFrames project

npx --yes hyperframes init . --example blank --non-interactive --skip-skills

# Edit index.html and style.css to create UI motion...

# Validate before rendering

npx --yes hyperframes lint .
npx --yes hyperframes validate .

# Render final overlay

npx --yes hyperframes render . -o render.mp4

# For transparent backgrounds: --format webm

cd ../../..

Remotion React Composition

slot_id=2
mkdir -p edit/animations/slot_${slot_id}
cd edit/animations/slot_${slot_id}

# Scaffold React project

npx create-video@latest .

# Implement Video.tsx, then render

npx remotion render src/Video.tsx out.mp4

# Verify duration matches edit

ffprobe -i out.mp4 -show_entries format=duration -v quiet -of csv="p=0"

cd ../../..

Manim Mathematical Scene


# Install if first use

uv pip install manim

slot_id=3
mkdir -p edit/animations/slot_${slot_id}
cd edit/animations/slot_${slot_id}

# Create scene file

cat > scene.py <<'PY'
from manim import *

class EquationScene(Scene):
    def construct(self):
        eq = MathTex("E=mc^2")
        self.play(Write(eq))
        self.wait(2)
PY

# Render at low quality for preview

manim scene.py EquationScene -ql -o render.mp4

cd ../../..

PIL Raster Card Generation


# helpers/pil_overlay.py

from pathlib import Path
from PIL import Image, ImageDraw, ImageFont

def make_card(text: str, out_path: Path, size=(1920, 1080)):
    img = Image.new("RGB", size, (10, 10, 10))
    draw = ImageDraw.Draw(img)
    font = ImageFont.truetype("/System/Library/Fonts/Menlo.ttc", 80)
    w, h = draw.textsize(text, font=font)
    draw.text(((size[0]-w)/2, (size[1]-h)/2), text, font=font, fill=(255,255,255))
    img.save(out_path)

if __name__ == "__main__":
    make_card("Launch Ready!", Path("edit/animations/slot_4/render.png"))

Convert to video with ffmpeg:

python helpers/pil_overlay.py
ffmpeg -loop 1 -i edit/animations/slot_4/render.png -t 5 -vf "format=yuv420p" edit/animations/slot_4/render.mp4

Summary

  • HyperFrames provides the fastest path for web-native animations using HTML/CSS/GSAP without React overhead, requiring Node.js 22+.
  • Remotion serves React-heavy workflows and component reuse scenarios, though it introduces heavier npm dependencies.
  • Manim remains the authoritative choice for mathematical precision, formal diagrams, and algorithmic visualization in Python environments.
  • PIL + ffmpeg offers the leanest dependency footprint for simple raster overlays and quick iteration cycles.
  • All engines conform to the slot architecture in edit/animations/slot_<id>/ and output to the unified overlay contract consumed by helpers/render.py.
  • The lazy installation model ensures dependencies are only fetched when a specific slot requires them, keeping the base repository lightweight.

Frequently Asked Questions

Can I mix multiple animation engines in a single video project?

Yes. The slot-based architecture in video-use explicitly supports mixing engines within the same project. Each slot operates independently under edit/animations/slot_<id>/, allowing you to render a Manim mathematical diagram in Slot 1, a HyperFrames UI animation in Slot 2, and a PIL text overlay in Slot 3. The final EDL references each rendered file uniformly, and helpers/render.py composites them sequentially regardless of their source engine.

Why does HyperFrames require Node.js 22+ specifically?

According to install.md#L159-L160, HyperFrames relies on modern Node.js features for its frame extraction and browser automation pipeline. The engine performs deterministic frame-by-frame captures of HTML/CSS/GSAP compositions, which requires recent Node APIs for headless browser control and memory management. Remotion also requires Node.js but is less strict about the specific version, while Manim and PIL have no Node dependencies whatsoever.

How does video-use handle animation validation and errors?

The repository implements a self-evaluation loop with automatic retry logic. After helpers/render.py composites the base cut with overlay clips, the system runs a timeline_view visual check. If the animation fails validation—whether from a HyperFrames lint error, a Remotion build failure, or a Manim rendering crash—the slot can be regenerated automatically up to three attempts. HyperFrames provides explicit lint and validate commands, while Remotion and Manim rely on their native build processes to surface errors before the compositing stage.

Is there a performance difference between the engines for long-form video?

Yes. PIL + ffmpeg offers the fastest render times for simple overlays because it bypasses complex browser or TeX rendering pipelines. HyperFrames and Remotion introduce overhead from browser automation and React reconciliation, respectively, though they produce higher-fidelity motion graphics. Manim typically exhibits the longest render times due to its mathematical precision and antialiasing calculations, making it best suited for short, complex diagrams rather than long kinetic typography sequences.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →