Editing video with FableCut
FableCut is a browser video editor whose entire timeline is one JSON document.
You edit video by patching that document; the open editor UI hot-reloads within
~150 ms, so the user watches the timeline rebuild as you work.
Start here, every time
fablecut_status — starts the editor server if it isn't running and
returns the URL, the current project summary, and what's in media/. Call it
before anything else. If the user doesn't have a browser tab open, tell them
the URL so they can watch.
fablecut_docs — the full manual: project.json schema, every prop,
transitions, text animations, and a recipe book. Request a single section
({section:"props"}, {section:"Recipes"}) rather than the whole document.
Skip it entirely if the schema is already in context.
Making edits
Prefer fablecut_patch_project. It sends only what changes, re-reads the
latest document internally, and is merge-safe — it will not clobber a tweak the
user just made in the UI. Batch related changes into one call; ops apply in
order and bump the revision once.
fablecut_patch_project {ops:[
{op:"updateClip", id:"c_v2", set:{props:{filterPreset:"teal-orange"}}}
]}
Use fablecut_get_project {compact:true} to plan — it's roughly 10× smaller
than the full JSON. Fetch the full document only when you need exact keyframes.
fablecut_set_project replaces the whole document and is conflict-checked: if
the user edited in the UI since your last read, it refuses rather than
overwriting. On conflict, re-read, re-apply your change, and call it again.
Getting footage in
fablecut_import_media copies a local file into the project and registers it.
Media entries may omit duration — the browser probes it and writes it back, so
re-read after a moment instead of shelling out to ffprobe.
Things that trip people up
- A cut is just two clips: the first with
duration: t, the second with
start: +t, in: +t×speed, duration: rest.
- Video and audio clips must satisfy
in + duration×speed ≤ media.duration.
- Crossfades are same-track overlap plus
transitionIn: {type:"fade"} on the
later clip — not a separate object.
- Vary the font per title. Reusing one typeface across a whole edit is the
single clearest tell of a machine-made cut;
fablecut_docs {section:"Text"}
lists the built-in title styles.
- Export is user-driven. The compositor lives in the browser, so you cannot
render headlessly. Ask the user to click Export, or run ffmpeg directly
against the source files if they just need a file.
1---2name: edit-video3description: Edit video with FableCut — assemble a cut, add titles and captions, grade, add transitions, keyframe animation, speed ramps, and export. Use whenever the user wants to cut, trim, caption, subtitle, grade, or otherwise edit a video, or asks to open/start the video editor.4---56# Editing video with FableCut78FableCut is a browser video editor whose entire timeline is one JSON document.9You edit video by patching that document; the open editor UI hot-reloads within10~150 ms, so the user watches the timeline rebuild as you work.1112## Start here, every time13141. **`fablecut_status`** — starts the editor server if it isn't running and15 returns the URL, the current project summary, and what's in `media/`. Call it16 before anything else. If the user doesn't have a browser tab open, tell them17 the URL so they can watch.182. **`fablecut_docs`** — the full manual: `project.json` schema, every prop,19 transitions, text animations, and a recipe book. Request a single section20 (`{section:"props"}`, `{section:"Recipes"}`) rather than the whole document.21 Skip it entirely if the schema is already in context.2223## Making edits2425**Prefer `fablecut_patch_project`.** It sends only what changes, re-reads the26latest document internally, and is merge-safe — it will not clobber a tweak the27user just made in the UI. Batch related changes into one call; ops apply in28order and bump the revision once.2930```31fablecut_patch_project {ops:[32 {op:"updateClip", id:"c_v2", set:{props:{filterPreset:"teal-orange"}}}33]}34```3536Use `fablecut_get_project {compact:true}` to plan — it's roughly 10× smaller37than the full JSON. Fetch the full document only when you need exact keyframes.3839`fablecut_set_project` replaces the whole document and is conflict-checked: if40the user edited in the UI since your last read, it refuses rather than41overwriting. On conflict, re-read, re-apply your change, and call it again.4243## Getting footage in4445`fablecut_import_media` copies a local file into the project and registers it.46Media entries may omit `duration` — the browser probes it and writes it back, so47re-read after a moment instead of shelling out to ffprobe.4849## Things that trip people up5051- A cut is just two clips: the first with `duration: t`, the second with52 `start: +t, in: +t×speed, duration: rest`.53- Video and audio clips must satisfy `in + duration×speed ≤ media.duration`.54- Crossfades are same-track overlap plus `transitionIn: {type:"fade"}` on the55 later clip — not a separate object.56- Vary the font per title. Reusing one typeface across a whole edit is the57 single clearest tell of a machine-made cut; `fablecut_docs {section:"Text"}`58 lists the built-in title styles.59- **Export is user-driven.** The compositor lives in the browser, so you cannot60 render headlessly. Ask the user to click Export, or run ffmpeg directly61 against the source files if they just need a file.