Skip to content

Open source CapCut alternative.

TypeScript

feat(site): tell a replica's chat what hides a title the source shows [rebuild]

David Lef932e84069a6
diff --git a/site/src/cut/components/AiPanel.tools.ts b/site/src/cut/components/AiPanel.tools.ts
index c2954266..1b8d9aac 100644
--- a/site/src/cut/components/AiPanel.tools.ts
+++ b/site/src/cut/components/AiPanel.tools.ts
@@ -202,7 +202,7 @@ export const AI_PANEL_TOOLS = [
"Check the cut against the thing it was built from, in numbers and in pictures. Every frame is scored by `diff`: the mean difference per pixel between your frame and the source's, 0 (the same) to 255, read at one small size so a score means the same thing in every call; under " +
`${SWEEP_TARGET} reads as the same picture. ` +
"mode sweep scores every step of the cut (or from/to) with no pictures and returns the median, p95 and max with the worst stretches, each with its peak frame and a 4×4 grid of where in the frame it differs, and `edges`: stretches whose difference runs along whole edges of the frame while the middle matches — a border, band or letterbox — listed under target too, since thin bars barely move the mean. The picture box is already cut out of any app or bars around it, so a band inside it is part of the picture: build it, with shapes or a smaller block. " +
- "`titles` names each title whose letters read another colour than the source's under it, on every frame it is up: `from`-`to` and how many `frames`, with `ink` yours and `sourceInk` the source's at the worst one, null where that side shows no letters (a title up before the source's, or washed out). A frame score at this size barely moves for any of it. " +
+ "`titles` names each title whose letters read another colour than the source's under it, on every frame it is up: `from`-`to` and how many `frames`, with `ink` yours and `sourceInk` the source's at the worst one, null where that side shows no letters: on yours, something hides them there (a picture effect, a flash too, treats titles as well as footage, and an element on a row in front covers them) or the title is not up yet; on the source's, yours is up early or the source's are washed out. A frame score at this size barely moves for any of it. " +
"A decoder that fails mid-read is replaced and the read goes on: `lost` names source frames no decoder read, and a source that stops decoding ends the sweep at `coveredTo` with `stopped` saying where and why. " +
`mode moments (the default) takes up to ${MAX_COMPARE} \`times\` and hands back each as the source's frame and yours side by side, with its score and grid. ` +
"Either mode says when a frame matches the source better a few frames away: `shift` is that distance, and a positive one means move what is there later by that much. " +
diff --git a/site/src/cut/lib/aiTools.ts b/site/src/cut/lib/aiTools.ts
index b6b5c10f..df5bee94 100644
--- a/site/src/cut/lib/aiTools.ts
+++ b/site/src/cut/lib/aiTools.ts
@@ -874,7 +874,7 @@ const SWEEP_NOTE =
"diff is the mean difference per pixel between your frame and the source's, 0 (the same) to 255; median is the typical frame, p95 the bad tail, max the worst. " +
"worst lists the stretches most off, worst first, each with its peak frame (at on the cut, source on the source) and that frame's 4×4 grid, top row first. " +
"edges lists stretches whose difference runs along whole edges of the frame (top, bottom, left, right) while the middle matches: a border, band or letterbox one side has and the other lacks. Thin bars barely move the mean, so these come back under target too. The picture box is already cut out of any app around it, so a band inside it is part of the picture, never the recording's: build it. " +
- "titles lists titles whose letters read another colour than the source's under them over from-to, ink yours and sourceInk the source's at the worst frame; null on one side means its letters do not show there, a title up before the source's, or washed out. A small label barely moves the score, so retime or recolour each to what the source draws. " +
+ "titles lists titles whose letters read another colour than the source's under them over from-to, ink yours and sourceInk the source's at the worst frame. ink null where the source's letters show means yours are hidden there: a picture effect treats everything over the footage, titles included, so a flash whites them out and a ground the letters sit on is a block or a shape on a row behind them, never an effect; or an element on a row in front covers them; or the title is not up yet. sourceInk null means the source shows no letters there: yours is up early, or the source's are washed out. A small label barely moves the score, so restack, retime or recolour each to what the source draws. " +
"Look at them: compare_to_source with times [{at, source}] at those peaks, fix what differs, then sweep again, until the median is under target and each stretch in worst and edges is fixed or sits over a block standing in for footage, the one difference no edit removes: a glow, a tint, a blurred or soft edge, a flash are all built, so a stretch over what you built is yours to fix. " +
"shift on a stretch, or timing for the whole span, means the source matches better that many seconds away: positive, move it later by that much; negative, earlier. " +
"onBlocks is the share of samples over blocks standing in for footage; those keep a difference no edit removes.";