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> --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: values already present in <reel_dir>/rereel.json are used as defaults (see the caution below for which fields survive).

  1. Builds the spec. Each rereel.json field is resolved as flag → value in an existing <reel_dir>/rereel.json → built-in default. propsFile, mixPlanFile, and lockFile are set to 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.
    • 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. Writes the rewritten props to <reel_dir>/props.json.
  6. Rewrites mix_plan.json the same way if --mix-plan is given and the file exists. A missing mix plan is silently ignored.
  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).

Flag Type Default Description
<reel_dir> path (positional) — (required) Output bundle directory.
--props path — Source props.json. Shown as required in the usage text, but the code accepts its absence (no props.json is written). Fails with exit 2 if given and missing.
--mix-plan path — Source mix_plan.json. Ignored if the file does not exist.
--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 (files not matched by SHA-256 in the previous lockfile).
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.