Editing Script and Frame-Level Timeline (edit-scripting v2)
Pre-requisite (read first):
docs/video-edit-creation-doctrine.md. The film-level fields in the editing script follow the same standards as the closure sheet:overall_style/music_selection/color_grading/story_overview; each scene group includesstoryline/emotional_arc/editing_suggestions; the timeline declares a pacing profile; if default profile values are not met, only advisory items are generated. Subtitles are NOT written here—they are bound to shots via the "Editing Script Caption Version" using original material timecodes (see caption-craft).
1. From "Text Script" to "Executable Contract"
The old workflow split "scriptwriting" (scene-level fields) and "editing script draft" (original_timestamp + duration) into separate stages, causing:
- Timelines calculated by models often overlapped, left gaps, or mismatched total duration;
- Only 5 transition enums and a single "priority" for sound, unable to create layered edits;
- Beautifully written scene details still required manual re-interpretation for execution.
v2 merges them into a single contract: edit_timeline (machine-executable) + edit_script (human-readable). Both must be consistent; in case of conflict, the timeline takes priority and the script is backfilled.
2. Four-Dimensional Shot Selection (Not "Pick the Nicest")
| Dimension | Criteria | Counterexample |
|---|---|---|
| Information Density | Does the shot advance the narrative or provide new information? | A second empty shot repeating the same idea. |
| Visual Quality | Sharpness/exposure/stability/noise (signal-level metrics) | Shaky, blurry frames used for emotion (unless explicitly asking for "roughness"). |
| Continuity | Does it match preceding/following shots in scale/motion/eye-line/lighting/color? | Three consecutive same-scale, same-angle shots (jump-cut feel). |
| Uniqueness | Has this shot been used before? Is it replaceable? | Repeatedly using the same empty shot to fill time. |
Priority: Narrative necessity > acceptable quality > smooth continuity > visual beauty. Never sacrifice narrative for beauty.
3. Timeline Contract (Executor Boundaries)
- Source track:
sourceIn/sourceOut(seconds, precise to milliseconds) + frame number; multiple selections from the same source must not overlap, with interval ≥1s (ideal ≥2s). - Main track: naturally derived from clip sequence; must be continuous with no gaps (end of previous = start of next), starting from 0.
- Clip duration: 0.4–15s (up to 20s for educational content, must specify reason); clips shorter than 0.4s are invalid unless used as a timed beat.
- Speed: 0.1–8×; slow motion is preferred only when source frame rate ≥ fps×2 (otherwise, state quality loss).
- Transitions:
cut(default, hard cut preferred)/dissolve/fade_from_black/fade_to_black/wipe/match_cut/jump_cut/whip_pan/zoom_blur; duration ≤2s. Match cuts and jump cuts must state motivation. - Sound:
original/mute/ambience_only/bgm_only/duck_original/j_cut/l_cut; J-cut = next segment's audio starts early, L-cut = current segment's audio continues; offset written injCutOffsetSeconds. - Subtitle placement:
placement+ number of lines; safety zone taken fromtarget.safeAreas.
4. Transition Syntax Quick Reference (Professional Editing Terminology)
| Scenario | Recommended | Reason |
|---|---|---|
| Progression within same scene | Hard cut | Least intrusive; jump cuts only for time compression. |
| Time/space jump | Dissolve or black | Clearly signals "skip" to avoid viewer disorientation. |
| Action continuity | Match cut | Use matching action/shape/direction to establish causality. |
| Emotional shift | Whip pan/zoom blur (use sparingly) | "Accent" for high-rhythm sections; use no more than 2–3 times per film. |
| Return to a motif | Hard cut with similar composition | Creates resonance without explanation. |
Discipline: Transitions are "punctuation between sentences," not decoration. Every non-hard-cut transition must explain what problem it solves.
5. Sound Design (Half of Editing Is Sound)
- Original audio first: Keep original sound by default; replace only on explicit request. When original audio conflicts with BGM, first duck (duck), then consider lowering BGM volume.
- J-cut/L-cut: Prioritize use at scene transitions in interviews, voiceovers, travel narration; sound arriving before or lingering after the picture significantly reduces "stitching" feel.
- Silence and pauses: 0.5–1.5s of silence (including ambience) before emotional peaks is more effective than adding music; write into
silenceNotes. - Sound effects: Use only for on-screen actions (placing objects, closing doors, footsteps, page turns); do not pile effects for rhythm.
- Music beats: When a beat grid is available, snap cuts to beat points (±80ms); align chorus entry to emotional peaks.
6. Prompt Body (Directly Usable, v2)
You are an "Editing Director." Task: Convert a narrative plan into a frame-level timeline (machine-executable) and a human-readable editing script, ensuring both are consistent.
[Input]
- Narrative plan: structure/beat table/emotion curve/rhythm map/footage mapping: {{ story_plan }}
- Footage pool: shotId for each shot, frame-level interval, duration, scale, camera movement, quality score, emotion, usability, highlights, and keyframe IDs: {{ material_index }}
- Target: duration {{ duration_band }} | aspect ratio {{ aspect_ratio }} | fps {{ fps }} | platform {{ platform }} | safe areas {{ safe_areas }}
- Original audio strategy and BGM intent: {{ audio_intent }}
[Hard Rules]
1. Each clip must specify: source shotId, frame-level sourceIn/sourceOut, duration, shot selection reason (motive), and which highlight/keyframe it relates to.
2. Multiple selections of the same shotId on the source track must not overlap, with interval ≥1s; if not met, change footage or extend interval.
3. Main track is continuous with no gaps; total duration falls within target band (tolerance ≤5%).
4. Default transition is hard cut; any other transition must state motivation; transition duration ≤2s.
5. Sound design written into audio field (mode/fade in-out/J-cut offset/ducking); silence written into audioDesign.silenceNotes.
6. Timecodes always `HH:MM:SS.mmm`; descriptions like "about 3 seconds" are not allowed.
[Output JSON (two objects, same content)]
1) edit_timeline: follow schemas/edit-timeline.schema.json
2) edit_script: per-segment storyline/shot explanation/transition/sound/subtitle points (human-readable)
[Self-check (internal before output)]
- Total duration = sum of all segment durations (explain if transitions do not consume extra time)
- No overlaps, no gaps; clip durations within legal range
- Each segment has a shot selection reason; each segment references a valid id from the footage pool
- Transitions and sound modes are from valid enums
Decision Principles (Including Thresholds and Failure Conditions)
- Timeline is the sole execution source of truth: If script conflicts with timeline, timeline takes precedence and script is backfilled; inconsistency prevents synthesis.
- Source track no overlap, main track no breaks: Minimum interval between same-source clips ≥1s (ideal ≥2s); main track continuous with end of previous = start of next.
- Clip duration is a hard range: 0.4–15s (up to 20s for educational content with reason); <0.4s invalid except for beats.
- Default transition is hard cut: Non-hard-cut transitions must state motivation, duration ≤2s; total non-hard-cut transitions ≤5 (whip pan/zoom blur ≤2).
- Failure condition: If any of the following exist—missing footage, authorization not covering current use, or infeasible frame rate—reject timeline generation (no silent degradation).
Playbook (Scenario → Action Sequence → Criteria)
- Main line·Align by beat: Read structure → per-beat shot selection → set in/out → arrange main track → sound design (criteria: duration band hit + all selection reasons provided).
- Branch·Accelerate rhythm: Shorten average shot duration, increase short shots (0.6–1.2s) and hard cuts (criteria: cutsPerMinute matches rhythm map).
- Branch·Emotional passage: Lengthen single shots, leave ambient silence, use J-cut to bring in voiceover early (criteria: average shot duration in emotional passage ≥ adjacent passage ×1.5).
- Branch·Transition bridging: Prioritize match cuts (action/shape/direction), then dissolve; whip pan only for rhythmic accent (criteria: motivation can be restated).
SOP (Each Step with Trigger/Response/Failure Path)
- Trigger (structure and review passed) → per-segment shot selection with motive → response:
edit_scriptshot table; failure: if footage unavailable or authorization insufficient, swap footage or mark gap, do not force use. - Trigger (shot table confirmed) → generate frame-level
edit_timeline→ response: timeline + validation block; failure: same-source overlap or main track break triggers rollback and re-sort, do not deliver defective timeline. - Trigger (timeline generated) → local verification (
edit:verifystandard) → response: list of hard and advisory items; failure: if any hard item fails, entire timeline is rejected for synthesis, with per-segment correction instructions.
Key Metrics (With Baseline and Guardrails)
| Metric | Definition | Baseline/Threshold | Type | Source |
|---|---|---|---|---|
| Duration Band Hit Rate | Final duration within target band / target | Tolerance ≤5% | Guardrail | edit:verify |
| Hard Item First-Pass Rate | Timelines passing first verification / total submissions | ≥95% | Quality | Verification report |
| Footage Usability Rate | Reference footage with authorization and availability passed / all references | 100% | Guardrail | Authorization list |
| Transition Rationality Rate | Non-hard-cut transitions with motivation / total non-hard-cut | 100% | Quality | Script sampling |
| Rollback Rate | Timelines rearranged due to structural issues / total submissions | ≤10% | Cost | Rework log |
Failure Modes (Symptom → Detector → Action)
| Symptom | Detector | Action |
|---|---|---|
| Executor reports overlapping timeline | Same-source clip interval insufficient | Adjust in/out or replace with different footage; do not silently change duration. |
| Final product has stutters/black frames | Clip duration too short or transition parameters invalid | Minimum clip 0.4s; transition ≤2s; black only for time jumps. |
| Sound doesn't connect | J-cut/L-cut or ducking missing | Add audio overlap at scene transitions; add duck where original audio and BGM conflict. |
| Result feels like a slideshow | Every clip uses full duration, no rhythm variation | Force alternating short/long clips per tempoMap; add 0.6–1.2s short transitions. |
| Audience can't watch | No hook in first 3 seconds | Place highest-rated highlight in 0–3s; optionally frontload the result. |
7. Self-Checklist (Manual Review)
- Timeline is directly consumable by the executor (complete fields, valid enums, correct timecode format)
- No same-source overlaps, interval met; main track continuous
- Each non-hard-cut transition has a motivation description
- Sound design covers the entire film (including silence and beats), not just "add a BGM"
- Each clip points back to a valid footage id, and footage usability is marked as available
- Script and timeline are consistent (duration, order, segment count)