Skip to content

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.

Terminal window
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.

  1. Builds the spec. Explicit flags override the input spec. Use --spec to provide the input spec or omit it to reuse <reel_dir>/rereel.json when present. Missing fields use defaults such as props.json, mix_plan.json, and rereel.lock.json.
  2. Indexes the existing lockfile (if any) by SHA-256 so unchanged files are never uploaded twice.
  3. 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>.
  4. Walks props.json recursively. Values under keys named output, layoutReport, or log are skipped. Every other string that ends in a media extension and is not an http(s):// or data: 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/, or public/sample/: locked as a "template" item keyed by its path relative to public/ (e.g. fonts/Inter.ttf). Nothing is uploaded.
    • Same SHA-256 as an existing "storage" item with a uri: 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’s defaultProvider), keyed as media/<slug>_<sha256[0:8]><ext> (the slug is the file stem with characters outside A-Za-z0-9_- replaced by _, max 40 chars). Images, video, and audio are probed with ffprobe for durationSec, width, height, fps, and vfr. Probe failures are ignored.
    • Unless --no-keep-media is set, the file is copied (copy-on-write clone where supported) to <reel_dir>/<key>.
    • The string in props.json is replaced with the lock key.
  5. Uses the bundle’s props file as the source when --props is omitted and that file exists. Rewritten props are written to the name set by propsFile.
  6. Rewrites mix_plan.json the same way using --mix-plan or the existing bundle mix plan, if any.
  7. Locks parts[].mediaPath for kind: "media" parts (composite bundles).
  8. Copies --timing, --captions, and --chapters verbatim to timing.json, captions.srt, and chapters.json (if the source exists) and records them in timingFile, captionsFile, chaptersFile.
  9. Writes rereel.lock.json with items sorted by key. The lockfile is rebuilt from scratch, so items no longer referenced are dropped.
  10. Writes rereel.json and 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.

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.

{
"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.
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).

Freeze a 9:16 short using a local template and upload new assets to an R2 provider:

Terminal window
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 r2

Re-freeze after replacing an image, without keeping local copies:

Terminal window
rereel freeze ./reels/ep01 --props ./reels/ep01/props.json --no-keep-media

See also: rereel.json / rereel.lock.json schema, Lockfile & hydration.