commit 802a7e3fd4abd5d03ebe13ffc9af9efced3668e7
parent e1b176096d233b3b491cac9152d3f1c58ec184fd
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 19 Oct 2026 12:26:32 -0400
docs: the look (captions, loudness, shorts), umtool build --run; FACTS, CHANGELOG
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
5 files changed, 134 insertions(+), 4 deletions(-)
diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md
@@ -1,6 +1,9 @@
# Changelog
## [Unreleased]
+- **Set a report video's look in umtool, with captions that say who is speaking and even loudness.** The Build tab has a **Look** panel: the header, the timeline footer and the QR code on or off, the length between clips and how they join (crossfade, dip to black, dip to white, dissolve), the loudness (as recorded, −16 LUFS, or your own target) and **Speaker captions** — burned in, two to six words a line, the host's in amber on the left and the other voice's in blue on the right, broken where they pause and never across a change of speaker (from the clip finder's speakers, or the transcript's words). Voices are told apart by colour; give one a name in the panel, or beside a speaker in the clip editor's Speakers list, and its lines say it. Even loudness measures each clip and brings it to the target with a limiter, as montages already did. **Save the look** writes only what you changed; a cut with the on-screen deck keeps its own settings. A manifest without the new keys renders exactly as before. Needs a restart of umtool.
+- **Make a vertical short of any clip.** In the clip editor, **Frame the short** puts a 9:16 box on the player — drag it to the face, size it — and **Make a short** renders that clip alone at 1080×1920 into the project's `shorts/`: the box filling the frame, large speaker captions, no header or QR, even loudness. It runs as a job (one at a time, with Cancel) in the machine's heavy slot; a short made again sets the old one aside rather than overwriting it. The Deliver tab lists the shorts — play, download, make again, or open the clip to frame it — and says when a clip has moved since its short was made. From a terminal: `build-video.mjs <manifest> --short <clip>`. Needs a restart of umtool.
+- **`umtool build <project> --run` runs the build.** It starts the same build job the project page's button does on the running umtool (`UMTOOL_URL`, else `http://localhost:3050`, or `--url`), prints its log as it goes, and Ctrl-C cancels the job. `--replace` sets a newer deliverable aside. Without `--run` it prints the chain as before.
- **A report video's cut can dip through black between clips.** `render.transitionStyle: "fadeblack"` (or `fadewhite`, `dissolve`; default `fade`) changes how the crossfade looks, not its length — for highlights where every clip shares one layout and a plain dissolve hides the jump.
- **Hop in on an assistant's clips in umtool: trim, split, merge, keep or cut them, and comment.** A report video whose cut is not a montage has a **Clip editor** on its Cut tab (`/projects/<id>/clips`). It loops the selected clip from what is on disk, and under it shows the clip's neighbourhood (± 60 s, or closer): the speaker turns coloured host and subject, the laughs, the words, the other clips, and the cut with a handle at each edge. Move the edges by dragging, typing, nudging (±0.1, ±0.5, ±2 s) or **Snap to words**; **Keep** / **Cut**; **Split here** at the playhead; **Merge with next**; **Add a clip** from a span dragged on the strip; **Restore the assistant's version**; **Bring in** a proposal the assistant left out. Each clip says whether it is "by the assistant" (with its score and why) or "edited by you", with its edit history. A comment on a clip is a note anchored to it, so an agent reading `umtool notes` can act on it and its reply shows in the clip's thread. **This is the host** on a speaker's turn corrects which voice is the host. Keys: space, J/L, I/O, S, M, K, X, ←/→. A keep or cut follows its clip when an edit moves the clip's start. It works on any report video; a cut without the clip finder's speakers simply has no colours.
- **Fetch a montage's windows from umtool, and swap in another upload when Rumble refuses one.** A report video's Cut tab and its clip deck have **Fetch windows**: one button asks the editor for every clip's window (a dry run first — how many per platform, how many already on disk — then Start, with each job followed to its end and each refused window named); `umtool fetch <project>` does the same from a terminal. When a window is refused for good (a Rumble video whose lookup answers 403 every time, a deleted recording), the clip deck offers a **stand-in** — the same moment in the stream's YouTube upload (or Odysee) — and **Use stand-in** switches the clip, noting where it came from; **Restore** puts it back. `umtool fallback <project>` is the terminal form. Every run is kept in the project's `fetch-runs.json`.
diff --git a/plans/FACTS.md b/plans/FACTS.md
@@ -10784,3 +10784,53 @@ parsed to 0 cues, indexing the video textless) is CLOSED by `200a3105` (transcri
finder's `setSpeakerRole` (common/lib/clips/reactions.mjs: one host / one subject, `rolesChangedAt`) beside a lenient
reader (`{doc, error}`). Re-propose = `POST /api/report/clips {project, mode: "propose"}` (a job), offered while
`rolesChangedAt > proposedAt` (the view carries both).
+
+## Release 36 lane C: the look — captions, loudness, vertical shorts (verified 2026-10-19, branch `r36/clip-look`)
+
+- **`render.captions`** `{style: "speakers", labels?: {host?: string|null, subject?: string|null}, size?: "m"|"l"}`,
+ **`render.loudness`** `{target}` (−30…−8 LUFS), clip **`vertical`** `{crop: [x, y, w, h], aspect?}` (fractions of the
+ source picture; 9:16 on the source within 3 %, `aspect` = source w/h, default 16/9). Absent or `null` = off and
+ byte-identical (md5 vs main 0d471989 on a two-clip fadeblack fixture). Validated by `validateLook(manifest)`
+ (`umtool/report-to-video/look.mjs`, exported `umtool-report-to-video/look`) in build-video's validators and lint's
+ `validatorErrors`; captions are refused beside `render.chrome` or `render.montage`, loudness beside `render.montage`.
+ Lane B's seed shape `loudness: {target: -16}` validates.
+- **Captions at the clip encode** (non-deck branch only): words for [cut record start, + segment seconds] from
+ `<project>/<reactions.source.words ?? "words.json">` when `reactions.json` (version 1, with `turns`) names the clip's
+ video (and channel), else corpus `transcript.json` whisper words (`whisperWords`), else cues (`fxWordsOf`); turns and
+ speakers only from that reactions.json. `captionLines`: speaker = the turn holding the word's middle, else the nearest
+ turn edge within 0.6 s, else null ("other"); a new line on a speaker change, at 6 words, or (from 2 words) on a gap
+ ≥ 0.45 s or past `maxChars`; a line ends at its last word + 0.3 s, never past the next line. Label = `labels[role]`,
+ else the speaker's label when it is not the default (`Host`/`Subject`/`Speaker N+1`), on a turn's first line only.
+ ASS: PlayRes = the frame, `WrapStyle: 2`, `YCbCr Matrix: None`, styles `host` (&H0040C8FF, align 1), `subject`
+ (&H00FFD36F, align 3), `other` (&H00E6F1F6, align 2), font "IBM Plex Sans" from `report-to-video/fonts/` (`fontsdir`),
+ size m = 0.052 × min(W, H), l = 0.075 ×; marginV = footer + 7 % (20 % on a vertical frame). File
+ `out/<variant>/segments/<id>.captions.ass`; the cut record gains `captions: {lines, words: "words.json"|"transcript.json"|"cues"}`.
+ A path with `'`, `:` or `\` cannot be an `ass=` option: refused with a sentence.
+- **Loudness at the clip encode** (non-montage, deck or not): `measureLoudness(raw, cutA, cutB)` (now exported) →
+ `loudnessGain` → `[0:a]levelFilters(gain)[al]` (an `asplit` first when a poster's waveform reads `[0:a]`); the cut
+ record gains `loudness: {measured, gain, target}`. A cut under −40 LUFS (montage.mjs `SILENT_LUFS`) gets gain 0.
+- **`--short <clipId>`** (`buildVideo({opts: {short}})`): `only` = that clip, `manifest.render = shortRender(render)`
+ (1080×1920, header/footer 0, `qr: false`, no chrome/rail/chromeEngine/brand/montage, `captions {style, labels?, size: "l"}`,
+ `loudness {target: cut's ?? -16}`), work dir `out/shorts-work/` (dirs.dir), picture `crop=W:H:X:Y,scale=1080:1920:flags=lanczos,setsar=1,fps`
+ from `cropPixels(vertical.crop ?? centre, display w, h)` (exact 9:16, even, the box's height and centre kept, clamped).
+ Output `<manifest dir>/shorts/<id>.mp4` (tmp + rename) + `<id>.json` `{version 1, clip, video, requested {cutStart, cutEnd},
+ cut [start, end] (played), crop, width, height, loudness, captions, madeAt}`. `takesHeavySlot` is true for a short.
+- **umtool writers**: `updateRender(dir, patch, {token})` (lib/report/manifest.mjs) — keys `LOOK_KEYS` = headerHeight,
+ footerHeight (ints 0–240), qr (true removes a `false`, keeps an object; false), transition (0–3 s, 2 dp),
+ transitionStyle, loudness, captions; `null` deletes a key; `chrome` or any other key → `RenderRefused`; the merged render
+ is checked with `validateTransitionStyle` + `validateLook`; atomic, token-guarded. `lookOf(render)`. `updateClip` takes
+ `vertical` (null/"" deletes; `verticalErrors`; 4 dp). Route `GET/PUT /api/report/render`.
+- **reactions.json**: `setSpeakerLabel(dir, index, label|null)` (common/lib/clips/reactions.mjs, after setSpeakerRole):
+ trimmed, ≤ 40 chars, empty → the default label; no timestamp. setSpeakerRole still resets a label to the default.
+ The clip editor's ops gain `label {speaker, label}` and `vertical {clip, crop|null, aspect?}` (an updateClip "trim"
+ edit that leaves the cut: `assist` untouched); its view gains `clips[].vertical` and `shorts {<clipId>: {mtimeMs, size, stale}}`.
+- **Shorts**: `umtool/lib/report/shorts.mjs` — `shortSteps(project, clipId)` (one step: `node build-video.mjs <manifest>
+ --out <project>/out --short <id> --progress ndjson`, 20 min), `readShorts(dir, manifest)` (newest first; a set-aside
+ `<id>.<YYYYMMDD-HHMM>.mp4` is not listed; `stale` = the requested cut or the crop differs from the clip's now; `gone`),
+ `setShortAside(dir, id, {replace})` (the replace guard: refused with `needsReplace` unless replace, then renamed aside
+ with its record). Route `/api/report/shorts`: GET `?project` `{shorts, running}`, `?project&clip&file=1[&download=1]`
+ (ranges), `?job`; POST `{project, clip, replace?}` → job kind `short <project> <clip>`; `?cancel=`.
+- **`umtool build <project> --run`** (`lib/report/buildRun.mjs` `runBuildOverHttp`): POST `/api/report/build`
+ (`?replace=1` with `--replace`) on `--url` > `UMTOOL_URL` > `http://localhost:3050`, Bearer `WORKER_TOKEN` when set;
+ polls `?job=&since=&sinceEvent=` every 1.5 s printing the log; SIGINT posts `?cancel=<job>` (a second Ctrl-C exits
+ 130); exit 0 only for `done`. Without `--run` unchanged (prints the chain).
diff --git a/umtool/docs/cli.md b/umtool/docs/cli.md
@@ -24,6 +24,7 @@ Inbox cannot disagree about what is wrong with one.
| `folders [--json]` · `kinds [--json]` | the tree, the registry |
| `window <project> <clip> [--start S] [--end E] [--lock] [--lock-end] [--no-lock-end] [--note …]` | edit a window |
| `build <project> [--preset preview\|fast\|final] [--only ID]` | **prints** the chain |
+| `build <project> --run [--url URL] [--replace] [--preset P] [--only ID] [--skip-fetch]` | **runs** it as the app's build job (POST `/api/report/build` on `--url`, else `UMTOOL_URL`, else `http://localhost:3050`), prints its log as it grows, **Ctrl-C** cancels the job (twice leaves it running); `--replace` stamps a deliverable newer than the manifest aside; exit 1 unless the job is done (release 36) |
| `index [--rebuild] [--prune] [--since MS] [--json]` | the cache |
| `new <slug> [--from <report.md>\|<share URL>\|<channel>/<id>] [--site-origin URL] [--seed chapters\|frames [--target S]]` · `new <slug> --seed phrase --phrase <regex> --channels a,b [--prefer <slug>] [--exclude <regex>] [--max N]` · `new <slug> --seed reactions --from <channel>/<id> [--target S] [--laugh-min X] [--scope FROM:TO] [--no-analyze]` | scaffold |
| `doctor [--json]` | which tools are on this machine and where the roots are; **exit 1** if the report pipeline is missing one, or `UMTOOL_MEDIA_DIR` is set and not there |
@@ -96,10 +97,11 @@ front of a twenty-minute build, and it exits non-zero so a script can gate on it
## Two deliberate limits
-**`build` prints, it does not run.** Cancellation, per-step timeouts and the
-process-group kill live in the server's job runner; a second runner here would be
-a second, worse set of those. Use **run** on the piece's Build tab, or paste the
-printed commands.
+**`build` prints, it does not run it itself.** Cancellation, per-step timeouts and
+the process-group kill live in the server's job runner; a second runner here would
+be a second, worse set of those. `build --run` asks the running app's runner to do
+it and follows the job (Ctrl-C cancels it there); otherwise use **run** on the
+piece's Build tab, or paste the printed commands.
**`check` cannot compute the song reducer.** Nine decision kinds are TypeScript
beside `readSong()`, the loudness cache and the accepted cover set. It reports how
diff --git a/umtool/docs/report-video.md b/umtool/docs/report-video.md
@@ -1145,6 +1145,56 @@ back. The writers are `lib/report/manifest.mjs` (`updateClip`, `restoreClip`,
`splitClip`, `mergeClips`, `addClip`); the editor's operations are
`lib/report/clipEditor.mjs` behind `/api/report/clip-editor`.
+## The look: captions, loudness, shorts (release 36)
+
+Three render keys and one clip key, all opt-in (absent or `null` is off, and the
+render is byte for byte what it was), validated by the build and by the lint
+(`report-to-video/look.mjs` `validateLook`, like `render.transitionStyle`):
+
+| Key | Shape | What it does |
+|---|---|---|
+| `render.captions` | `{style: "speakers", labels?: {host?, subject?}, size?: "m" \| "l"}` | Burned-in captions, 2–6 words a line, broken on pauses (0.45 s) and never across a change of speaker. Who says a word comes from `reactions.json`'s turns and roles: the **host** amber `#FFC840` bottom left, the **subject** sky `#6FD3FF` bottom right, anyone else (or a word heard in no turn) paper `#F6F1E6` bottom centre — black outline, IBM Plex Sans (vendored in `report-to-video/fonts/`). A voice is named only when somebody names it: `labels[role]`, else a speaker's own label in `reactions.json` when it is not the default ("Host", "Subject", "Speaker N"); the name heads the first line of each turn. Words: the project's `words.json` (the recording `reactions.json` describes), else the corpus's whisper words (`transcript.json`), else the cues spread by character. One ASS file per segment (`segments/<id>.captions.ass`), burned with libass (`ass=`). Not beside the deck (`render.chrome`, whose `fx.kineticQuote` is its own captions) or a montage. |
+| `render.loudness` | `{target: -16}` (−30 to −8 LUFS) | Each clip's cut measured (ffmpeg `ebur128`) and brought to the target with one gain (±20 dB at most) and a lookahead limiter at −1 dBFS — montage.mjs's `loudnessGain` + `levelFilters`, at the clip's encode. A cut quieter than −40 LUFS is taken for silence and left as it is. The cut record says `loudness: {measured, gain, target}`. Not with a montage (it levels with `render.montage.loudness`). |
+| clip `vertical` | `{crop: [x, y, w, h], aspect?}` | Fractions of the source picture: the box a vertical short is cut from, 9:16 on the source (`aspect` = the source's width / height, 16/9 when absent; within 3 %). Absent: the centred full-height box. |
+
+A site-less, one-video cut made by the clip finder starts with
+`headerHeight: 0, footerHeight: 0, qr: false, transition: 0.5,
+transitionStyle: "fadeblack", loudness: {target: -16}` (lane B's seed).
+
+**The Look panel** (the Build tab, `/api/report/render`) sets them by hand:
+**Header**, **Timeline footer**, **QR code**, the length **Between clips** (0 is
+a hard cut) and the **Join** (crossfade, dip to black, dip to white, dissolve),
+**Loudness** (as recorded, −16 LUFS, or a custom target) and **Speaker
+captions** with each role's name and the size. **Save the look** writes only
+what changed (`lib/report/manifest.mjs` `updateRender`: token-guarded, the
+build's own checks, atomic; `null` puts a key back to the build's default). It
+never touches `render.chrome` (the deck's own settings, the Media tab); a deck
+cut offers no captions, a montage neither captions nor loudness.
+
+**A speaker's name** is set in the clip editor's Speakers list (the box beside
+each speaker; blank is the default), written into `reactions.json` through the
+clip finder's `setSpeakerLabel` (common/lib/clips/reactions.mjs). A role change
+(This is the host) gives the default name back.
+
+**Shorts.** The clip editor's side column has **Short**: **Frame the short**
+draws the 9:16 box on the player — drag it, size it with the slider; it is
+written to the clip's `vertical` when let go (**Centre it** removes it) — and
+**Make a short** renders `<project>/shorts/<clipId>.mp4`: the clip alone at
+1080×1920, its box scaled to fill the frame, speaker captions at size "l" (the
+cut's names kept), no header, footer or QR, and the cut's loudness target (else
+−16). It is a job on umtool's runner (`/api/report/shorts`: one at a time, a
+log, Cancel), `build-video.mjs <manifest> --short <clipId>` inside the heavy
+slot; its work goes to `out/shorts-work/`, never the cut's segments. A short
+that is there is set aside as `shorts/<clipId>.<stamp>.mp4` before it is made
+again, never overwritten. A record beside each (`shorts/<clipId>.json`: the
+cut asked for and the one played, the crop, the size, the loudness, the
+captions, when) lets the **Shorts** list on the Deliver tab say when the clip
+moved since; there each short plays, downloads, is made again, or opens the
+clip in the editor to frame it.
+
+From a terminal: `node umtool/report-to-video/build-video.mjs
+<project>/video.manifest.json --short <clipId>`.
+
## Operator notes, timed notes and the generated-manifest guard
Notes on a project live in `<project>/notes.json` (shape and CLI:
diff --git a/umtool/report-to-video/README.md b/umtool/report-to-video/README.md
@@ -14,6 +14,7 @@ Two scripts and a manifest:
| `brand.mjs`, `brand-cards.mjs` | stable | the opt-in brand preset (`render.brand`); see [its section](#the-archilyzer-media-preset-renderbrand). |
| `montage.mjs`, `montage-styles.mjs` | stable | montage editing (`render.montage`) and its named styles; see [its section](#rendermontage--montage-editing-release-33). |
| `montage-rulings.mjs` | stable | the clip deck's rulings (`montage-rulings.json` beside the manifest), applied at render; see [its section](#montage-rulingsjson--the-clip-decks-rulings-release-34). |
+| `look.mjs` | stable | the look of a highlights cut: `render.captions`, `render.loudness`, a clip's `vertical` and the short (`--short`); see [its section](#rendercaptions-renderloudness-a-clips-vertical-and---short-release-36). |
| `<report>/video.manifest.json` | per report | the edit decision list. **This is the regeneration source of truth**, not the report. |
```
@@ -885,6 +886,30 @@ node umtool/report-to-video/montage-styles.mjs list
node umtool/report-to-video/montage-styles.mjs apply flash-count video.manifest.json --out takes/flash/video.manifest.json
```
+### `render.captions`, `render.loudness`, a clip's `vertical` and `--short` (release 36)
+
+`look.mjs` (pure) validates and plans them; build-video's hooks run only when a
+key is set, so a manifest without them renders byte for byte as before
+(md5-checked against main on a two-clip fadeblack fixture: final, segments and
+cut records).
+
+- `render.captions: {style: "speakers", labels?: {host?, subject?}, size?: "m" | "l"}`
+ — per segment an ASS file (`segments/<id>.captions.ass`) from the project's
+ `words.json` (the recording `reactions.json` names), else whisper's words, else
+ the cues; `reactions.json`'s turns colour and place each line (host `#FFC840`
+ left, subject `#6FD3FF` right, other `#F6F1E6` centre), 2–6 words a line,
+ broken on 0.45 s pauses, never across a speaker change; burned with `ass=`
+ (libass, fonts from `fonts/`). Refused beside `render.chrome` or a montage.
+- `render.loudness: {target}` (−30…−8 LUFS) — each cut measured (`ebur128`) and
+ levelled with montage.mjs's `loudnessGain` + `levelFilters` at its encode; the
+ cut record carries `loudness: {measured, gain, target}`. Refused with a montage.
+- clip `vertical: {crop: [x, y, w, h], aspect?}` — fractions of the source, 9:16
+ on it (±3 %); `cropPixels` makes it exact and even.
+- `--short <id>` — that clip alone with `shortRender(render)` (1080×1920, no
+ header/footer/QR/rail/deck, captions size "l", the cut's loudness else −16)
+ into `out/shorts-work/`, then `<manifest dir>/shorts/<id>.mp4` + `<id>.json`.
+ Takes the heavy slot.
+
### `montage-rulings.json` — the clip deck's rulings (release 34)
Beside the manifest, written by umtool's clip deck (`/projects/<id>/clips`) and