rereel freeze
Converts a Remotion working directory (a props.json, an optional mix_plan.json, and media files scattered on disk) into a Git-slim rereel bundle: rereel.json, rereel.lock.json, a rewritten props.json, and optionally mix_plan.json, timing.json, captions.srt, chapters.json.
Synopsis
Section titled “Synopsis”rereel freeze <reel_dir> [--spec <rereel.json>] [--known-uris <paths.json>] [--props <props.json>] [--mix-plan <mix_plan.json>] [--template-dir <dir>] [--template-source local|builtin|storage] [--template-name <name>] [--template-path <dir>] [--template-uri <uri>] [--template-provider <name>] [--entry <file>] [--composition <id>] [--kind remotion_single|remotion_chapter|composite_merge] [--width <w>] [--height <h>] [--aspect 16:9|9:16|1:1] [--fps <n>] [--chunk-frames <n>] [--slice-preset auto|kogatana|scenes|lyrics|custom] [--audio-mode mix_plan|remotion|none] [--timing <timing.json>] [--captions <captions.srt>] [--chapters <chapters.json>] [--provider <name>] [--tags <tags>] [--no-keep-media] [--storage-config <path>]<reel_dir> is created if it does not exist. Running freeze again on an existing bundle is supported: existing spec fields and custom file names are carried forward.
What it does
Section titled “What it does”- Builds the spec. Explicit flags override the input spec. Use
--specto provide the input spec or omit it to reuse<reel_dir>/rereel.jsonwhen present. Missing fields use defaults such asprops.json,mix_plan.json, andrereel.lock.json. - Indexes the existing lockfile (if any) by SHA-256 so unchanged files are never uploaded twice.
- Builds the search bases used to resolve relative paths, in order:
<reel_dir>, the directory of--props, the directory of--mix-plan,<template-dir>/public,<template-dir>. - Walks
props.jsonrecursively. Values under keys namedoutput,layoutReport, orlogare skipped. Every other string that ends in a media extension and is not anhttp(s)://ordata:URL is treated as a media reference:- Absolute paths are used if they exist; relative paths resolve against the first search base where the file exists.
- Not found on disk: the string is left unchanged. If the existing lockfile has an item with exactly that key, the entry is carried over.
- Inside
<template-dir>/public/fonts/,public/sfx/, orpublic/sample/: locked as a"template"item keyed by its path relative topublic/(e.g.fonts/Inter.ttf). Nothing is uploaded. - Same SHA-256 as an existing
"storage"item with auri: the existing entry and key are reused. No upload. - Listed in
--known-uris: locks the local file by SHA-256 with the supplied URI and skips the upload. The selected provider must resolve that URI to the same bytes. - Otherwise: the file is stored with the storage provider (
--provider, or the config’sdefaultProvider), keyed asmedia/<slug>_<sha256[0:8]><ext>(the slug is the file stem with characters outsideA-Za-z0-9_-replaced by_, max 40 chars). Images, video, and audio are probed withffprobefordurationSec,width,height,fps, andvfr. Probe failures are ignored. - Unless
--no-keep-mediais set, the file is copied (copy-on-write clone where supported) to<reel_dir>/<key>. - The string in
props.jsonis replaced with the lock key.
- Uses the bundle’s props file as the source when
--propsis omitted and that file exists. Rewritten props are written to the name set bypropsFile. - Rewrites
mix_plan.jsonthe same way using--mix-planor the existing bundle mix plan, if any. - Locks
parts[].mediaPathforkind: "media"parts (composite bundles). - Copies
--timing,--captions, and--chaptersverbatim totiming.json,captions.srt, andchapters.json(if the source exists) and records them intimingFile,captionsFile,chaptersFile. - Writes
rereel.lock.jsonwith items sorted by key. The lockfile is rebuilt from scratch, so items no longer referenced are dropped. - Writes
rereel.jsonand returns a SHA-256 over the canonical JSON of{spec, lock, props, mix}.
Recognized media extensions: png jpg jpeg webp gif avif mp4 webm mov m4v mkv wav mp3 m4a aac ogg opus flac ttf otf woff woff2 svg (case-insensitive).
A re-freeze preserves customSlices, parts, render settings, and the existing paths of auxiliary files. Referenced lock entries are retained even when their media has not been hydrated.
Options
Section titled “Options”| Flag | Type | Default | Description |
|---|---|---|---|
<reel_dir> |
path (positional) | — (required) | Output bundle directory. |
--spec |
path | <reel_dir>/rereel.json if present |
Input spec, including composite parts and custom file names. |
--known-uris |
path | — | JSON object mapping local file paths to existing URIs in the selected storage provider. Relative keys resolve from the current directory. |
--props |
path | — | Source props JSON. Defaults to the bundle’s props file if it exists. An explicit missing path exits with code 2. |
--mix-plan |
path | — | Source mix plan. Uses the bundle’s mix plan if the option is omitted or the source is absent. |
--template-dir |
path | — | Local Remotion template directory. Used only to resolve relative media paths and detect template-static assets. It is not recorded in rereel.json; use --template-source local --template-path for that. |
--kind |
remotion_single | remotion_chapter | composite_merge |
remotion_single |
Bundle kind. |
--template-source |
local | builtin | storage |
builtin |
template.source. |
--template-name |
string | basic |
template.name. For builtin it is the directory name under the builtin template roots. |
--template-path |
path | — | template.path (required by build when source is local; resolved relative to <reel_dir>). |
--template-uri |
URI | — | template.uri (required by build when source is storage). |
--template-provider |
string | — | template.provider used to resolve --template-uri. |
--entry |
path | auto-detected at build time | template.entry, Remotion entry file relative to the template root. |
--composition |
string | Main |
template.composition. |
--aspect |
string | 16:9 |
video.aspect. Also selects default width/height. |
--width |
number | 1920 (16:9), 1080 (9:16, 1:1) |
video.width. |
--height |
number | 1080 (16:9, 1:1), 1920 (9:16) |
video.height. |
--fps |
number | 30 |
video.fps. |
--chunk-frames |
number | 300 |
video.chunkFrames. See incremental rendering. |
--slice-preset |
auto | kogatana | scenes | lyrics | custom |
auto |
slicePreset. See slice presets. |
--audio-mode |
mix_plan | remotion | none |
mix_plan |
audioMode. |
--timing |
path | — | Copied to timing.json. |
--captions |
path | — | Copied to captions.srt. |
--chapters |
path | — | Copied to chapters.json. |
--provider |
string | config defaultProvider (local-cache) |
Storage provider used to store new assets. |
--tags |
string | provider default | Passed to the provider as tags (used by the command provider’s {tags} placeholder). |
--no-keep-media |
flag | off | Do not copy locked files into <reel_dir>/media/. |
--storage-config |
path | lookup rules | Storage configuration file. |
“Default” above means the value used when neither the flag nor an existing rereel.json provides one. Values are not validated against the listed enums by the CLI.
Output
Section titled “Output”{ "status": "frozen", "reelDir": "/abs/path/reels/ep01", "lockedCount": 12, "storedCount": 3, "templateCount": 1, "rereelSha256": "9f2c…"}| Key | Description |
|---|---|
reelDir |
Absolute bundle path. |
lockedCount |
Number of items in the written rereel.lock.json. |
storedCount |
Number of provider.store() calls made in this run. |
templateCount |
Number of template-static items locked. |
rereelSha256 |
Deterministic digest of spec + lock + rewritten props + rewritten mix plan. |
Exit codes
Section titled “Exit codes”| Code | When |
|---|---|
0 |
Frozen. |
2 |
Missing <reel_dir>; non-numeric --width/--height/--fps/--chunk-frames; --props file not found; invalid JSON; unknown provider name; S3 provider without bucket or credentials; command provider without storeCommand; http provider used for storing (read-only). |
3 |
A storage command’s executable could not be spawned. |
4 |
Storage upload failed (S3 non-2xx, storeCommand non-zero exit or empty output). |
Examples
Section titled “Examples”Freeze a 9:16 short using a local template and upload new assets to an R2 provider:
rereel freeze ./reels/ep01 \ --props ./work/props.json \ --mix-plan ./work/mix_plan.json \ --template-dir ./remotion-template \ --template-source local --template-path ../../remotion-template \ --composition Short-9x16 --aspect 9:16 --fps 30 \ --provider r2Re-freeze after replacing an image, without keeping local copies:
rereel freeze ./reels/ep01 --props ./reels/ep01/props.json --no-keep-mediaSee also: rereel.json / rereel.lock.json schema, Lockfile & hydration.