Edit Format & Review
Layered Edit JSON v1 schema reference, model-assisted edit suggestions, deterministic validation, contact sheets, cut auditions, objective edit linting, and post-render verification.
Instead of asking agents to hand-author brittle NLE XML or ad-hoc render scripts, Skywrite uses a small, deterministic Edit JSON v1 format that validates against real local media and compiles into MP4 renders, Python FFmpeg scripts, NLE interchange XML, or composition projects.
Layered Edit JSON v1 Schema
Run skywrite schema at any time to print the full JSON Schema and starter example. Below is an annotated assembly showing color metadata, layered video, synced dialogue, keyframed music, captions, chapters, pauses, and a master limiter:
{
"version": 1,
"name": "Interview assembly",
"width": 1920,
"height": 1080,
"fps": { "num": 30000, "den": 1001 },
"sources": [
{
"path": "camera.mxf",
"lut": "luts/clog2-to-709.cube",
"color": {
"transfer": "canon-log2",
"primaries": "cinema-gamut",
"note": "confirmed by operator"
}
}
],
"video": [
{
"name": "A-roll",
"role": "dialogue",
"clips": [
{ "start": 0, "source": "camera.mxf", "source_in": 12.4, "duration": 9, "audio": { "volume": 0 } },
{ "start": 9, "source": "title.png", "duration": 3, "fade_out": 1 }
]
},
{
"name": "B-roll",
"clips": [
{ "start": 4, "source": "crowd.mp4", "source_in": 30, "duration": 3, "fade_in": 0.5, "audio": { "volume": 0 } }
]
}
],
"audio": [
{
"name": "Dialogue",
"role": "dialogue",
"clips": [
{ "start": 0, "source": "recorder.wav", "source_in": 20.1, "duration": 9, "speed": 0.9999, "fade_out": 0.25 }
]
},
{
"name": "Music",
"role": "music",
"clips": [
{
"start": 0,
"source": "bed.mp3",
"duration": 12,
"volume": 0.5,
"volume_keyframes": [
{ "time": 0, "volume": 1 },
{ "time": 1, "volume": 0.3 },
{ "time": 8.5, "volume": 0.3 },
{ "time": 9.5, "volume": 1 }
],
"fade_out": 2
}
]
}
],
"captions": [
{ "from_transcripts": ["recorder.transcript.json"], "language": "eng", "mode": "soft" }
],
"chapters": [
{ "start": 0, "title": "Opening" },
{ "start": 9, "title": "Title card" }
],
"pauses": [
{ "start": 4.2, "end": 5.1, "note": "deliberate beat" }
],
"master": { "limiter_db": -1 }
}
Tracks, Timing & duration vs speed
- Layer order.
video[0]is the bottom layer; higher video tracks composite on top with transparent letterboxing (showing black at the bottom). Clips on the same track must not overlap. Empty timeline regions render black and silent. - Paths. All paths resolve relative to the edit JSON file (absolute and
../paths are allowed and listed inexternal_sources). Symlinks and special files are refused. source_invsdurationvsspeed.source_inis seconds from the source’s first presented sample and retains full sub-frame precision for word-accurate cuts.durationis always output timeline seconds, never source length.speedis source seconds per output second (0.125–8). A 10-second output clip atspeed: 1.01consumes10.1source seconds.- Stills preserve alpha (e.g., transparent Takumi PNGs) and require
source_in: 0andspeed: 1.
- Rational frame grid. Every clip’s
startandstart + durationround once to the nearest output frame, so consecutive clips share exact boundary frames at23.976(24000/1001),29.97(30000/1001), or59.94(60000/1001) fps without one-frame gaps or overlaps. A rounding tail up to one output frame past a source’s end is accepted with a warning (padded in renders, trimmed to whole media frames in NLE XML).
Audio Mixing, Keyframes, Roles & Master Limiter
- Controls. Both
audiotrack clips and a video clip’s linkedaudioobject support linearvolume(0–4, where0mutes), strictly increasingvolume_keyframes([{"time": seconds_from_clip_start, "volume": gain}], linearly interpolated and held outside endpoints), and linearfade_in/fade_out(seconds). Effective gain isvolume × keyframe_envelope × fades. - 48 kHz stereo mix & limiter. All audio mixes at 48 kHz stereo (mono centered at −3 dB per channel) summed at unity gain. Nothing limits peaks unless
master.limiter_db(-24to0dBFS) is set. - Track roles. Optional
"role": "dialogue" | "music" | "effects"on any video or audio track enables stem renders (skywrite edit render edit.json --roles dialogue -o check.mp4), FCPXML audio role labeling, and explicit dialogue-vs-bed classification inreview lint. When--rolesis used, every audible track must declare a role.
Color, LUTs, Captions, Chapters & Pauses
sources[]. Declares operator-confirmed capturecolormetadata (for reports) and an optional 1D or 3D.cubelut(up to 32 MiB combined) applied by MP4/Python renders before scaling. Declaring a log encoding without a LUT triggers a warning.captions[]. Two modes on the output timeline:from_transcripts: automatically maps word timestamps from Skywrite transcripts through audible clips (skipping muted/cut/faded words, deduplicating synced copies, breaking cues at cuts). Requires validusage.source_sha256matching the source media. Export standalone SRT withskywrite edit captions edit.json -o captions.srt.source: existing.srt, plain.vtt, or Skywrite transcript.jsonmapped explicitly withoutput_time = offset + scale * caption_time(defaults0and1).languageis a 3-letter lowercase ISO-639 code (defaultund).modedefaults tosoft(mov_textMP4 subtitle track);burnrenders text into pixels using FFmpeg’slibasssubtitlesfilter. Braces ({,}) and backslashes (\) are rejected in caption text so soft tracks and burn-in stay identical. Standalone conversion and post-render muxing are available viaskywrite captions convertandskywrite captions mux.
chapters[]&pauses[]. Chapters require strictly increasingstarttimes inside the output duration. Pauses ({"start": s, "end": e, "note": "..."}) mark deliberate silences on the output timeline soreview lintexcludes them fromdead_air(up to 1,000 chapters and 1,000 pauses).
Edit v1 Bounds
| Limit | Maximum |
|---|---|
| Video tracks / audio tracks | 16 video / 32 audio |
| Video clips / audio clips | 1,024 video / 1,024 audio |
| Volume keyframes per clip / source entries | 256 / 256 |
| Output duration / dimensions / FPS | 24 hours / even 2–8192 px / 1–240 fps |
| Speed / linear gain | 0.125–8 / 0–4 |
| Captions | 8 tracks, 100,000 total cues, 4 MiB text/track, 4,096 B/cue, 8 MiB/input |
Suggesting & Validating Edits
An agent can author Edit JSON directly or ask an editing model to draft one from saved analyses and verified transcripts:
skywrite edit suggest \
--analysis camera-a.analysis.json recorder.analysis.json \
--transcript recorder.transcript.json \
--brief 'Make a concise opening with complete thoughts' \
--model YOUR_TEXT_MODEL \
-o edit.json
skywrite edit validate edit.json
edit suggestvalidates every saved analysissource_sha256and attached transcriptusage.source_sha256against local media before calling the model (8 MiB combined input cap, 8,192 words / 512 KiB per range), validates the drafted Edit JSON before writing, and emits advisory stderr warnings if audible cuts fall inside transcribed words.edit validatechecks source existence, stream types, source duration bounds, intra-track overlaps, LUT files, even dimensions, finite values, and frame-grid rounding warnings—completely offline.
Reviewing an Edit (skywrite review)
Review commands gather objective visual and acoustic evidence without modifying the edit or judging editorial taste.
Contact Sheets (review sheet)
Render consecutive exact frames tiled with source timestamps and frame numbers using embedded Takumi (no network calls, up to 48 tiles per sheet):
# Dense sheet around a candidate cut (every 2nd frame for 1 second)
skywrite review sheet camera.mp4 --start 120 --duration 1 --every 2 -o around-cut.jpg
# Coarse overview of a 10-minute clip
skywrite review sheet camera.mp4 --start 0 --duration 600 --interval 15 --columns 8 -o overview.jpg
Cut Auditions (review cuts)
Generate short audio-visual clips playing --handles seconds before and after every cut in the edit, alongside a JSON manifest listing which tracks, sources, and source times start or end at each cut:
skywrite review cuts edit.json --handles 1.5 --output-dir cut-review
# Reuse an existing render to skip re-rendering
skywrite review cuts edit.json --render preview.mp4 --output-dir cut-review-2
The output directory must be new.
Objective Edit Linting (review lint)
Check an edit against word-timed transcripts and source audio levels before rendering:
skywrite review lint edit.json \
--transcript presenter.transcript.json \
--transcript audience.transcript.json
Every supplied transcript must pass usage.source_sha256 verification before checks begin. Pass --no-levels to skip source-window audio level decoding (capped at 256 windows).
| Warning Code | What It Detects |
|---|---|
visible_speaker_without_dialogue |
A dialogue source’s picture is uncovered while its transcribed words fall where no dialogue is audible |
repeated_word_across_cut / repeated_word_in_select |
The same word heard twice consecutively (common stumble or restart) |
word_clipped_at_cut |
A clip starts or ends inside a transcribed word (beyond 1 frame or 40 ms slack) with no straight split or fade |
filler_words |
Fillers such as “um” in audible dialogue (note: transcripts may omit fillers, so absence proves nothing) |
unfinished_ending |
Last heard word stops mid-thought (no_sentence_final_punctuation, next_word_continues across 7 European languages, or open_list such as “three reasons” cut short) |
dead_air |
Silence between heard dialogue words longer than --dead-air-seconds (default 0.6 s, measured on output timeline across J/L cuts; respects edit pauses[] and reports other_sound and untranscribed_dialogue) |
sound_cut_mid_flow |
Clip ends without a fade while its source continues sounding at a similar level (clipped applause or music tail) |
brief_shot |
A take—or a black gap between full-frame opaque pictures—on screen for less than --min-shot-seconds (default 0.5 s; 0 disables) between hard cuts. Stretches with fades/dissolves or non-full-frame black are skipped and listed in checked.brief_shots_not_checked |
bed_close_to_dialogue |
A non-dialogue source (music/effects role, or untranscribed source) within 10 dB of dialogue during speech |
[!NOTE] If no
--transcriptis supplied (or adialogue-role track lacks one),review lintlists skipped checks innot_checked(and prints them tostderr) so an emptywarningsarray is never mistaken for a clean edit.
Post-Render Verification (skywrite verify)
After rendering an MP4, verify the encoded file itself with a fresh complete decode of the first audio and video streams (600 s wall deadline, 6-hour work limit, 16 GiB input limit; zero network):
# Full pre-publish check against the edit that produced it
skywrite verify out.mp4 --ends-together --loudness --black --frozen --edit edit.json
# Custom loudness target (e.g. -14 LUFS for music streaming or -23 LUFS for EBU broadcast)
skywrite verify out.mp4 --loudness --target-lufs -14 --max-true-peak -1
# Exact technical assertions (duration, dimensions, FPS)
skywrite verify out.mp4 --expected-duration 12 --duration-tolerance 0.05 \
--expected-width 1920 --expected-height 1080 --expected-fps 30
| Flag | Default Thresholds | What It Checks |
|---|---|---|
--ends-together |
--end-tolerance 0.05 (50 ms) |
Video stream end (from last 30 s of packets) and audio end (min of packet end and decoded samples, handling AAC padding) finish within tolerance |
--loudness |
--target-lufs -16, --lufs-tolerance 1, --max-true-peak -1 |
EBU R128 integrated loudness (LUFS), loudness range (LU), and true peak (dBTP) via FFmpeg loudnorm |
--black |
--black-min-seconds 0.5, --black-pixel-threshold 0.1 |
Fails on a black first frame (first_frame_black) or any black span ≥ minimum (black_frames, 98% pixels below luma threshold) |
--frozen |
--frozen-min-seconds 2, --frozen-noise-db -60 |
Fails on static spans ≥ minimum (freezedetect; black spans are not double-counted) |
--edit EDIT.json |
--edit-tolerance 0.1 |
Allows intentional black during opening fade_in / closing fade_out and frozen frames during solo still-image clips (allowed: "fade_in" | "fade_out" | "still") |
--metadata-only |
— | Skips full decoding; validates only stream-header dimensions/FPS/estimated duration (cannot combine with decode checks) |
When any requested check fails, skywrite verify exits 1 while still printing the complete JSON report (including checks, stream_ends, edit_allowances, and not_measured) on stdout. Save a copy with --output report.json.