fablecut 1.15.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLAUDE.md CHANGED
@@ -21,7 +21,7 @@ Every Claude Code session then has these tools:
21
21
  - `fablecut_get_project` / `fablecut_set_project` — read / replace the timeline JSON.
22
22
  `fablecut_get_project {compact:true}` returns a one-line-per-clip summary instead.
23
23
  - `fablecut_patch_project` — apply targeted ops (add/update/remove clip/media,
24
- set project fields) without round-tripping the document. **Prefer this for edits.**
24
+ set project fields, add and open sequences) without round-tripping the document. **Prefer this for edits.**
25
25
  - `fablecut_import_media` — copy a local file (or download an `https://` URL)
26
26
  into `./media/` and register it. The stored `src` is always `/media/…`.
27
27
  - `fablecut_analyze_reference` — turn a reference video into an edit blueprint
@@ -44,6 +44,13 @@ Every Claude Code session then has these tools:
44
44
  See "Look at the footage" below.
45
45
  - `fablecut_denoise` — reduce background noise on audio clips (renders a cleaned copy of the
46
46
  file and switches the clip's stems to it). See "Audio mix" below.
47
+ - `fablecut_silence` — find the pauses in speech and, with `cut:true`, cut them out
48
+ (extract on the targeted tracks, stems in step). See "Audio mix" below.
49
+ - `fablecut_transcribe` — turn speech into words with times (Whisper, in the browser),
50
+ read them on the timeline, find a phrase and cut it out. See "Transcripts and
51
+ text-based editing" below.
52
+ - `fablecut_captions` — caption clips from the transcript, timed word by word (subtitle,
53
+ karaoke, highlight, word pop); export or import SRT / WebVTT. See "Captions" below.
47
54
  - `fablecut_export` — render the timeline to a file in `exports/` with the editor's own
48
55
  Fast export (open tab, or headless Chrome / Edge). See "Export" below.
49
56
  - `fablecut_scopes` — measure the graded picture at a moment (levels, clipping, colour
@@ -54,6 +61,11 @@ Every Claude Code session then has these tools:
54
61
  - `fablecut_proxy` — make, check or delete proxies: light copies of heavy footage
55
62
  the editor plays while editing (export always reads the originals). See
56
63
  "Media management" below.
64
+ - `fablecut_projects` — list, open, create (from a canvas or a saved template),
65
+ duplicate, rename, annotate, archive and delete projects. `./project.json` is
66
+ always the open one. See "Projects" below.
67
+ - `fablecut_versions` — a project's saved versions: save one before big edits, compare
68
+ a version with now, restore one (never destructive), mark the final cut. See "Versions" below.
57
69
 
58
70
  ### Token-efficient editing (important for agents)
59
71
 
@@ -138,9 +150,9 @@ then `/plugin install fablecut@fablecut`) does the registration for you.
138
150
 
139
151
  ### Where the files are
140
152
 
141
- `project.json`, `media/`, `exports/`, `analysis/` and `library/` normally sit in
153
+ `project.json`, `projects/`, `media/`, `exports/`, `analysis/` and `library/` normally sit in
142
154
  the repo next to `server.js`; installed from npm (`npx fablecut`) they sit in
143
- `~/FableCut`. Set **`FABLECUT_DATA_DIR`** to move all five
155
+ `~/FableCut`. Set **`FABLECUT_DATA_DIR`** to move all six
144
156
  somewhere else; the code and the static app files stay in the install directory
145
157
  either way. The plugin sets this so a plugin update can replace the install
146
158
  directory without touching anyone's timeline or footage. **Don't assume
@@ -292,11 +304,13 @@ Examples in `library/svg/`: `sparkles.svg` (loop), `lower-third.svg`,
292
304
  { "id": "A4", "kind": "audio" }
293
305
  ],
294
306
  "buses": [ { "id": "B1", "name": "Dialogue", "gain": -2, "fx": [ { "type": "compressor" } ] } ],
307
+ // ^ optional — submix buses B1…B8: name, gain (dB), pan, mute, fx; tracks route in with `out`
295
308
  "collections": [ { "id": "col_sel", "name": "Selects", "media": [ "m_abc" ] } ],
296
309
  // ^ optional — Project-bin collections: media grouped across folders; see "Media management"
297
310
  "comps": [ { "id": "lt", "name": "Lower third", "width": 1280, "height": 720, "duration": 5, "clips": [ /* … */ ] } ],
298
311
  // ^ optional — compositions (nested sequences), placed with kind:"comp" clips; see "Compositions (nested sequences)"
299
- // ^ optional — submix buses B1…B8: name, gain (dB), pan, mute, fx; tracks route in with `out`
312
+ "sequence": "main", "sequences": [ { "id": "main", "name": "Main" }, { "id": "seq_v9", "name": "Reel 9:16", "width": 1080, "height": 1920, "clips": [ /* … */ ] } ],
313
+ // ^ optional — several timelines in one project; the open one is this top level; see "Sequences"
300
314
  "media": [
301
315
  { "id": "m_abc", "name": "intro.mp4", "kind": "video", // video|audio|image|svg
302
316
  "src": "/media/intro.mp4", // path under ./media or ./library (never a raw https:// URL)
@@ -428,8 +442,11 @@ These are quick looks. For real grading use `props.grade` (see "Color" below).
428
442
  | `glowColor` | "" | glow color ("" = use the text color) |
429
443
  | `strokeWidth` `strokeColor` | 0, "#000" | text outline |
430
444
  | `bgColor` `bgOpacity` | "#000", 0 | rounded pill behind each line |
431
- | `textAnim` | "none" | typewriter · word-pop · word-slide · karaoke · **letter-pop** (per-character entrance; Arabic/Indic auto-fallback to per-word clusters so joined letters shape correctly) · **wave** (looping per-character ride; same shaping fallback) · **bounce** (looping per-word hop) · **shake** (looping jitter) · **clip-reveal** (wipe-mask sweep, per line) · **zoom-in** (scale + opacity settle) · **font-cut** (rhythmically swaps typeface, then settles — see `fontCutSet`) · **rise-mask** (line rises from behind its baseline, lower-third reveal) |
445
+ | `textAnim` | "none" | typewriter · word-pop · word-slide · karaoke · **highlight** (every word shown; the one being said in `highlightColor`) · **letter-pop** (per-character entrance; Arabic/Indic auto-fallback to per-word clusters so joined letters shape correctly) · **wave** (looping per-character ride; same shaping fallback) · **bounce** (looping per-word hop) · **shake** (looping jitter) · **clip-reveal** (wipe-mask sweep, per line) · **zoom-in** (scale + opacity settle) · **font-cut** (rhythmically swaps typeface, then settles — see `fontCutSet`) · **rise-mask** (line rises from behind its baseline, lower-third reveal) |
432
446
  | `wordRate` | 0.15 | seconds per word (typewriter: /4, letter-pop: /3 per character); also staggers `clip-reveal`/`zoom-in`/`rise-mask` per line |
447
+ | `wordTimes` | — | `[[start, end], …]`, one pair per word (seconds from the clip's start): word-pop, word-slide, karaoke and highlight follow these instead of `wordRate` — a caption timed to speech. If the text is edited to another number of words they are spread over the clip. See "Captions" |
448
+ | `highlightColor` | "#ffd166" | the colour of the word being said in `highlight` |
449
+ | `caption` · `captionStyle` | — | set on caption clips (see "Captions"): how they are found, replaced and exported |
433
450
  | `textPath` | — | set the title along a path: one shape item (`path`, `line`, `ellipse`, `rect`, `polygon`, `star`) whose outline is the baseline; more lines follow on parallel curves below it. See "Motion paths, motion blur and text on a path" |
434
451
  | `pathOffset` · `pathAlign` | 0 · "start" | where along the path the text sits (% of its length, keyframable, wraps on closed paths) · which end of the text sits there: start · center · end |
435
452
  | `fontCutSet` | (curated) | array of font family names cycled by `font-cut`, e.g. `["Anton","Bebas Neue","Archivo Black","Oswald"]`; each is auto-loaded |
@@ -593,6 +610,30 @@ edits the key under the playhead. Agents:
593
610
  on the music: ramp down `attack` s before speech, hold, back up over
594
611
  `release` s. It replaces earlier ducking; `amount:0` clears it. Same as the
595
612
  inspector's **Auto-duck** section or the clip menu's *Auto-duck under other tracks*.
613
+ - **Silence** — `fablecut_silence {clipIds, threshold?:-40, minSilence?:0.5, padding?:0.15, cut?, tracks?, force?}`
614
+ listens to the speech clips (a video brings its linked stems; each measured after
615
+ its channel routing, gain and volume) and finds every stretch where none of them
616
+ is above `threshold` dBFS for at least `minSilence` seconds. It keeps `padding`
617
+ seconds of quiet after the phrase before and before the phrase after, so words
618
+ aren't clipped; a clip's own start and end are cut to the first and last word.
619
+ Cuts land on whole frames, and the gaps *between* clips are left alone. Without
620
+ `cut` it only reports the spans (timeline seconds). With `cut:true` each one is
621
+ removed with an `extract` on the targeted tracks (`tracks` picks others), last
622
+ first, in one revision: later material moves up, linked stems stay in step, and
623
+ locked tracks and clips stay where they are — **lock the music bed first** if it
624
+ should keep running under the tightened edit. `force:true` cuts through locked
625
+ material too, so pass it only when the user asked. Only time that was actually
626
+ heard is cut: a clip with no audio stream (or disabled) is left alone, and so is
627
+ one with a speed ramp (`keyframes.speed`) — its sound doesn't sit on the timeline
628
+ at one speed. A version
629
+ of the project as it was is kept before the cut; if that fails the reply says
630
+ so in a warning, and then there is no version to go back to. Raise `threshold`
631
+ toward −30 in a noisy room; lower `minSilence` for a tighter, jump-cut feel. In
632
+ the editor: the Inspector's **Silence** section on an audio or video clip (or
633
+ right-click → **Find silences**) — **Find** marks the silences on the timeline
634
+ as amber bands, **Cut N** extracts them (one undo step), **Clear** removes the
635
+ marks. The marks drop when the timeline, a clip's file, speed or level, or the
636
+ frame rate changes.
596
637
  - In the editor, each audio clip shows its **volume line** (yellow; dashed =
597
638
  after ducking): drag it to change the level, Ctrl/Cmd-click to add a keyframe,
598
639
  drag a point to move it, Alt-click or double-click to remove one. The corner
@@ -602,6 +643,132 @@ edits the key under the playhead. Agents:
602
643
  balance whole lanes (dialogue against the music bed), and a **bus** when
603
644
  several lanes need the same processing or one fader.
604
645
 
646
+ ### Transcripts and text-based editing
647
+
648
+ FableCut turns the speech in a clip into **words with times**, so an edit can be
649
+ read, searched and cut like text. Transcription runs **in the browser**: Whisper
650
+ (OpenAI's speech model, through transformers.js) in a background worker of the
651
+ editor tab. The library and the model are fetched from a CDN the first time and
652
+ kept by the browser after that; the audio never leaves the machine.
653
+
654
+ | model | download | |
655
+ |---|---|---|
656
+ | `base` (default) | 77 MB | quick: about 15 s per minute of speech on a fast desktop |
657
+ | `small` | 250 MB | often more accurate (accents, noisy rooms, numbers); about twice as slow |
658
+
659
+ Whisper detects the language by itself; give it one (`en`, `es`, `hi`, `ja`, … any
660
+ Whisper code) when a clip is short or mixes languages. Long files are split at
661
+ their quietest moments into pieces of at most 28 s, and stretches of silence are
662
+ skipped (Whisper invents words in silence).
663
+
664
+ **One transcript per file**, kept by the server in `analysis/transcripts/`:
665
+ `{v, src, model, language, duration, created, words:[[text, start, end], …]}`,
666
+ times in seconds of the file. Like a proxy it belongs to the file's size and
667
+ modification time, so a replaced or re-rendered file has none until it is
668
+ transcribed again. It is not stored in `project.json`, so it never bloats the
669
+ timeline, and every clip and sequence that uses the file reads the same one.
670
+
671
+ **On the timeline** a clip shows the words its window of the file holds, placed
672
+ through its `in` point and `speed` (a word counts when its middle is inside the
673
+ clip). A clip with a speed ramp is left out, and so are disabled clips and pictures
674
+ whose sound is off.
675
+
676
+ **Cutting words** extracts on the targeted tracks, from just before the first word
677
+ to just before the word after the last one: the pause after the cut goes too, the
678
+ pause before it stays. Cuts land on whole frames, never in a neighbouring word or
679
+ past the clip. Several cuts go last first, as one undo step (one revision for an
680
+ agent): later material moves up, linked stems stay in step, and locked clips stay
681
+ put — **lock the music bed first** if it should keep running under the tightened
682
+ edit. Find matches whole words and ignores case, accents, punctuation and spacing:
683
+ "ai powered" finds "A.I.-powered", and "cat" doesn't find "category".
684
+
685
+ In the editor, the **Transcript** tab beside the Inspector:
686
+
687
+ - **Transcribe** works on the selected clips' files, else on every file on the
688
+ timeline that has no transcript yet. The model and the language are beside it.
689
+ Progress shows below (the first time, the model download), with **Cancel**.
690
+ - The timeline's words, in paragraphs with timecodes. Click a word to go there;
691
+ the word under the playhead is underlined and followed while playing. ⇧-click or
692
+ drag to select a run of words, then press **Delete** (or **Cut**) to extract it.
693
+ - **Find words** marks every match, Enter steps through them, and **Cut N**
694
+ extracts them all. **Copy** copies the text with its timecodes.
695
+
696
+ **Agents** use `fablecut_transcribe`. It transcribes in an open editor tab, else in
697
+ headless Chrome / Edge, whose profile is kept in `analysis/browser-profile/` so the
698
+ model downloads once:
699
+
700
+ - `{}` transcribes every clip with sound that has no transcript yet, then returns
701
+ the timeline's words as timed lines: `[0:12.08] Open the demo, nothing to install.`
702
+ `clipIds` limits it to some clips; `from` / `to` limit the time (the reply stops
703
+ at 300 lines); `mediaIds` reads whole files in file seconds instead.
704
+ - `model:"small"`, `language:"es"`, and `again:true` (transcribe again, with another
705
+ model or language).
706
+ - `find:"phrase"` (or a list) reports each place it is said, with its span, the words
707
+ around it and how much cutting them would remove; `cut:true` extracts them
708
+ (`tracks` and `force` as for `fablecut_silence`). A version of the project is kept
709
+ before the cut.
710
+
711
+ Whisper writes clean text: it often leaves out fillers ("um", "uh") and false
712
+ starts, so find those by ear (`fablecut_silence` for the pauses), not by text. Word
713
+ times are good to about a tenth of a second; listen to a cut that matters, or
714
+ check it with `fablecut_frame`.
715
+
716
+ ### Captions
717
+
718
+ Captions are made from a transcript (see "Transcripts and text-based editing"):
719
+ the timeline's words are grouped into captions, and each caption is an ordinary
720
+ **text clip** with `wordTimes` (each word's start and end), so its animation follows
721
+ the speech word by word, and `caption: true`, so captions can be found, replaced
722
+ and exported as a group. Because they are text clips they render the same way in
723
+ preview and export (burned into the picture), and the Inspector restyles them like
724
+ any title.
725
+
726
+ | style | look |
727
+ |---|---|
728
+ | `subtitle` (default) | plain text on a dark bar, low on the frame, up to two lines |
729
+ | `karaoke` | bold outlined text; each word lights up as it is said |
730
+ | `highlight` | big uppercase outlined words, the one being said in a colour (`highlightColor`) — the short-video look; up to five words |
731
+ | `pop` | one to three big words at a time, each popping in as it is said |
732
+
733
+ A new caption starts at a pause of 0.6 s or more, after a sentence, after a comma
734
+ once it has three words, or when it would run too long (lines, words or seconds).
735
+ Lines are as long as fit the canvas at the style's size: sizes follow the
736
+ canvas's shorter side, so a 9:16 reel gets narrower captions than a 16:9 video.
737
+ Each caption stays about a quarter of a second after its last word, never into
738
+ the next one, and starts and ends on whole frames.
739
+
740
+ They go on the video lane captions are already on; otherwise on the top video
741
+ lane when nothing is there while they run, else on a new lane above it. Making
742
+ captions again **replaces** the ones there. Make them **after the cutting is done**:
743
+ a cut through a caption shortens it but doesn't re-time its words, so make them
744
+ again after you change the edit. The editor says so for a moment whenever an edit shortens a caption.
745
+
746
+ In the editor, the **Captions** row of the **Transcript** tab: pick a style, then
747
+ **Add captions** (one undo step). **SRT** and **VTT** download the timeline's
748
+ captions as a subtitle file; **Import…** places the captions of an SRT or WebVTT
749
+ file instead, re-broken to the style's line length, with their words spread over
750
+ each caption. Select a caption to restyle it in the Inspector: the **Highlight**
751
+ colour sits under **Animation**, and a note says its words follow the speech.
752
+
753
+ **Agents** use `fablecut_captions`:
754
+
755
+ - `{}` or `{style:"highlight"}` makes captions from every clip with sound
756
+ (transcribing what has no transcript yet, as `fablecut_transcribe` does), and
757
+ answers with where they went and the first few. `clipIds`, `from` / `to` limit
758
+ it; `lines`, `words` and `size` (a scale on the style's size) adjust it;
759
+ `track` picks the lane; `replace:false` keeps the captions already there.
760
+ - `{export:"srt"}` or `{export:"vtt"}` writes the captions that show (not disabled,
761
+ not on a disabled track) to `exports/<project name>.srt` or `.vtt`, adding a number
762
+ when that name is taken (`<project name> 2.srt`), and returns the path: use that one.
763
+ - `{import:"<path to .srt or .vtt>"}` places a file's captions (the file's text
764
+ works too).
765
+ - `{remove:true}` deletes every caption clip. Locked captions are left alone and
766
+ refuse the call unless `force:true`.
767
+ - Check one with `fablecut_frame {time}` while a word is being said. Restyle them
768
+ all with `updateClip` (e.g. `props:{highlightColor:"#22d3ee", y:500}`) on each
769
+ caption id from the compact view, which lists a caption as
770
+ `[5 words timed to speech]` instead of its times.
771
+
605
772
  ### Color
606
773
 
607
774
  A clip's color grade lives in `props.grade` on any video, image, svg or
@@ -1509,6 +1676,209 @@ proxy only changes how smoothly the preview runs, never the result.
1509
1676
  be an existing file under `/media/` or `/library/` of the same kind (an
1510
1677
  audio entry may use a video container).
1511
1678
 
1679
+ ### Projects
1680
+
1681
+ One FableCut keeps any number of projects. **`./project.json` is always the
1682
+ open project**: the editor, every MCP tool, the REST API and scripts read and
1683
+ edit that file as before. The others wait in `projects/`, and opening one
1684
+ swaps it in:
1685
+
1686
+ | path | holds |
1687
+ |---|---|
1688
+ | `projects/index.json` | `{active}` — the open project's id |
1689
+ | `projects/<id>/meta.json` | `{id, created, opened, archived, notes, tags, template?}` |
1690
+ | `projects/<id>/project.json` | the document (while that project is open, `./project.json` is the live copy) |
1691
+ | `projects/<id>/thumb.jpg` | the editor's last picture of it |
1692
+ | `library/project-templates/<id>.json` | a saved project template `{name, created, project}` |
1693
+
1694
+ `media/`, `exports/`, `analysis/` and `library/` are shared by every project,
1695
+ so a duplicate or a project made from a template copies no footage. The first
1696
+ time projects are used, the existing `./project.json` becomes the first
1697
+ project, unchanged. Ids look like `p_3f9a01c2de`.
1698
+
1699
+ **Opening a project** saves the open one into its folder, then copies the
1700
+ chosen one to `./project.json` with a `revision` above both. A save based on
1701
+ the project that was open before (an editor tab, an agent's
1702
+ `fablecut_set_project`, a `baseRevision` patch) is therefore refused as a
1703
+ CONFLICT instead of landing in the wrong project. Editor tabs reload, clear
1704
+ their undo history and close an open composition. `GET /api/project` names the
1705
+ open project in the `X-FableCut-Project` header, and the editor sends it back on
1706
+ every save, so an edit made for one project can never be written into another.
1707
+
1708
+ In the editor: **Projects** in the top bar (**Ctrl/Cmd+O**, or a click on the
1709
+ project name) opens the dashboard: cards with a picture, size, frame rate and length; search
1710
+ by name, notes or `#tag`; sort by last opened, last modified, created or name.
1711
+ Pick one to rename it, write notes, tag it, **Open** (or double-click / **Enter** on its card), **Duplicate**, **Save as
1712
+ template** or **Archive** it. **Archived** lists archived projects, where
1713
+ **Unarchive** brings one back and **Delete…** (click twice) removes it; only
1714
+ archived projects can be deleted, and the open one can be neither archived
1715
+ nor deleted. **+ New project** starts one from a canvas (Landscape 16:9 1080p,
1716
+ Vertical 9:16, Square 1:1, Portrait 4:5, 4K UHD, Landscape 720p) or a saved
1717
+ template, with its own frame rate. **Import…** adds a project file from
1718
+ elsewhere (an old backup, another machine); its media must be in `media/`,
1719
+ and Relink finds files that moved.
1720
+
1721
+ **Agents** use `fablecut_projects` (or `GET /api/projects`, `POST /api/projects`):
1722
+
1723
+ - `{}` or `{action:"list", archived?:"only"|"all"}` lists them: id, name, size,
1724
+ length, clips, tags, notes, and which is `(OPEN)`.
1725
+ - `{action:"open", id}` switches the editor to that project; re-read it with
1726
+ `fablecut_get_project {compact:true}` before editing.
1727
+ - `{action:"new", name, template?, fps?, width?, height?, notes?, tags?, open?}` —
1728
+ `template` is `landscape-1080` (default), `vertical-1080`, `square-1080`,
1729
+ `portrait-1350`, `uhd-4k`, `landscape-720` or a saved template's id; it opens
1730
+ unless `open:false`.
1731
+ - `{action:"duplicate", id, name?, open?}` · `{action:"update", id, name?, notes?, tags?}` ·
1732
+ `{action:"archive" | "unarchive" | "delete", id}`.
1733
+ - `fablecut_status` also counts the open project's versions; see "Versions" for them.
1734
+ - `{action:"templates"}` · `{action:"save_template", id, name}` (the project's
1735
+ canvas, tracks, clips and media references) · `{action:"delete_template", template}`.
1736
+ - Opening, archiving or deleting changes what the user sees: do it only when
1737
+ they asked. `fablecut_status` says how many projects there are.
1738
+
1739
+ Recipes: **one edit, three versions** — `duplicate` the project per client
1740
+ cut, put the brief in `notes`; **house canvas** — build an empty project with
1741
+ your tracks, intro and outro, `save_template`, then `new` from it for every
1742
+ episode; **park finished work** — `archive` delivered projects to keep the
1743
+ list short without deleting anything.
1744
+
1745
+ ### Versions
1746
+
1747
+ Every edit is saved as it happens, and undo covers the session. **Versions** are
1748
+ what you come back to later: full copies of a project, kept beside it, that are
1749
+ never overwritten. Restoring one is not destructive either — what is there is
1750
+ saved as a version first, so a restore can be undone by restoring that.
1751
+
1752
+ | path | holds |
1753
+ |---|---|
1754
+ | `projects/<id>/history/v0007.json` | the project as it was |
1755
+ | `projects/<id>/history/v0007.meta.json` | `{v, name, note, kind, created, revision, clips, duration, final}` |
1756
+
1757
+ A version's `kind` says where it came from:
1758
+
1759
+ | kind | made |
1760
+ |---|---|
1761
+ | `manual` | by you (**Save version**, **Ctrl/Cmd+S**) or an agent (`fablecut_versions {action:"save"}`) |
1762
+ | `auto` | every 10 minutes while the open project changes, whoever changes it (`FABLECUT_AUTO_VERSION_MIN` sets the minutes); the newest 30 are kept |
1763
+ | `agent` | before an agent's first edit of a session (again after 10 quiet minutes), and before every `fablecut_set_project` rewrite |
1764
+ | `restore` | what was there just before a restore |
1765
+
1766
+ One version per project can be marked **final** (the cut that went out); a final
1767
+ version can't be deleted until it is unmarked. Manual, agent and restore
1768
+ versions are never pruned.
1769
+
1770
+ **Compare** tells what changed between a version and now (or two versions):
1771
+ clips added, removed and changed (timing, which props, keyframes, effects,
1772
+ transitions, source, track), media added and removed, the length, and project
1773
+ settings (name, canvas, frame rate, IN / OUT, tracks, markers, comps, mix,
1774
+ delivery, …).
1775
+
1776
+ **Backup and recovery.** **Download backup** saves a project with all its
1777
+ versions as one `.fablecut-backup.json` file; **Import…** in the dashboard brings
1778
+ it back, versions included. When `project.json` can't be read as the server
1779
+ starts (another tool crashed mid-write, a bad hand edit), the server keeps the
1780
+ broken file as `project.corrupt-<time>.json` and puts back the newest good copy:
1781
+ the latest version, or the project's last parked copy.
1782
+
1783
+ In the editor: **Ctrl/Cmd+S** saves a version of the open project. In the
1784
+ Projects dashboard, a project's **Versions…** lists its versions, newest first,
1785
+ with **Save version** (name and note), and per version **Compare with now**,
1786
+ **Restore…** (click twice), **Mark final**, **Rename**, **Download** and
1787
+ **Delete…** (click twice). Esc goes back to the projects.
1788
+
1789
+ **Agents** use `fablecut_versions` (or `GET` / `POST /api/versions`):
1790
+
1791
+ - `{}` lists the open project's versions (`project` picks another one).
1792
+ - `{action:"save", name?, note?, final?}` — **save one before a big or risky
1793
+ change** (a restructure, a remake, a new grade on every shot) and when the user
1794
+ is happy with a cut, so there is a named point to go back to.
1795
+ - `{action:"diff", version, to?}` — what changed since that version (to now, or
1796
+ to version `to`). Use it to tell the user what an edit session changed.
1797
+ - `{action:"restore", version}` — only when the user asked; then re-read the
1798
+ project. `{action:"update", version, name?, note?, final?}` ·
1799
+ `{action:"delete", version}`.
1800
+
1801
+ Recipes: **try a bold alternative** — save a version, make the change, compare,
1802
+ and restore if the user prefers the old one; **client rounds** — save "Round 1",
1803
+ "Round 2", … with the feedback in the note, mark the approved one final;
1804
+ **what did the agent do?** — `diff` against the "Before agent edits" version.
1805
+
1806
+ ### Sequences
1807
+
1808
+ A project can hold several **sequences**: timelines of their own that share
1809
+ the project's media, folders, collections and compositions. Typical uses: a
1810
+ 16:9 cut and a 9:16 cut of the same edit, a 30 s and a 15 s version, a client
1811
+ cut beside an alternative, or a stringout of selects next to the edit. A
1812
+ project with one sequence (every project, until you add one) is exactly the
1813
+ document described above.
1814
+
1815
+ **The open sequence is the document's top level.** `clips`, `tracks`,
1816
+ `markers`, `inPoint` / `outPoint`, the canvas (`width`, `height`, `fps`,
1817
+ `background`, `exportFrame`), the mix (`master`, `buses`), the track switches
1818
+ and the delivery settings (`delivery`, `outputs`, `encodeProfile`) are the open
1819
+ sequence's. Every tool, op, export and the compact view work on them, as
1820
+ always. The others wait in `sequences`, each with its own copy of those keys:
1821
+
1822
+ ```jsonc
1823
+ "sequence": "main", // the open one
1824
+ "sequences": [
1825
+ { "id": "main", "name": "Main" }, // the open one: its timeline is the top level
1826
+ { "id": "seq_v9", "name": "Reel 9:16", "width": 1080, "height": 1920, "fps": 30,
1827
+ "clips": [ /* … */ ], "tracks": [ /* … */ ], "markers": [ /* … */ ], "delivery": { "preset": "instagram-reels" } }
1828
+ ]
1829
+ ```
1830
+
1831
+ Opening another sequence parks the top-level keys in the open one's entry and
1832
+ brings the other's up, with a new `revision` — like any edit. A clip in a
1833
+ sequence that isn't open still counts: its media shows "used" in the bin,
1834
+ can't be removed while it is there (`removeMedia` and **Remove from project**
1835
+ refuse and name the sequence), and **Replace file…** trims it too; a comp it
1836
+ places can't be removed either. A project with one sequence named Main has
1837
+ neither key.
1838
+
1839
+ In the editor: the **sequence menu** at the left of the timeline toolbar (it
1840
+ shows the open sequence's name, and how many there are) lists them — click one
1841
+ to open it — and has **New sequence…** (a name, a canvas — the same as the open
1842
+ one, or 16:9, 9:16, 4:5, 1:1 — and, optionally, a copy of the open sequence's
1843
+ timeline to start from), **Duplicate**, **Rename…** and **Delete…** (click
1844
+ twice; the project is first kept as a version, so a deleted sequence can be
1845
+ restored from **Projects → Versions**). For the session each sequence keeps its
1846
+ own undo history, playhead and selection. The Export dialog, the Mixer, IN /
1847
+ OUT and the canvas settings all belong to the open sequence. **Find timeline
1848
+ instances** lists placements in other sequences too; clicking one opens its
1849
+ sequence.
1850
+
1851
+ **Agents** (`fablecut_patch_project`):
1852
+
1853
+ - `{op:"addSequence", name?, id?, from?, width?, height?, fps?, open?:true}` —
1854
+ `from:"empty"` (default; the open sequence's canvas and frame rate, no clips),
1855
+ `"open"` (a copy of the open sequence's timeline) or a sequence id (a copy of
1856
+ that one). `width` / `height` / `fps` change the copy's canvas: the clips keep
1857
+ their positions relative to the centre, and an `exportFrame` is dropped.
1858
+ - `{op:"inSequence", sequence, ops:[…]}` runs ops on a sequence **without
1859
+ opening it**: clip and timeline ops, `setProject` (its canvas, markers, IN /
1860
+ OUT, delivery), `setTrack`, `setBus`, `setFx` on its tracks, and
1861
+ `updateSequence` (name, index) — not `addSequence`, `openSequence`,
1862
+ `removeSequence` or another `inSequence`. The user's editor stays where it is.
1863
+ - `{op:"openSequence", id}` changes what the user's editor shows, and what
1864
+ `fablecut_export`, `fablecut_frame {time}` and `fablecut_scopes` render: do it
1865
+ when the user asked, or to export that sequence.
1866
+ - `{op:"updateSequence", id, set:{name?, index?}}` renames or reorders one;
1867
+ `{op:"removeSequence", id}` deletes one (only when asked; the last one stays,
1868
+ deleting the open one opens its neighbour, and one holding locked clips or
1869
+ tracks needs `force:true`).
1870
+ - The compact view and `fablecut_status` list every sequence (id, name,
1871
+ canvas, clips, length, which is open). A version's **Compare** reports each
1872
+ sequence's changes on its own, sequences added and removed, and which one
1873
+ was open.
1874
+
1875
+ Recipes: **vertical cut of a finished edit** — `addSequence {name:"Reel 9:16",
1876
+ from:"open", width:1080, height:1920}`, then `inSequence` ops to re-position
1877
+ or re-scale the shots and `setProject {delivery:"instagram-reels"}` in it;
1878
+ **cut-downs** — duplicate the edit as "30 s" and "15 s" and tighten each with
1879
+ the trim ops inside `inSequence`; **selects reel** — an empty sequence the
1880
+ user drops favourite takes on, cut into the edit from the Source monitor.
1881
+
1512
1882
  ### Semantics
1513
1883
 
1514
1884
  - Rendering order: V1 is drawn first, then V2, V3, … on top. SVG/image/text clips
@@ -1695,7 +2065,9 @@ obvious cuts were missed, raise it if motion is being misread as cuts.
1695
2065
  - `PUT /api/project` — replace project JSON (body = full document).
1696
2066
  **Conflict-safe**: if the body's `revision` ≤ the revision currently on disk,
1697
2067
  the server rejects with **409** and returns `{"error":"…","revision":<current>}`.
1698
- Append `?force=1` to overwrite unconditionally. Writes are atomic (tmp file +
2068
+ Append `?force=1` to overwrite unconditionally. A request with an `X-FableCut-Project`
2069
+ header (the editor sends the id of the project it loaded) is also refused with 409 when
2070
+ another project is open (see "Projects"). Writes are atomic (tmp file +
1699
2071
  rename), so a crashed write never corrupts the file.
1700
2072
  - `GET /api/media` — list files in ./media (name, src, size)
1701
2073
  - `GET /api/media-info?src=/media/x.mp4` → `{src, info}` · `POST /api/media-info {srcs:[…], stat?}` →
@@ -1715,6 +2087,22 @@ obvious cuts were missed, raise it if motion is being misread as cuts.
1715
2087
  `{candidates:{id:[{src, name, size, score, why}]}}` — where a missing file might be now:
1716
2088
  files under `media/` and `library/` (subfolders included) of the same kind, ranked by
1717
2089
  name (same name, same name with another extension, similar name) and size, best 5 each.
2090
+ - `GET /api/projects[?archived=only|all]` → `{active, projects:[{id, name, active, archived, notes, tags, created,
2091
+ opened, modified, width, height, fps, duration, clips, media, thumb}], templates:[…]}` ·
2092
+ `POST /api/projects {action, …}` — the actions of `fablecut_projects` (plus `import {project, name?}`).
2093
+ The answer depends on the action: `{id, project}` for open / new / duplicate / update / archive /
2094
+ unarchive / import (plus `from` when the open project changed, `already` when it was open), `{id, deleted}`
2095
+ for delete, `{templates}` for templates, `{template}` for save_template (the saved one) and
2096
+ `{template, deleted}` for delete_template · `GET` / `PUT /api/projects/thumb?id=`
2097
+ — a project's JPEG thumbnail (1 MB max). SSE event `projects` (`{action, id, active}`) after each
2098
+ change. See "Projects".
2099
+ - `GET /api/versions[?project=]` → `{project, versions:[{v, name, note, kind, created, revision, clips, duration,
2100
+ final}]}` (newest first; default the open project) · `POST /api/versions {action, project?, version?, …}` —
2101
+ `save {name?, note?, final?}` → `{project, version}` · `diff {version, to?}` → `{same, lines, added, removed,
2102
+ changed, mediaAdded, mediaRemoved, settings}` · `restore {version}` → `{restored, saved}` · `update {version,
2103
+ name?, note?, final?}` → `{version}` · `delete {version}` → `{deleted}`. `GET /api/versions/file?project=&version=`
2104
+ is that version's document; `GET /api/projects/backup?id=` a project with all its versions (import it with
2105
+ `POST /api/projects {action:"import", project:<the backup>}`). SSE event `versions` (`{project, action}`). See "Versions".
1718
2106
  - `GET /api/library?dir=sfx|elements|svg|fonts|presets|templates` — list library assets
1719
2107
  - `GET /api/presets` · `GET /api/templates` — the saved presets / templates, validated (bad files skipped);
1720
2108
  `POST /api/presets {preset}` · `POST /api/templates {template}` — validate one and save it as
@@ -1734,6 +2122,13 @@ obvious cuts were missed, raise it if motion is being misread as cuts.
1734
2122
  port) in `media.src`: canvas CORS would taint the compositor and Fast /
1735
2123
  WebCodecs export cannot JPEG-encode. Import into `./media` so `src` is
1736
2124
  `/media/…`, or serve the remote with `Access-Control-Allow-Origin`.
2125
+ - `GET /api/transcript?src=/media/x.mp4` → `{transcript}` (`null` when the file has none yet; 404 when the
2126
+ file is missing) · `POST /api/transcript?src=` (a transcript document) → `{src, words}` ·
2127
+ `POST /api/transcript/status {srcs}` → `{status:{src: {words, language, model, duration, created} | false | null}}` ·
2128
+ `POST /api/transcript/delete {src}` → `{deleted}`. SSE event `transcript` (`{src}`) after each save or delete.
2129
+ `POST /api/transcribe/request {transcribe:{srcs, model?, language?, again?}, where?}` queues a transcription
2130
+ on the export-job queue (poll `GET /api/export/job?id=`); the tab saves each transcript, and the job's
2131
+ `result` lists `done`, `skipped` and `failed`. See "Transcripts and text-based editing".
1737
2132
  - `POST /api/denoise` — body `{src:"/media/…", amount:"light"|"medium"|"strong"}`: writes a
1738
2133
  noise-reduced FLAC of the whole file into `./media/` (reused if it exists) and returns
1739
2134
  `{src, name, duration, channels}`. Does not touch `project.json` (see "Audio mix").
@@ -1835,6 +2230,23 @@ so all takes sit at one loudness, then keep the music on its own lane and pull
1835
2230
  that lane down: `{op:"setTrack", id:"A3", set:{gain:-14}}`. Then dip it under the
1836
2231
  voice: `fablecut_auto_duck {clipIds:[<music clip>], under:["A1"], amount:-10}`.
1837
2232
 
2233
+ **Tighten a talking-head take**: lock the music lane (`setProject {lockedTracks:["A3"]}`),
2234
+ then `fablecut_silence {clipIds:[<the take>]}` to see the pauses (it does the
2235
+ listening; `fablecut_frame` only shows the picture, handy to check a cut won't land
2236
+ mid-gesture), and `fablecut_silence {clipIds:[<the take>], cut:true}`. Add
2237
+ `{op:"crossfade", ids:[…]}` on the new audio cuts if a breath clicks.
2238
+
2239
+ **Cut an interview down by text**: lock the music lane, `fablecut_transcribe {clipIds:[<the interview>]}`
2240
+ to read what was said (name the speech clips, or the music bed is transcribed too), decide what stays, then
2241
+ `fablecut_transcribe {clipIds:[<the interview>], find:["the sentence to drop", "and this one"], cut:true}`.
2242
+ Then `fablecut_silence {clipIds:[…], cut:true}` for the pauses that are left.
2243
+
2244
+ **Caption a talking-head reel**: finish the cut first, then
2245
+ `fablecut_captions {style:"highlight", clipIds:[<the talking-head clips>]}` (name the speech
2246
+ clips, or a music bed with vocals gets captioned too), `fablecut_frame {time:<mid-sentence>}` to
2247
+ check the size and placement, and `fablecut_captions {export:"srt"}` for the
2248
+ platform's own subtitle upload.
2249
+
1838
2250
  **Center a mono stem**: linked or standalone audio clip with `props.pan: 0` (inspector **Pan** slider, −1…+1). Stereo video stems default to L `−1` / R `+1`; set A1 to `0` to center that channel in the mix.
1839
2251
 
1840
2252
  **Cinematic grade**: `props.filterPreset: "teal-orange"` (tweak with
@@ -1982,6 +2394,10 @@ Export is the Export button → dialog, or `fablecut_export` from an agent (belo
1982
2394
  ffmpeg, or WebCodecs is unavailable. Plays the timeline once and records it;
1983
2395
  keep the tab focused.
1984
2396
 
2397
+ Fast and WebCodecs export decode MP4 / MOV clips with WebCodecs
2398
+ (`mp4-demux.js` + `VideoDecoder`), frame-exact. Fragmented, rotated or
2399
+ undecodable files and `bgRemove` clips fall back to the `<video>` element.
2400
+
1985
2401
  The exported span is chosen in the Export dialog (**Range**: Entire
1986
2402
  timeline / IN–OUT). IN–OUT is the default when `inPoint` / `outPoint` are
1987
2403
  set; pick Entire timeline to keep those markers for split/trim. Effective
@@ -2169,7 +2585,9 @@ ffmpeg -y -f image2pipe -framerate <fps> -i - [-i audio.wav] <jpeg-color> <args
2169
2585
 
2170
2586
  - **There is no allow-list.** Any codec, filter, container or flag your local ffmpeg
2171
2587
  supports works — ProRes, DNxHD, NVENC/QSV/VideoToolbox, VP9/AV1, 10-bit, HDR tags.
2172
- See the shipped `prores422` and `broadcast1080i50` profiles.
2588
+ See the shipped `prores422`, `broadcast1080i50`, `nvenc-h264`, `nvenc-hevc`,
2589
+ `videotoolbox-h264` and `videotoolbox-hevc` profiles (the NVENC ones need an
2590
+ NVIDIA GPU; VideoToolbox requires macOS / Apple Silicon).
2173
2591
  - **Args are validated by ffmpeg itself**, not by a schema: when an export starts the
2174
2592
  server dry-runs the profile against a 0.1 s synthetic input (`lavfi`). A typo or an
2175
2593
  encoder your build lacks is rejected up front with ffmpeg's own message, instead of
package/README.md CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  </div>
22
22
 
23
- <https://github.com/user-attachments/assets/2430b854-168b-4a9a-af2e-489e5efa7543>
23
+ [![Watch the FableCut Studio demo: an agent cuts a reel live (58 s)](docs/showcase/fablecut-studio-demo-play.jpg)](https://fablecut.space/showcase/fablecut-studio-demo.mp4)
24
24
 
25
25
  FableCut is a Premiere-style non-linear video editor that runs entirely in your
26
26
  browser — and exposes its whole timeline as one JSON document. Edit it by hand,
@@ -32,6 +32,14 @@ Zero npm dependencies. One `node server.js`. That's it.
32
32
 
33
33
  ![FableCut editor](docs/screenshot.png)
34
34
 
35
+ ## Sponsors
36
+
37
+ <a href="https://fluxionai.space/register?source=github&amp;campaign=github-sidrune-fablecut&amp;promo=SDRFABLECUT" target="_blank" rel="noopener noreferrer sponsored">
38
+ <img src="docs/sponsors/sidrune-ai-banner.png" alt="Sidrune AI — one API for GPT, Claude and other leading AI models" width="640">
39
+ </a>
40
+
41
+ **[Sidrune AI](https://fluxionai.space/register?source=github&campaign=github-sidrune-fablecut&promo=SDRFABLECUT)** — One API for GPT, Claude, and other leading AI models. Sign up and get $3 in API credit.
42
+
35
43
  ## Why it's interesting
36
44
 
37
45
  Most "AI video" tools hide the edit behind an API. FableCut flips that: the
@@ -119,8 +127,23 @@ same time.
119
127
  Strong) measures the file's noise floor and renders a cleaned copy with
120
128
  ffmpeg; the clip's audio switches to it and **Off** switches back. Agents
121
129
  use `fablecut_denoise`.
130
+ - **Silence removal** — the inspector's **Silence** section (or right-click →
131
+ **Find silences**) listens to a take and marks every pause on the timeline;
132
+ **Cut** extracts them all in one undo step, keeping a little quiet beside
133
+ each phrase so words aren't clipped. Agents use `fablecut_silence`.
134
+ - **Transcripts and text-based editing** — the **Transcript** tab turns speech
135
+ into words with times, in the browser (Whisper; the model downloads once and
136
+ the audio never leaves your machine). Click a word to go there, select words
137
+ and press Delete to cut them, or find a phrase and cut every time it is said.
138
+ Agents use `fablecut_transcribe` to read an interview, find a line and cut it.
139
+ - **Captions** — one click makes captions from the transcript, timed word by
140
+ word: subtitle, karaoke, a highlighted word or big popping words, sized for
141
+ the canvas. Export or import SRT and WebVTT. Agents use `fablecut_captions`.
122
142
  - **Project bin folders** — tree view with expand/collapse; drag media or folders to nest; right-click the **Project** tab → New folder; drop files onto a folder to import into it
123
143
  - **Media management** — each file's frame rate, codecs, audio channels and size (ffprobe); search by name, codec, resolution or `#tag`; filter by favorites, used / unused, kind, tag or collection; sort by any detail or by times used; a list view with metadata columns; favorites, tags and collections; **Find timeline instances** and **Reveal in project**; offline files flagged with a "Media offline" slate, **Relink…** (finds moved files by name and size) and **Replace file…**
144
+ - **Projects** — a dashboard of every project with pictures, notes and tags: open, create from a canvas or a saved project template, duplicate, rename, archive and delete, import an old project file; media is shared, so copies cost no footage
145
+ - **Sequences** — several timelines in one project (a 16:9 and a 9:16 cut, cut-downs, alternatives) sharing its media and compositions, each with its own canvas, frame rate, mix and delivery settings; switch from the menu at the left of the timeline toolbar
146
+ - **Versions** — non-destructive history: save a version (Ctrl/Cmd+S), automatic versions every 10 minutes and before an agent edits, compare a version with now, restore (the current state is kept as a version first), mark the final cut; backups carry every version, and an unreadable `project.json` is recovered at startup
124
147
  - **Proxies** — light, frame-accurate H.264 copies of 4K / HEVC / ProRes footage made in the background (ffmpeg); edit on the proxy with the monitor's **Proxy** button, export always renders the originals
125
148
  - **Import from URL** — **+ URL** downloads an HTTPS video/audio/image into
126
149
  `./media/` (same-origin after import). Remote SVG is refused. Agents use
@@ -448,7 +471,7 @@ Three equivalent control surfaces:
448
471
  `fablecut_get_project`, `fablecut_set_project`, `fablecut_patch_project`,
449
472
  `fablecut_import_media`, `fablecut_analyze_reference`, `fablecut_frame`,
450
473
  `fablecut_encode_profiles`, `fablecut_normalize_audio`, `fablecut_auto_duck`,
451
- `fablecut_denoise`, `fablecut_export`, `fablecut_scopes`, `fablecut_track`.
474
+ `fablecut_denoise`, `fablecut_silence`, `fablecut_transcribe`, `fablecut_captions`, `fablecut_export`, `fablecut_scopes`, `fablecut_track`.
452
475
 
453
476
  FableCut is also published on the **official MCP registry** as
454
477
  [`io.github.ronak-create/fablecut`](https://registry.modelcontextprotocol.io/v0/servers?search=fablecut)
@@ -631,19 +654,13 @@ examples in [`library/svg/`](library/svg/).
631
654
  - Export runs in the browser because the compositor *is* the browser; agents
632
655
  ask you to click Export (or render directly with ffmpeg from `media/`).
633
656
 
634
- ## Sponsors
635
-
636
- <a href="https://fluxionai.space/register?source=github&amp;campaign=github-sidrune-fablecut&amp;promo=SDRFABLECUT" target="_blank" rel="noopener noreferrer sponsored">
637
- <img src="docs/sponsors/sidrune-ai-banner.png" alt="Sidrune AI — one API for GPT, Claude and other leading AI models" width="640">
638
- </a>
639
-
640
- **[Sidrune AI](https://fluxionai.space/register?source=github&campaign=github-sidrune-fablecut&promo=SDRFABLECUT)** — One API for GPT, Claude, and other leading AI models. Sign up and get $3 in API credit.
641
-
642
657
  ## Community
643
658
 
644
659
  Questions, ideas, showing off an edit, or want to help shape what's next? Join
645
660
  the **[FableCut Discord](https://discord.gg/EFMQH7d6Tv)**. Bugs and feature
646
661
  requests are still best filed as [GitHub issues](https://github.com/ronak-create/FableCut/issues).
662
+ Rather email? Write to [hello@fablecut.space](mailto:hello@fablecut.space), or
663
+ [support@fablecut.space](mailto:support@fablecut.space) for help.
647
664
 
648
665
  ## License
649
666