commit 1919ff0ae0afc7bea695e7d7f82ce74b249efc79
parent 78369fc3a3e2209983e34de1b57b5f8ec219b291
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Tue, 27 Oct 2026 12:44:16 -0400
plans/live-preclip: the share's window as built
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/plans/live-preclip.md b/plans/live-preclip.md
@@ -121,13 +121,16 @@ live one does so only while `transcript.json` is absent.
`pnpm ops live-clip {slug, id, start, end | clip, project?}` and the clip editor's **Share now** (a live
project): umtool `POST /api/report/live-share {project, clip | start, end}`:
-1. asks the editor `POST /api/media/live-window {slug, id, from, to}` (WORKER_TOKEN): the window (padded 3 s) is
- cut from the growing recording NOW — `ffmpeg -ss -i <part> [-ss -i <audio>] -t … -c copy` — into the clip
- cache, `data/<id>/clips/<from>-<to>.mp4` with its provenance (`via: "live-recording"`). This is the
- snapshot-on-demand: it reads the bytes written so far, so it is never older than the request; a window past
- what is recorded is refused with how much is. After the landing the same call cuts from the saved video. No
- network request, and the recorder is only read;
-2. adds the clip to the project when given by seconds (the clip editor's `add`);
+1. adds the clip to the project when given by seconds (the clip editor's `add`, the clip finder's 1.5 s pad);
+2. asks the editor `POST /api/media/live-window {slug, id, from, to}` (WORKER_TOKEN) for the build's own span of
+ the clip (build-video.mjs `fetchSpan`: its extent plus `render.fetchPad`), cut from the growing recording NOW
+ into the clip cache, `data/<id>/clips/<from>-<to>.mp4` with its provenance (`source: "live-recording"`), in the
+ cache's format (H.264 ≤720p + AAC, the first frame the asked-for second — re-encoded, as every cut window is;
+ seeked 10 s early and trimmed on the output, because an MPEG-TS seeks by timestamp, not to a keyframe:
+ measured, an input `-ss` lost the first 1.1 s of picture). This is the snapshot-on-demand: it reads the bytes
+ written so far, so it is never older than the request; a window past what is recorded is refused with how
+ many seconds to wait. After the landing the same call cuts from the saved video. No network request, and the
+ recorder is only read;
3. makes its short (`build-video.mjs --short`, `--skip-fetch --no-network`: the window above is the source, the
live words the captions), refusing a clip over 2:20; a short over 512 MiB (it is not, at 2:20) is refused
with the size rather than posted.