Skip to content

feat: video capture of viewer URLs - #64

Merged
MPanknin merged 3 commits into
mainfrom
feat/capture
Nov 24, 2026
Merged

MPanknin merged 3 commits into
mainfrom
feat/capture

Conversation

@MPanknin

@MPanknin MPanknin commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Context

Short videos for posts without recording them by hand. A shot is a Share link plus what happens over time; the script turns it into an MP4, a poster PNG and a JSON with the dataset numbers (bytes, requests, load milestones).

Changes & Tests

  • ?capture=1 in both viewers (examples/shared/capture.ts, like bench.ts): full render scale and a small window.__kilnCapture API. No library changes.
  • bun run capture <shot.json> (scripts/capture.ts) drives it with Playwright (headed, same Chrome flags as the visual tests) and pipes PNG frames into ffmpeg.
    • Timing: converged (every frame fully loaded), streaming (smooth motion, bricks refining), realtime (cold load at wall-clock speed).
    • Camera: turntable, static, or keyframes as cam= values from Share links.
    • Actions: at a time, move the camera or change viewer settings (mode, shading, clip, slices, channel weights, timepoint …), jumping or easing.
    • Captions with fades and a stats line (dataset size, bytes streamed), drawn into the frames.
  • Shots in scripts/shots/ with a README of what each one shows.
  • Unit tests for camera paths, the action timeline and caption fades. The recorder and the page hook's settings and overlays were checked end to end against a stub viewer (no WebGPU in my environment); real captures were run on a Mac.
bun run capture scripts/shots/woodbranch-dive.json --base https://kilnrender.com/preview/feat-capture/app/

Generated by Claude Code

bun run capture <shot.json> records a viewer URL to MP4: a turntable or a
keyframed camera path with every frame settled, or the progressive load at
wall-clock speed. The viewers expose the hook on ?capture=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aid4AjT5GkDpAp852BubMF
Shots can change the camera and viewer settings at given times (jump or
ease), show captions and a stats line, and record with "streaming" timing:
smooth motion with bricks refining.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aid4AjT5GkDpAp852BubMF
@MPanknin
MPanknin merged commit 90c5b86 into main Nov 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants