Skip to content

File formats

A rereel bundle is a directory of small text files that you commit to Git, plus two directories you ignore:

File Committed Written by Read by
rereel.json yes freeze every command
rereel.lock.json yes freeze hydrate, build, validate, inspect
props.json yes freeze, patch build, validate, inspect, patch
mix_plan.json yes freeze, patch build, validate, inspect, patch
timing.json yes freeze, patch ripple-shift build, patch ripple-shift
captions.srt yes freeze, patch ripple-shift patch ripple-shift
chapters.json yes freeze —
cuts.json optional cut-retakes --out — (input for editing mix_plan.json)
media/ no freeze, hydrate build
build/ no build build
**/media/
**/build/

All paths inside these files are relative to the bundle directory (<reel_dir>). Times are in seconds unless the key says frames.


TypeScript type: RereelSpec.

{
"schemaVersion": 1,
"kind": "remotion_single",
"template": {
"source": "builtin",
"name": "short",
"composition": "Short-9x16"
},
"video": {
"width": 1080,
"height": 1920,
"aspect": "9:16",
"fps": 30,
"chunkFrames": 150
},
"slicePreset": "scenes",
"audioMode": "mix_plan",
"propsFile": "props.json",
"mixPlanFile": "mix_plan.json",
"lockFile": "rereel.lock.json"
}
Field Type Required Default Description
schemaVersion 1 yes — Must be 1 (validate reports SCHEMA_VERSION otherwise).
kind "remotion_single" | "remotion_chapter" | "composite_merge" yes CLI: remotion_single remotion_single renders one video with final mastering. remotion_chapter renders a chapter whose audio is mixed with scope chapter (no loudness normalization; stems kept for a later merge). composite_merge concatenates parts.
template TemplateRef for Remotion kinds — Remotion template. build fails without it unless --template-dir is passed.
video VideoSpec yes — Output geometry and render settings.
slicePreset SlicePreset no auto How chunk hashes extract time-sliced props.
customSlices CustomSliceExtractor[] when slicePreset: "custom" — Custom timed arrays.
audioMode "mix_plan" | "remotion" | "none" yes CLI: mix_plan mix_plan: chunks are rendered --muted and audio is compiled from mix_plan.json with FFmpeg. remotion: Remotion renders audio inside chunks and it is kept through concat. none: muted output.
parts CompositePartRef[] for composite_merge — Ordered parts to concatenate.
propsFile string no props.json
mixPlanFile string no mix_plan.json
lockFile string no rereel.lock.json
timingFile string no timing.json (when read) Set by freeze --timing.
captionsFile string no captions.srt (when read) Set by freeze --captions.
chaptersFile string no — Set by freeze --chapters.
Field Type Required Description
source "local" | "storage" | "builtin" yes Where the Remotion project lives.
name string yes Template name (e.g. basic, short). For builtin, the directory name under $REREEL_TEMPLATES_DIR or ~/.samurai/templates/remotion. Also used in cache directory names.
path string when local Template directory, relative to <reel_dir> (or absolute). Must contain package.json.
uri string when storage URI of a .tar.gz template archive, resolved with provider.
archiveSha256 hex string SHA-256 required of the storage archive, if provided. Pinned templates are built from verified storage and cannot be overridden with --template-dir.
provider string no Storage provider name for uri (default provider if omitted).
entry string no Remotion entry file relative to the template root. Auto-detected from src/index.ts, src/index.tsx, src/index.js, src/Root.tsx.
composition string yes Remotion composition ID (CLI default Main).

See template resolution.

Field Type Required Default Description
width number yes CLI: by aspect Must be > 0.
height number yes CLI: by aspect Must be > 0.
aspect string yes CLI: 16:9 Informational (e.g. 16:9, 9:16, 1:1).
fps number yes CLI: 30 Must be > 0.
chunkFrames number no 300 Frames per incremental render chunk (minimum 1).
imageFormat "jpeg" | "png" no jpeg Passed as --image-format.
jpegQuality number no 80 Passed as --jpeg-quality when imageFormat is jpeg.
concurrency number no 2 Passed as --concurrency.
remotionArgs string[] no [] Extra arguments appended to remotion render. Part of every chunk hash.

The composition defines the render size for remotion_single and remotion_chapter. A composite_merge uses width, height, and fps to normalize incompatible input streams.

Field Type Required Description
id string yes Logical part ID (e.g. c01, opening). Used in error messages.
kind "chapter" | "media" yes chapter → a child rereel bundle, built recursively. media → a locked video file.
reelDir string when chapter Child bundle directory, relative to <reel_dir>.
mediaPath string when media Media path. freeze rewrites it into a lock key.
role "opening" | "end_card" | "insert" no Descriptive only. Not used by the builder.
{
"schemaVersion": 1,
"kind": "composite_merge",
"video": { "width": 1920, "height": 1080, "aspect": "16:9", "fps": 30 },
"audioMode": "mix_plan",
"parts": [
{ "id": "opening", "kind": "media", "mediaPath": "media/opening_5e6f7a8b.mp4", "role": "opening" },
{ "id": "c01", "kind": "chapter", "reelDir": "chapters/c01" },
{ "id": "c02", "kind": "chapter", "reelDir": "chapters/c02" }
]
}
Field Type Description
arrayPath string Dot path to an array inside props.json (e.g. timeline.clips).
startSecKey string Item key holding the start time in seconds.
endSecKey string Item key holding the end time in seconds.
durationSecKey string Item key holding the duration in seconds (used when endSecKey is absent).
startFrameKey string Item key holding the start frame. Checked before startSecKey.
durationFramesKey string Item key holding the duration in frames (default 1 frame).
padFrames number Overlap padding in frames (default 30).
{
"slicePreset": "custom",
"customSlices": [
{ "arrayPath": "timeline.clips", "startSecKey": "from", "endSecKey": "to", "padFrames": 15 },
{ "arrayPath": "captions", "startFrameKey": "f", "durationFramesKey": "len" }
]
}

Each chunk’s cache key is a SHA-256 over: the frame range, composition, entry, template source hash, fps, image format, JPEG quality, remotionArgs, the props slice for that chunk, and the lockfile SHA-256 of every media string inside that slice ("unlocked" for refs not in the lock). See Incremental rendering.

An item with window [s, e] (in frames) belongs to chunk [S, E] when s <= E + pad && e >= S - pad, where pad is 30 frames by default.

Preset Behaviour
auto Tries kogatana for cuts or edit.cuts, lyrics for structure and images, then scenes for scenes or scenes.scenes. Falls back to the generic extractor.
kogatana Filters cuts, edit.cuts, and overlays.
scenes Filters scenes, dialogue, and overlays.
lyrics Filters images.shots, structure.sections, and overlays.
custom With a non-empty customSlices: every top-level key except the root key of each arrayPath is included verbatim, and each extractor’s array is filtered by its own keys. Items without a detectable window are always included. Without customSlices, it falls back to the generic extractor.

The three named presets also filter hook and cta. All other props are kept whole, including additional fields in objects that wrap a timed collection. The generic extractor applies all the filters below:

Key Included in slice
cuts Items overlapping the chunk
edit All keys, with edit.cuts filtered
overlays Array filtered, or overlays.overlays filtered (other keys kept)
scenes Array filtered, or scenes.scenes filtered (other keys kept)
dialogue Items overlapping the chunk
hook, cta The whole object if it overlaps (or has no window), otherwise null
images All keys, with images.shots filtered
structure All keys, with structure.sections filtered
audio Included when the build uses audioMode: "remotion"; otherwise excluded by the generic and named presets.
any other key Included verbatim, so a change invalidates every chunk

Item window inference (generic extractor), first match wins:

Item keys Window (frames)
fromFrame [+ durationInFrames] [fromFrame, fromFrame + (durationInFrames ?? 1)]
startFrame [+ endFrame | durationInFrames] [startFrame, endFrame ?? startFrame + (durationInFrames ?? 1)]
atFrame [+ durationInFrames | durationSec | duration_sec] [atFrame, atFrame + duration], default duration 4 × fps
start_sec [+ end_sec | duration_sec] [floor(start × fps), ceil(end × fps)], default end start + 1 s
startSec [+ endSec | durationSec] same as above
only duration_sec Sequential: placed after the previous duration-only item in the same array
none of the above No window, so the item is included in every chunk

TypeScript types: RereelLock, LockedAsset.

{
"schemaVersion": 1,
"items": {
"fonts/NotoSansJP-Bold.ttf": {
"source": "template",
"templateRel": "public/fonts/NotoSansJP-Bold.ttf",
"sha256": "4b1d…",
"bytes": 5678912,
"kind": "font"
},
"media/bg_s001_1a2b3c4d.png": {
"source": "storage",
"provider": "local-cache",
"uri": "cas://1a2b3c4d….png",
"sha256": "1a2b3c4d…",
"bytes": 482113,
"kind": "image",
"width": 1080,
"height": 1920
},
"media/vo_take1_9f8e7d6c.wav": {
"source": "storage",
"provider": "r2",
"uri": "s3://my-video-assets/rereel/9f/9f8e7d6c….wav",
"sha256": "9f8e7d6c…",
"bytes": 5760044,
"kind": "audio",
"durationSec": 30.0002
}
}
}
Field Type Description
schemaVersion 1
items Record<string, LockedAsset> Map from bundle-relative key (the string used in props/mix plan) to asset metadata. Sorted by key when written by freeze.
Field Type Description
source "storage" | "template" storage: fetched through a provider. template: shipped inside the Remotion template (public/fonts/, public/sfx/, public/sample/).
provider string Provider name used to store and resolve the asset.
uri string Provider URI (cas://…, s3://…, asset://…, https://…). Required for storage items.
templateRel string Path inside the template (e.g. public/fonts/X.ttf) for template items.
sha256 string Hex SHA-256 of the exact bytes. Verified on every hydrate.
bytes number File size.
kind "image" | "video" | "audio" | "font" | "svg" | "archive" | "other" Detected from the file extension.
durationSec number From ffprobe (4 decimals).
width, height number From ffprobe (images and video).
fps number r_frame_rate from ffprobe (3 decimals).
vfr boolean Present (true) when r_frame_rate and avg_frame_rate differ by more than 0.25. validate warns with VFR_MEDIA.

Media kind by extension: image png jpg jpeg webp gif avif · video mp4 webm mov m4v mkv · audio wav mp3 m4a aac ogg opus flac · font ttf otf woff woff2 · svg svg · archive gz tgz tar zip.


The input props of your Remotion composition, passed to remotion render --props. rereel does not impose a schema, but several conventions matter:

  • Media references are any string value that ends in a media extension and is not an http(s):// or data: URL. freeze replaces them with lock keys such as media/bg_1a2b3c4d.png. Values under keys named output, layoutReport, or log are never treated as media.
  • At build time, media/ is copied to the staged template’s public/media/. A lock key media/x.png is therefore available as public/media/x.png, so load it with Remotion’s staticFile(path). Template-static items (e.g. fonts/X.ttf) keep their path relative to public/.
  • Duration must be discoverable by build: duration_sec, durationSec, durationInFrames + fps, clip.start_sec/clip.end_sec, or outline.duration_sec (unless timing.json provides duration_sec).
  • Timed items should carry start_sec/end_sec (or frame keys) so that edits invalidate only the affected chunks. See slice presets.
  • Top-level audio is ignored by chunk hashing (generic extractor).
  • inspect reads scenes[] (id, start_sec, end_sec, duration_sec, narration / text) and counts cuts / edit.cuts.

When audioMode is mix_plan and there is no mix_plan.json, build derives one from these props keys:

Props key Derived entry
audio_path (+ clip.start_sec, clip.fade_in_sec, clip.fade_out_sec) BGM over the whole video, no loop, src_start_sec = clip.start_sec
audio.bgm_path Looping BGM over the whole video
audio.voice_path Narration from 0 for the whole duration
audio.tracks[] (path, start_sec, end_sec, loop, fade_in_sec, fade_out_sec) One BGM cue each
hook.narration_path (+ start_sec, end_sec) Narration segment
scenes[].narration_path (+ start_sec, end_sec) Narration segment per scene
dialogue[].voice_path (+ start_sec, end_sec, text) Narration segment per line

TypeScript type: MixPlan. Compiled by FFmpeg into build/mix.wav and four stems. See Audio compilation. Paths are relative to <reel_dir> (absolute paths also work but fail validate).

{
"duration_sec": 45.0,
"audio": { "narration_lufs": -16, "bgm_lufs_under_narration": -24 },
"narration": [
{ "id": "seg_001", "path": "media/vo_take1_9f8e7d6c.wav", "start_sec": 0.0, "src_start_sec": 0.41, "duration_sec": 3.51, "fade_in_sec": 0.015, "fade_out_sec": 0.015, "text": "Today we will look at rereel." }
],
"bgm": [
{ "path": "media/bgm_lofi_77ef0011.mp3", "start_sec": 0, "end_sec": null, "loop": true }
],
"sfx": [
{ "path": "media/whoosh_0a0b0c0d.wav", "at_sec": 3.4, "gain_db": -3 }
],
"brand": [
{ "path": "media/end_card_5e6f7a8b.wav", "role": "end_card", "start_sec": 40.0 }
],
"speech": [[0.0, 3.51], [3.65, 9.2]],
"fade_out_sec": 1.5
}
Field Type Description
duration_sec number Mix length. Must be positive when compiled; build fills it from the video duration if omitted.
audio Partial<AudioSettings> Overrides merged over defaults.
narration NarrationSegment[] Voice segments.
bgm BgmCue[] Music cues (ducked under speech).
sfx SfxCue[] One-shot effects.
brand BrandAudioPart[] Opening / end card audio.
chapters ChapterAudioPlacement[] Chapter stems to merge (composite final mix).
speech [number, number][] Explicit speech intervals for ducking. If omitted, derived from narration placement.
fade_out_sec number Fade-out at the end of the master mix (default 0).
Field Type Default Description
id string — Needed for patch trim-segment.
path string — Audio file.
start_sec number 0 Timeline position (clamped ≥ 0).
src_start_sec number 0 Offset into the source file.
duration_sec number duration_sec − start_sec Segment length.
gain_db number 0 Added after loudness normalization.
fade_in_sec, fade_out_sec number 0 Micro-fades.
text string — Spoken text (for readability and grep only).

Each segment is normalized to narration_lufs (measured integrated loudness), then gain_db is applied.

Field Type Default Description
path string — Music file.
start_sec number — Timeline start. Cues are sorted by start_sec.
end_sec number | null plan duration_sec Timeline end.
src_start_sec number 0 Source offset.
loop boolean true Loop the source (-stream_loop -1).
gain_db number 0 Added after normalization to bgm_lufs_in_gaps.
fade_in_sec number crossfade_sec
fade_out_sec number crossfade_sec (0 for the last cue in final scope)

Every cue except the last runs crossfade_sec past its end_sec so it overlaps the next cue. In chapter scope the last cue also gets that tail. The BGM bus is ducked by bgm_lufs_under_narration − bgm_lufs_in_gaps dB (default −6 dB) during speech intervals, with duck_ramp_sec ramps. Intervals closer than max(0.8, 2 × duck_ramp_sec) seconds are merged.

Field Type Default Description
path string — Effect file (full length is used).
at_sec number 0 Timeline position.
gain_db number 0 Clamped to ≤ 0, applied after peak normalization to sfx_peak_dbfs.
Field Type Default Description
path string — Audio file.
role "opening" | "end_card" | string — end_card enables the delay/fade defaults.
start_sec number 0 Timeline start.
end_sec number | null source duration Timeline end (len = end_sec − start_sec).
delay_sec number | null end_card_delay_sec for end_card, else 0 Skips this many seconds of the source and starts that much later.
fade_in_sec number | null end_card_fade_in_sec for end_card, else 0
fade_out_sec number | null 0
gain_db number 0 Added after normalization to brand_parts_lufs.
Field Type Default Description
dir string — Chapter bundle directory. Stems are read from <dir>/build/stems/ (or <dir>/stems/): narration.wav, bgm.wav, sfx.wav.
start_sec number — Timeline position in the merged mix.
src_start_sec number 0 Offset into the chapter stems.
src_end_sec number | null narration stem duration End offset.

The chapter BGM stem crossfades in (crossfade_sec, when start_sec > 0) and keeps a tail of up to crossfade_sec after src_end_sec. Chapter stems are not ducked again.

Key Default Meaning
narration_lufs -16.0 Narration loudness target (integrated LUFS).
bgm_lufs_under_narration -22.0 BGM level while someone speaks.
bgm_lufs_in_gaps -16.0 BGM normalization target outside speech.
sfx_peak_dbfs -12.0 SFX true-peak target.
brand_parts_lufs -16.0 Brand part loudness target.
crossfade_sec 0.5 BGM crossfade / default BGM fades.
master_lufs null Master target; null → narration_lufs. Used only in final scope.
true_peak_dbtp -1.5 Limiter ceiling and loudnorm TP.
duck_ramp_sec 0.3 Ducking ramp length.
end_card_delay_sec 0.6 Default delay for role: "end_card".
end_card_fade_in_sec 3.0 Default fade-in for role: "end_card".

Master chain: all four stems are summed, trimmed to duration_sec, faded out by fade_out_sec, and limited at 10^(true_peak_dbtp/20). In final scope this is followed by two-pass loudnorm (I = master_lufs ?? narration_lufs, TP = true_peak_dbtp). Build outputs go to build/mix.wav, build/stems/{narration,bgm,sfx,brand}.wav, and build/stems/mix.json.


A free-form JSON file copied by freeze --timing. rereel reads only:

Field Used by
duration_sec build (highest-priority duration source when > 0); updated by ripple-shift.
any start_sec, end_sec, at_sec, fromFrame, atFrame, startFrame, endFrame at any depth shifted by ripple-shift
{
"duration_sec": 45.0,
"beats": [
{ "id": "hook", "start_sec": 0, "end_sec": 3.2 },
{ "id": "s01", "start_sec": 3.2, "end_sec": 11.8 }
]
}

A standard SubRip file copied by freeze --captions and kept in sync by ripple-shift. Timestamps are HH:MM:SS,mmm (. is also accepted when parsing). When rewritten, cues are renumbered from 1.

1
00:00:00,000 --> 00:00:03,200
Still re-rendering the whole video?
2
00:00:03,200 --> 00:00:07,000
Edit one line. Rebuild one chunk.

Copied verbatim by freeze --chapters and recorded as chaptersFile. No command reads or modifies it (in particular, ripple-shift does not shift it), so its schema is up to you, for example YouTube chapter markers:

[
{ "title": "Intro", "start_sec": 0 },
{ "title": "Why chunks?", "start_sec": 12.5 }
]

The output of cut-retakes (--out). TypeScript type: CutRetakesResult.

Field Type Description
sourcePath string Input path as given.
sourceDurationSec number Probed source duration.
keptDurationSec number New timeline length including gaps.
removedSec number max(0, source − kept).
tempoRatio 1 Always 1.0 (no time-stretching).
segments CutSegment[] Kept ranges.
dropped RetakeDrop[] Removed ranges.
speechIntervals [number, number][] [timelineStartSec, timelineEndSec] per segment. Usable as mix_plan.json speech.

CutSegment

Field Type Description
id string seg_001, seg_002, …
srcStartSec, srcEndSec number Range in the source file.
durationSec number srcEndSec − srcStartSec.
timelineStartSec, timelineEndSec number Placement on the new timeline.
fadeInSec, fadeOutSec number min(fadeSec, durationSec / 4).
text string Utterance text (ASR mode only).

RetakeDrop

Field Type Description
srcStartSec, srcEndSec number Removed source range.
reason "retake" | "silence" | "filler" Why it was removed.
text string Utterance text (ASR mode).