Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit 380886c02889bb9528bd76b6f8711c23d58ffeac
parent ac88cec8bb68ea0775d8d6f15fffd57f6bba8105
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Sun, 18 Oct 2026 18:13:37 -0400

Merge r34/wall-ffmpeg71: fps before every wall tile's tpad — on ffmpeg 7.1 (the Docker images) tpad after trim padded nothing and the wall came out 23 frames short; host output byte-identical

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Meditor/CHANGELOG.md | 1+
Aplans/release-34/wall-ffmpeg71.md | 44++++++++++++++++++++++++++++++++++++++++++++
Mumtool/report-to-video/montage.mjs | 8++++----
Mumtool/report-to-video/montage.test.mjs | 17+++++++++++++++++
4 files changed, 66 insertions(+), 4 deletions(-)

diff --git a/editor/CHANGELOG.md b/editor/CHANGELOG.md @@ -2,6 +2,7 @@ ## [Unreleased] - **umtool scores who is speaking in each montage clip.** A montage's clip deck and its Cut tab have **Score the voices**: each clip's phrase (and a second either side, its speech only) is compared with the host's voice, and every Cut-tab row then reads `voice 0.43 · unsure` — likely, unsure or unlikely him — and the deck puts the doubtful clips first with their scores. The host's voice is the clips you ruled keep in the audition deck once there are three, or before that solo uploads of the channel found on disk (captioned, no speaker change in the captions, not a stream, no guest in the title, spread over the years); the picker beside the button chooses. It runs on this machine with the speaker model the diarization lane already uses — no network, no AI model — and takes about half a minute for 73 clips. It sorts and flags; whether it is him is still decided by ear. The scores are kept in `voice-match.json` beside the manifest, by the source moment, so a re-seeded montage keeps them. The same from a terminal: `umtool voice-match <project>`. Needs a restart of umtool. +- **A montage's closing wall is the right length on older ffmpeg.** With ffmpeg 7.1 (the umtool Docker image), a tile did not hold its last frame after saying its phrase and did not wait for its turn, so the wall came out short of the length its plan gives (23 frames on the test cut) and, with groups, tiles vanished instead of freezing. The tiles now hold and wait on ffmpeg 7.1 as they do on newer versions; renders on the newer ffmpeg are unchanged. - **Rule a montage's clips by ear, and the render leaves out the ones that aren't him.** A report video made of one phrase said many times has a clip deck (the Cut tab's **Clips — n to rule**, at `/projects/<id>/clips`): one card per instance, its cut playing from the cached window (**Wider** plays the whole clip), the quote with the phrase marked, the date and source, the clip's note, and — when a speaker score is beside the manifest — that score. Swipe or press → **Keep**, ← **Cut**, ↓ **Not him** (a co-host, a guest, a clip played), ↑ **Read aloud** (a post or a quote read out); **e** keeps it with a wider phrase, **s** skips, space replays, **z** undoes; a reason chip or a few words go with the ruling. The deck walks the unruled clips, the doubtful ones first, the ruled ones, or all, and works at phone width with the buttons under the thumb. The rulings are `montage-rulings.json` beside the manifest, kept by the moment in the source rather than the clip's number, so seeding the montage again keeps them. A render, and a take, leaves out every clip ruled cut, not him or read aloud (of the cut and of the wall), cuts a clip to its wider phrase, and numbers the kept clips 1 to N; the build log names each clip left out and why. Without a rulings file a render is exactly as before; `--no-rulings` builds every clip. The end of the deck counts the rulings, shows the next render's clips, and **Re-render the take** makes the picked take (or the one whole-cut take) again. A seed's `edits.json` is offered once as **Import earlier rulings**. From a terminal: `umtool rulings <project>` (show, `import`, `set`, `clear`). Nothing calls a model. Needs a restart of umtool. - **Find the next montage phrase in umtool, with no model.** Tools → **Phrases** (`/tools/phrases`) searches several phrases at once across the channels you pick: type plain words (a caption's commas, hyphens and a plural are allowed for) or a regular expression, choose a channel to cut from where it holds the same stream and a pattern to leave out, and press **Search**. It runs as a job with its progress and a Stop. For each phrase you see how many times it was said (a stream and its clip upload counted once), a bar per year, how many are on Rumble and how many elsewhere, how many have a speaker change in the captions, and ten moments spread over the years, each with **Play** and **Transcript** (the lines around it); several phrases are ranked side by side. **Create montage** makes a report-video project from that search, exactly as the new-project form's phrase seed would, and opens it. A catchphrase report's `candidates.json` under the reports folder shows as suggestions. The page remembers your last search. The same search from a terminal: `umtool phrases "<phrase>" … --channels a,b --prefer c`. A second search over the same channels reads a cache and takes seconds instead of most of a minute. Needs a restart of umtool. - **Report videos cut clips from Rumble windows on the right second.** Some downloaded windows (Rumble's) keep their source's clock, so their picture starts a second or two in, and every cut from one landed that much late — in the slow-news montage, one clip's "slow news week" fell into the pause after it. The build now reads where such a window's picture starts and cuts on its own clock (and says so in the build log). In a montage with even loudness, a clip or wall tile that measures near-silent is taken for a phrase looked for in the wrong place: it is found again by the sound — the speech nearest where it was expected — recorded, said in the log, and never boosted from silence. diff --git a/plans/release-34/wall-ffmpeg71.md b/plans/release-34/wall-ffmpeg71.md @@ -0,0 +1,44 @@ +# Release 34 lane — the wall's length on ffmpeg 7.1 (as shipped) + +The umtool image (`archilyzer:r33-umtool`, Debian trixie, ffmpeg 7.1.5-0+deb13u1) failed `montage.test.mjs` +"render: wall-finale" with "420 vs 443". The host (ffmpeg n9.0.2) passed. + +## What + +- **Reproduced in the image** with the worktree's `umtool/report-to-video` mounted read-only over `/repo`'s: the four + clip segments are exact (83/83 each), and the wall is 88 frames for its planned 111. +- **One tile's chain**, `trim=end=1.2,setpts=PTS-STARTPTS,tpad=start_duration=0.5:start_mode=add:…:stop_mode=clone:stop_duration=2,trim=end_frame=60`, + gives 36 frames on 7.1 and 60 on 9.x. On 7.1, tpad after a trim pads nothing at either end. That holds after trim + with `end` or `end_frame`, after `select`, `null`, `format` or `split`, and with `stop=` as well as + `stop_duration=`; a plain input pads fine. +- **The fix:** `fps=<render fps>` immediately before each tile's tpad. With it, 7.1 gives 87 frames, the same as 9.x. + Applied to both compose paths, the single wall and the grouped wall. In the grouped wall the canvas source had held + the length, so its symptom was tiles vanishing after their phrase instead of freezing. +- **No change on 9.x:** md5 of a wall-finale and a build-to-wall manifest (main's patches) are identical between main's + and the branch's build-video, for the wall segment and the final. + +## Gates + +- tsc clean. +- **Host test:scripts:** 1164 (1160 pass, 4 skipped) on main's code → **1165 (1161 pass, 0 fail, 4 skipped)**, with one new + test: every wall tile's tpad is fed by fps. +- **In the image:** `montage.test.mjs` + `montage-styles.test.mjs` **66/66**. +- **The image's whole `umtool/report-to-video/*.test.mjs`:** 620 tests, 611 pass, 6 fail, 3 skipped. None of the 6 are + the wall, and all fail on main's code too; not fixed here: + + | File | Test | + |---|---| + | av-sync | 1, the crossfade concat | + | cut-edits | 11, muteFrom | + | cut-edits | 12, the end fade with a hold | + | deck-room | 17, a move inside the hold | + | dip | 17, a dipped crossfade | + | heavy-gate | 2, the checkout's lock file beside the e2e queue in its git common dir | + + The heavy-gate failure comes from the container's git, not ffmpeg. The deck holds are `tpad=stop_mode=clone` too + (`holdVideoFilter`), so the same 7.1 tpad behaviour is the likely cause of the ffmpeg ones. + +| Commit | What | +| --- | --- | +| `bf419ab0` | fps before each wall tile's tpad; the test | +| (this commit) | this record, CHANGELOG | diff --git a/umtool/report-to-video/montage.mjs b/umtool/report-to-video/montage.mjs @@ -1309,9 +1309,9 @@ export function wallComposeArgs({ tiles, plan, render, settings, first, last, en const again = Math.min(t.seconds, plan.beatLen); parts.push( `[${i}:v]split[wv${i}a][wv${i}b]`, - `[wv${i}a]trim=end=${exprNum(once)},setpts=PTS-STARTPTS,` + + `[wv${i}a]trim=end=${exprNum(once)},setpts=PTS-STARTPTS,fps=${fps},` + `tpad=start_duration=${exprNum(at)}:start_mode=add:color=${bg}:stop_mode=clone:stop_duration=${beat},trim=end_frame=${plan.beatFrames}[wv${i}c]`, - `[wv${i}b]trim=end=${exprNum(again)},setpts=PTS-STARTPTS,tpad=stop_mode=clone:stop_duration=${exprNum(plan.beatLen)},` + + `[wv${i}b]trim=end=${exprNum(again)},setpts=PTS-STARTPTS,fps=${fps},tpad=stop_mode=clone:stop_duration=${exprNum(plan.beatLen)},` + `trim=end_frame=${plan.frames - plan.beatFrames}[wv${i}d]`, `[wv${i}c][wv${i}d]concat=n=2:v=1:a=0[wt${i}]`, ); @@ -1389,8 +1389,8 @@ function groupedWallComposeArgs({ tiles, plan, render, settings, first, last, en const secondF = plan.frames - plan.restartFrames[i]; parts.push( `[${i}:v]split[wv${i}a][wv${i}b]`, - `[wv${i}a]trim=end=${exprNum(once)},setpts=PTS-STARTPTS,tpad=stop_mode=clone:stop_duration=${total},trim=end_frame=${firstF}[wv${i}c]`, - `[wv${i}b]trim=end=${exprNum(again)},setpts=PTS-STARTPTS,tpad=stop_mode=clone:stop_duration=${total},trim=end_frame=${secondF}[wv${i}d]`, + `[wv${i}a]trim=end=${exprNum(once)},setpts=PTS-STARTPTS,fps=${fps},tpad=stop_mode=clone:stop_duration=${total},trim=end_frame=${firstF}[wv${i}c]`, + `[wv${i}b]trim=end=${exprNum(again)},setpts=PTS-STARTPTS,fps=${fps},tpad=stop_mode=clone:stop_duration=${total},trim=end_frame=${secondF}[wv${i}d]`, `[wv${i}c][wv${i}d]concat=n=2:v=1:a=0,setpts=PTS-STARTPTS+${exprNum(at)}/TB[wt${i}]`, ); const l = plan.layout[i]; diff --git a/umtool/report-to-video/montage.test.mjs b/umtool/report-to-video/montage.test.mjs @@ -1374,3 +1374,20 @@ test("render: a window whose picture starts late is cut on its own clock", { ski await rm(root, { recursive: true, force: true }); } }); + +test("wall compose: every tile's tpad is fed by fps (ffmpeg 7.1's tpad pads nothing after a trim without it)", () => { + // On 7.1 (Debian trixie, the umtool image) `trim,setpts,tpad` pads neither the start nor the clone at + // the end, so the single wall came out 23 frames short; `fps` before tpad gives it a frame rate to pad + // by, and on CFR input changes no frame on 9.x. + const tiles = Array.from({ length: 9 }, (_, i) => ({ file: `/t/${i}.mp4`, seconds: 1.2 })); + const render = { width: 320, height: 180, fps: 30, palette: PALETTE }; + const graphs = [ + wallComposeArgs({ tiles, plan: wallPlan({ tiles: 9, build: 3, durations: Array(9).fill(1.2), fps: 30, width: 320, height: 180 }), render, settings: resolveMontage({ montage: { wall: { tiles: 9 } } }), first: false, last: true, encode: [], outPath: "/o" }), + wallComposeArgs({ tiles, plan: wallPlan({ tiles: 9, build: 3, durations: Array(9).fill(1.2), fps: 30, width: 320, height: 180, groups: "double", leads: Array(9).fill(0.12) }), render, settings: resolveMontage({ montage: { wall: { tiles: 9, groups: "double" } } }), first: false, last: true, encode: [], outPath: "/o" }), + ].map((a) => a[a.indexOf("-filter_complex") + 1]); + for (const g of graphs) { + const tpads = g.match(/[^,;\]]*,tpad=/g) ?? []; + assert.equal(tpads.length, 18, "two per tile"); + for (const t of tpads) assert.equal(t, "fps=30,tpad="); + } +});