shots record (web): frames at device pixels through Page.captureScreenshot (clip scale = dpr, long side capped at 1920, 3 requests in flight, midpoint timestamps into the ffmpeg concat); Chromium's screencast stayed at CSS size. Warnings for frames smaller than asked and under 20 frames/s; record-web browser test, pitfall 85

This commit is contained in:
CRTkafa 2026-10-21 03:59:39 +07:00
parent 2d7cf6ec2b
commit dda21d2570
10 changed files with 144 additions and 29 deletions

View file

@ -34,7 +34,9 @@ other platforms' UI. Play promo video: YouTube URL, public or unlisted, ads off,
or `url` / `args` / `extras` (simulator / emulator), `waitFor`, `delayMs`. The source and its settings come from
`shots.capture` (or `record.source`). `storebound shots record --dry` shows the plan, then
`storebound shots record` writes `store/video/clips/<lang>/NN-<name>.mp4` (30 fps H.264, no audio).
- web: Chromium screencast at 2x the frame size, filming starts when `waitFor` is true.
- web: JPEG frames at the frame's device pixels (`Page.captureScreenshot`, long side capped at 1920, the tallest
store video), 3 requests in flight (~45-55 frames/s), joined at their real timings; filming starts when `waitFor`
is true. It warns when frames come out smaller than asked (an upscale) or under 20 frames/s.
- ios-sim: `simctl io recordVideo`, stopped after `seconds`; boots (and later shuts down) the simulator if needed;
the first launch after a cold boot gets `ios.warmupMs`. A still ending is padded with the last frame.
- android-emu: `screenrecord` on the running emulator / device (never booted, wiped or rebooted).

View file

@ -1038,3 +1038,14 @@ that fails without the fix (see CONTRIBUTING.md).
- **Guard:** `cli/shots/weights.ts` (templateWeights, fetchFaces, weightIssues), `cli/shots/palette.ts` (bgIssue in
config validation, bgCss, contrastIssues, coverCrop); report.json `weights` / `contrast`; `tests/shots-look.test.ts`,
`tests/browser/palette-bg.browser.ts`.
## 85. Web app previews at CSS size (blurry 1080x1920 promo)
- **Symptom:** `shots record --source web` clips of a 430x932 @2x page came out 430x932, so a 1080x1920 preview was a
2.5x upscale. Chromium's `Page.startScreencast` sends frames at the viewport's CSS size whatever the deviceScaleFactor
(`maxWidth` / `maxHeight` only shrink); forcing scale 2 through `Emulation.setDeviceMetricsOverride` breaks the layout
(innerWidth 980).
- **Do:** update storebound; the recorder takes `Page.captureScreenshot` frames with `clip.scale` = the frame's dpr
(long side capped at 1920), 3 requests in flight. Re-record old web clips. If it still warns that frames are
smaller than asked, point `STOREBOUND_CHROME` at a current Chromium or record with `--source folder`.
- **Guard:** `recordSize` / `captureShortfall` in `cli/shots/devices.ts` (first frame size checked per clip, plus a
frames-per-second warning under 20); `tests/video.test.ts`.