Skip to content
Four render chunks; only the one containing the edited caption is re-rendered, the other three are reused.

Change one caption. Re-render one chunk, not the whole video.

rereel keeps your Remotion video as small JSON plus a lockfile in Git, hashes every render chunk by only the props and media it actually shows, and rebuilds just the chunks you touched.
Terminal window
# Edit the CTA text in props.json, then:
npx @mathrunet/rereel build ./reels/ep01
{
"status": "built",
"outPath": ".../build/output.mp4",
"totalFrames": 300,
"fps": 30,
"chunksTotal": 2,
"chunksRendered": 1,
"chunksReused": 1
}

When you (or an AI agent) iterate on a Remotion video stored in Git, three things break first.

Git fills up with media

PNG frames, WAV narration, B-roll and rendered MP4s push .git into gigabytes.

rereel: freeze moves every media file into a storage provider (local CAS, S3, R2, GCS, or your own CLI) and records it in rereel.lock.json with its SHA-256. Git keeps tens of kilobytes of JSON. hydrate restores the bytes and verifies every hash.

One typo re-renders everything

A single changed character in props.json invalidates the whole render.

rereel: build splits the timeline into fixed-size chunks (300 frames by default) and hashes each one from only the timed items and media that intersect it. Unchanged chunks are reused and joined with ffmpeg -c copy.

Audio edits destroy the source

Trimming silences and retakes by rewriting WAV files is lossy and hard to undo.

rereel: narration is a list of segments (src_start_sec, duration_sec, start_sec) in mix_plan.json. cut-retakes proposes those segments; FFmpeg mixes them in one pass with BGM ducking and 2-pass loudness normalization. The original file is never modified.

What lives in Git, and what is build output

Section titled “What lives in Git, and what is build output”
reels/ep01/
├── rereel.json # spec: template, size, fps, chunkFrames, audioMode ← Git
├── rereel.lock.json # every media file: provider, uri, sha256, bytes ← Git
├── props.json # Remotion input props (media paths rewritten to media/) ← Git
├── mix_plan.json # narration segments, BGM, SFX, loudness targets ← Git
├── timing.json # optional ← Git
├── captions.srt # optional ← Git
├── media/ # hydrated from the lockfile on demand ← .gitignore
└── build/ # chunks/, stems/, template/, output.mp4 ← .gitignore
Terminal window
# 1. Freeze a Remotion working directory into a Git-slim reel
npx @mathrunet/rereel freeze ./reels/ep01 --props ./work/props.json --mix-plan ./work/mix_plan.json \
--template-source local --template-path ../../remotion-template --composition Main
# 2. Validate references and the lockfile (no media needed: safe for CI)
npx @mathrunet/rereel validate ./reels/ep01
# 3. Hydrate media and build the MP4
npx @mathrunet/rereel build ./reels/ep01
# 4. Edit one caption in props.json and rebuild: only the chunk that shows it re-renders
npx @mathrunet/rereel inspect ./reels/ep01
npx @mathrunet/rereel build ./reels/ep01

The Quick Start walks through this end to end.

One JSON line per command

Every command prints exactly one JSON object to stdout, including errors ({"status":"error","code":2,...}), with stable exit codes. Agents parse results without scraping logs.

One-line agent skill

/plugin install rereel --marketplace mathrunet/rereel in Claude Code, or npx skills add mathrunet/rereel for Codex, Cursor and others. The agent learns the workflow: inspect, edit JSON, validate, build. Set it up.

Surgical edits

inspect returns a compact timeline. patch ripple-shift moves every downstream timestamp in props.json, mix_plan.json, timing.json and captions.srt together, so a small edit stays a small diff.

Non-destructive by design

Agents only ever write JSON. Source media is content-addressed and verified by SHA-256, so a bad edit is a git revert away.

@mathrunet/rereel is an independent, community-built tool designed to work with Remotion. It is not affiliated with or endorsed by Remotion AG. Rendering uses your own Remotion installation and is subject to Remotion’s license.

rereel is free and MIT-licensed. If it saves you render time, consider sponsoring the author on GitHub. Thank you for your support!