From a scene file
to a walkthrough.

Set up the toolchain, record the demo, then describe your own app.

Getting started

Use macOS or Linux (WSL works), Node.js 24 and pnpm 10. Allow about 2 GB for the models, Python environment and Chromium.

Run these commands in a clone of the repository. doctor sets up the local toolchain and models; the first run needs a network connection.

# in a clone of this repository
pnpm install
pnpm -C packages/cli exec playwright install chromium
node packages/cli/bin/scenecast.js doctor

# start the demo app (an invented product, included in the repo), then render its video
node examples/demo-app/server.mjs &
node packages/cli/bin/scenecast.js render examples/demo-app/video.yaml

The render writes out/demo.mp4, out/demo.srt, out/chapters.txt and out/audit/. Open out/audit/audit-table.md to see every moment checked.

On Linux, Chromium may need system libraries. This step requires admin rights:

pnpm -C packages/cli exec playwright install --with-deps chromium

scenecast doctor installs uv in ~/.local/bin/uv (or ~/.cache/scenecast/bin/uv), the Python environment in py/.venv, and models and NLTK data in ~/.cache/scenecast/. scenecast render performs the same setup on first use if you skip doctor.

The render stops with "No usable sandbox!" (Linux). Ubuntu 23.10 and later, and CI runners built on it, block the unprivileged user namespaces Chromium's sandbox needs. scenecast therefore runs the final render's Chromium without its sandbox on Linux, as Playwright already does for the recording; the page it loads is scenecast's own, built locally. Set SCENECAST_CHROME_SANDBOX=1 to keep the sandbox on a system that allows it.

Your first scene

Copy examples/demo-app/video.yaml, set app.baseUrl to your running app, then edit the narration and steps. A step’s cue must appear in its scene’s narration.

- id: sign-in
  kind: app
  route: /login
  signedOut: true
  narration: >-
    To sign in, type your work email, then your password, and press Sign in.
  steps:
    - { cue: email, do: type, sel: "#email", text: sam@example.com }
    - { cue: password, do: type, sel: "#password", text: demo-password }
    - { cue: Sign in, occ: 2, do: click, sel: "#signin" }

Here occ: 2 selects the second occurrence of “Sign in”. The click lands on the phrase’s first word.

Commands

scenecast doctor                      check the toolchain (uv, Python, ffmpeg, Chromium, models)
scenecast login <video.yaml>          sign in by hand and save app.storageState
scenecast render <video.yaml> [--only <sceneId>] [--no-audit] [--keep-work] [--fresh]
                              [--out <dir>] [--work <dir>]
scenecast preview <video.yaml>        open the composed video in the Revideo player
scenecast --version                   print the version

Stages whose inputs have not changed are reused from work/<id>/. The cache is keyed on the scene file, the saved session, the login hook, the seed script (or the files a seed command names) and app.seedInputs, not on the app itself or its database. Use --fresh after the app itself changes, or when its data changed some other way than through those files. Use --only <sceneId> while refining one scene.

Recording runs in real time. Composition takes about 2× the video length; a whole cold render takes about 3.5 to 7×. A run with nothing changed reuses every stage and can finish in under a second. The first render after updating to 1.3 makes every scene's voice again (the voice stage's cache version is 4); the recordings and music are kept.

Scene file reference

A scene file (video.yaml; .yml and .json work too) describes one video: the app to record, the brand, the voice, and an ordered list of scenes. Each scene has its narration and the steps to perform while it is spoken. Every step names a cue, a word or phrase in the narration, and scenecast times the step so that it lands on that word.

Relative paths (brand.logo, brand.music.file, brand.background.image, app.storageState, app.loginHook, app.initScript and app.routes[].module files, card pages, and app.seed when it is a script path) are resolved against the scene file's folder.

The scene file is checked when it loads. Every problem is listed at once, for example scene "worklist" step 1: cue "due" not in narration.

A complete example

Adapted from examples/demo-app/video.yaml, shortened, with generic card text:

id: demo
title: A quick tour
output: demo
brand:
  primary: "#1F3A5F"
  accent: "#F5C518"
  font: Inter
  cardFont: Inter
  background: { from: "#1F3A5F", to: "#0F1E33" }
  introTitle: A quick tour
  introSubtitle: Sign in, check your worklist and sign a form
cards:
  introSec: 3.5
  outroSec: 4
  outroNext: "Next: approving requests"
  entrance: reveal
app:
  baseUrl: http://127.0.0.1:4310
  seed: ./seed.mjs
  routes:
    - { url: "**/api/flags", json: { sso: true, sessionToken: true } }
  initScript: "document.addEventListener('DOMContentLoaded', () => { document.documentElement.dataset.demo = 'video'; });"
  panels: [".filters-pop"]
  login:
    - { do: goto, text: /login }
    - { do: type, sel: "#email", text: sam@example.com }
    - { do: type, sel: "#password", text: demo-password }
    - { do: click, sel: "#signin" }
  nav:
    - { selector: header.topbar, edge: top }
audit:
  allowList: [worklist]

scenes:
  - id: worklist
    kind: app
    title: Your worklist
    route: /dashboard
    narration: >-
      Your dashboard opens on the worklist, with everything that needs you today.
      Each item shows when it is due, so the most urgent work comes first.
    steps:
      - { cue: worklist, do: ring, sel: ".worklist", pad: 10 }
      - { cue: due, do: zoom, sel: ".worklist", pad: 16 }
      - { cue: first, do: unzoom }

  - id: account-menu
    kind: app
    title: The account menu
    route: /dashboard
    cursor: right
    narration: >-
      Your account menu sits at the top right. Open it to find your profile, your settings, and sign out.
    steps:
      - { cue: Open, do: click, sel: "#menu-button" }
      - { cue: profile, do: ring, sel: "#account-menu", pad: 6 }
      - { do: park }

  - id: on-the-go
    kind: title
    title: On the go
    seconds: 3
    narration: Next, the same app on a phone.

  - id: phone
    kind: app
    title: On your phone
    route: /dashboard
    viewport: phone
    narration: >-
      On a phone, the same worklist fits the narrow screen.
      Tap Requests to see everything you have asked for.
    steps:
      - { cue: Requests, do: click, sel: ".nav a[href='/requests']" }

Top level

Field Required Meaning
id yes Short name. The work folder is <work>/<id>/.
title yes The video's title. It is shown on the outro card unless cards.outroTitle is set.
output yes Base name of the output files: <out>/<output>.mp4 and .srt.
brand yes Colours, font and card text. See brand.
app yes How to reach and sign in to the app. See app.
voice no The narrator. See voice.
say no How words are said, in every scene. See pronunciation.
scenes yes At least one scene. See scenes.
cards no The intro and outro cards. See cards.
cursor no Where the cursor starts and parks. See cursor.
phone no align: where a phone scene's phone sits, left (default), center or right. See phone scenes.
audit no allowList: names and words that speech recognition may spell differently, or leave out, without a narration WARN (for example [worklist]). An allow-listed cue word that is left out is placed by position, in the gap the heard words around it leave. pronunciation: warn (default), fail or off: what the audit does when it hears a word said differently from the script (see the audit).

cards

Field Default Meaning
introSec 3 Intro card length: 0 (no intro card) or at least 1 s.
outroSec 3 Outro card length: 0 (no outro card) or at least 1 s.
outroTitle title The outro card's title.
outroNext none A smaller line under the outro title, for example Next: approving requests.
entrance reveal How the logo, bar and text come in. reveal: the logo scales up slightly and fades in, the accent bar grows, then the title, subtitle and next line rise in one after another (about 1 s in all). rise is the v1 look (everything rises and fades in over 0.5 s). none shows the card at once.
introPage none An HTML file shown as the intro card instead of the drawn one (see card pages).
outroPage none The same for the outro card.

Card pages

A card page (cards.introPage, cards.outroPage, or page on a title scene) is an HTML file that Chromium renders once, at 1920×1080, into the image the card shows. Paths are relative to the scene file. The page gets the brand as CSS variables on :root: --sc-primary, --sc-accent, --sc-font and --sc-card-font (font names come quoted, so font-family: var(--sc-card-font), sans-serif works). The capture waits for the page's fonts to load.

  • The card is a still. CSS animations and transitions do not play in the video: finite ones are captured at their end state. The card entrance does not apply to a page; the page fades in and out with the dissolve like any scene.
  • Everything the page loads must be local (fonts, images, styles): the network is blocked, so it renders the same offline. The cache notices a change to the HTML file itself; after changing only a file it loads, render with --fresh.
  • Routes, init scripts and the signed-in session do not apply to card pages.
  • A card page draws with the fonts installed on the machine that renders (and any font files the page loads itself). The fonts bundled with scenecast (Inter) are loaded only into the composer, for captions and drawn cards, not into card pages: ship the font file next to the page and load it with @font-face to be sure.
  • The page replaces the whole drawn card: the logo, introTitle/introSubtitle, outroTitle and outroNext are not drawn on it.
  • A title scene's narration captions are drawn over its page.
  • Requests to anything but local files are blocked, and each blocked URL is named in a warning.

brand

Field Required Meaning
primary yes Background colour of the intro, outro and chapter cards, unless background is set. The card text is light or dark to suit the background.
accent yes The accent bar on the cards, and the touch indicator on phone scenes. Any CSS colour works (#F5C518, gold, rgb(245 197 24)); the touch indicator uses it as computed by the browser, without alpha. A value that is not a colour prints a warning and the indicator falls back to #F5C518.
font yes Font family for captions (and cards, unless cardFont is set), for example Inter. Inter is bundled with scenecast (OFL-1.1) and always works, offline. Any other family must be installed on the machine that renders: a font that is missing fails the render and names the font, rather than falling back to another typeface. The check runs when the video is composed (after the voice and the recordings), and a name the system resolves as an alias of an installed font counts as installed.
cardFont no Font family of the card text. Defaults to font. The same rule applies: Inter, or a font installed where the render runs (use a free one; OFL is fine).
background no Background of the cards and of the stage behind the phone on phone scenes: a colour ("#1F3A5F"), a gradient { from, to, angle } (angle in CSS degrees, default 135: from the top-left to the bottom-right), or an image { image, dim } (a path; it covers the frame, under a black overlay of dim, 0 to 1, default 0.35). Default: primary.
logo no An image file shown on the intro and outro cards (not on chapter cards).
introTitle yes Title of the intro card.
introSubtitle no Subtitle of the intro card.
music no { file, licence }: your own music track instead of the synthesised bed. licence is required and is copied into the audit.

Without brand.music, scenecast synthesises a quiet music bed, so there is nothing to license.

app

Field Required Meaning
baseUrl yes Where the app runs, for example http://127.0.0.1:4310. Routes and goto paths are relative to it. The app must already be running when you render.
login no Steps that sign in, run before each signed-in scene is recorded (scenes reused from the cache don't sign in), untimed and not recorded. They use the same step format as scenes (goto, type, click, check, upload, press, hover, scroll, wait).
storageState no A saved Playwright session file. When set, it is used instead of login. scenecast login <video.yaml> opens a browser, lets you sign in by hand, and saves the session to this path (useful for SSO or two-factor sign-in).
loginHook no A JavaScript module whose default export is async (page, context) => {} and signs in. It is used when there are no login steps and no storageState.
seed no Runs once before the first recording, in the scene file's folder, with SCENECAST_BASE_URL set. A single word naming a file that exists (relative to the scene file), such as ./seed.mjs, is a script: .js, .mjs, .cjs and .ts run with node, .sh with sh, anything else directly. Anything else, such as node scripts/seed.mjs or python db/seed.py, runs as a shell command. A single word that looks like a path but names no file (./nope.mjs) is an error when the scene file loads. Seeding is skipped when every recording is reused from the cache. The seed script, and every word of a seed command that names a file (scripts/seed.mjs in node scripts/seed.mjs), are part of the recordings' cache key: change one and every scene is recorded again.
seedInputs no More files the seed reads (its data, for example ./seed/people.json), relative to the scene file. Their contents join the recordings' cache key too. A missing one is a load error.
nav no The app's navigation bars: a list of { selector, edge } with edge left (a sidebar) or top (a bar along the top). A zoom shows a declared nav whole or leaves it out, never cut partway.
initScript no JavaScript run in every page before the app's own scripts: a .js, .mjs or .cjs file (relative to the scene file), inline code, or a list of them. A single word with a script extension that names no file is a load error (app.initScript: no such file: <path>). See init scripts and routes.
routes no Network responses to fake: a list of { url, status, json, body, headers, module }. See init scripts and routes.
panels no Extra CSS selectors for the app's open panels (pop-overs, drawers), added to the built-in list. Captions keep clear of them, and the audit checks that they do.

A scene with signedOut: true is recorded without the session.

When the app keeps its sign-in in sessionStorage (not only in cookies), the unattended sign-in and scenecast login save it in a second file next to the session (<session>.session-storage.json), and every recording restores it once per tab, before the app's scripts run. An app that clears it (by signing out, say) is not signed back in on its next navigation. The session files the unattended sign-in (app.login or app.loginHook) writes for a recording are deleted when that recording ends, even when it fails. The files scenecast login writes next to app.storageState (the session and its .session-storage.json) are kept, since later renders use them: keep both out of version control.

Init scripts and routes

Both apply to every browser context scenecast opens on the app: the recording, the unattended sign-in, the prewarm and scenecast login. They do not apply to card pages.

  • initScript runs as each document is created, before <html> exists: document.documentElement and document.body are still null. Code that touches the page must wait for it:

    initScript: "document.addEventListener('DOMContentLoaded', () => { document.documentElement.dataset.demo = 'video'; });"
    

    Setting globals, localStorage values or feature switches the app reads at start-up works at once.

  • routes answer matching requests instead of the network. url is a Playwright glob and may match any origin (**/api/flags also matches https://api.example.invalid/api/flags). Give at most one of:

    • json: a value sent as JSON (content-type: application/json);
    • body: a string sent as is;
    • module: a JavaScript file whose default export is async (route, request) => {} and answers the request itself (with route.fulfill, route.continue or route.abort).

    status defaults to 200 and headers are added to the response. Use more than one of json, body and module and the file fails to load (app.routes[<k>]: use one of json, body, module). A json or body answer gets CORS headers for the requesting page (unless headers sets access-control-allow-origin), and CORS preflights are answered for every route. A module route builds its own response, so a module that answers an API on another origin must set the CORS headers itself (access-control-allow-origin, plus access-control-allow-credentials: true when the app sends cookies), or the browser drops the answer.

    Routes suit feature flags, a third-party widget that would otherwise load slowly, or an API that is not running where the video is made.

voice

Field Default Meaning
name af_heart A Kokoro voice.
lang en-us Language code.
speed 0.9 Speaking rate (1.0 is Kokoro's normal speed).
phraseGapSec 0.2 Silence between phrases, in seconds.
clauseGapSec 0.15 Silence after a phrase that ends at : or ;. 0 gives the v1 rhythm.
acronyms true An all-caps word of 2 to 6 letters (an s may follow, as in IDs) that misaki's dictionary does not know is spelled out letter by letter: SKU is "S K U", but NASA, SCUBA, OK and ID stay words. false reads such words as words.
flow sentence sentence: the phrases of one sentence are voiced in one go and cut apart at their breaks, so the intonation runs on across a clause break. scene: the same for all of a scene's phrases that share a speed. phrase: each phrase is voiced on its own (as in 1.2). The gaps between phrases, and so every cue time, stay as designed. A group that can't be cut cleanly is voiced phrase by phrase, with a log line.
roomTone true true lays faint room tone (seeded, low brown noise at about −60 dBFS) under the whole voice track instead of digital silence; false turns it off; a number sets its level in dBFS (−90 to −40).
polish true Light processing on each scene's voice: a soft 80 Hz high-pass, a gentle de-esser and light compression. The loudness target is unchanged. false turns it off.

The natural voice (flow: sentence, roomTone and polish) is on by default. flow: phrase, roomTone: false, polish: false gives the 1.2 sound back.

The narration is split into phrases at sentence ends (., !, ?, …), and after : or ; when both sides have at least 3 words (so "To sign the work agreement: tick the box, …" is two phrases, but a short list such as "speed; care" stays whole). A sentence longer than about 140 characters is split again at commas, with phraseGapSec between the parts. A [pause] and a speed change split a phrase too (see delivery).

A scene can set its own speed: voice: { speed: 0.85 } on the scene overrides voice.speed for that scene.

Each word's time comes from forced alignment of the known script against the voice, so every narration word has exactly one time, whatever its punctuation, hyphens or numbers ("sign-in", "$1,500", "9:30").

Pronunciation

say: tells the voice how to say a word or a few words. The key is matched case-sensitively, on whole words (punctuation around the words doesn't matter). The value is either the words to say instead, or misaki phonemes between slashes. A key mapped to itself is read as a word (turning off the automatic acronym for that word). say: on the video applies to every scene; say: on a scene overrides the same keys for that scene.

say:
  SKU: S K U                # replacement words
  Sibal: "/sˈibɑl/"         # misaki phonemes
  YAML: YAML                # a word, not Y A M L
scenes:
  - id: intro
    say: { SKU: Stock Keeping Unit }   # this scene only
    narration: Ask [Mira](/mˈiɹə/) about it, or [GIF](say: jiff) us.

In the narration itself, [word](/phonemes/) and [word](say: other words) do the same for one place.

Captions, cues and the audit always use the script's own words: the caption shows "SKU", a cue SKU lands on it, and the word's time spans whatever was said for it. A say: entry that would run across a phrase break (a sentence end, a clause break or a pause) is an error; give each part its own.

Delivery

Markup Effect
[pause 0.6] Silence at that point, in seconds (more than 0, at most 5). It ends the phrase there, and the gap before the next phrase is exactly the pause, so the cues after it stay on their words. A pause on a phrase break replaces that break's gap.
{speed 0.85}…{/speed} The voice speed (0.5 to 2) for the words in between. Kokoro takes one speed per phrase, so a speed change ends the phrase, with a 0.05 s join.
*word* Stress: misaki's primary stress mark on the word. It is audible on words that are normally unstressed ("find your profile", "save and close": the word gets longer and stressed). Kokoro has no other emphasis control, so a word that already carries stress (*save*) sounds the same.

All markup is removed from captions and from cue matching: a cue never names markup, and *help* is matched by the cue help.

scenes

Field Required Meaning
id yes Unique within the file. Used in file names, errors, the audit, and --only <id>.
kind yes app (a recording of the app) or title (a narrated chapter card).
title no The chapter name in chapters.txt. On a title scene, it is the card's text. Defaults to id.
narration yes What the narrator says. Every cue must appear in it. It may hold pronunciation and delivery markup.
say no Pronunciations for this scene; its keys override the video's say:. See pronunciation.
voice no { speed }: this scene's voice speed (overrides voice.speed).
steps no What happens on screen. See steps.
route no The path opened before recording (default /).
viewport no desktop (1920×1080, the default) or phone (390×844 in a drawn phone outline).
signedOut no true records this scene without signing in.
prewarm no Paths to open, and wait on, before route, so caches are warm when recording starts.
setup no App scenes: steps run after route opens and before recording starts, untimed and not filmed, so the scene starts part-way through a flow (an open drawer, step 2 of a wizard). See setup.
seconds title scenes: yes The card's minimum length. It runs longer if the narration needs it.
zoom no App scenes: { sel, pad }. The scene starts zoomed on this element (measured before recording starts, after setup), until its first zoom or unzoom step, or the scene end. A selector that matches nothing fails the recording (scene "<id>" zoom selector "<sel>" not found). A zoom that grows to hold a declared nav and so becomes the full frame prints a warning (scene "<id>": zoom on <sel> became the full frame because it holds nav <nav>).
cursor no App scenes: where the cursor starts in this scene (a spot). Overrides cursor.start.
page no Title scenes: an HTML file shown as the card instead of the drawn one (see card pages). On an app scene it is ignored, with a warning.

setup

Some places in an app have no URL: a drawer opened by a button, step 3 of a wizard, a form half filled in. setup gets the page there before the take starts, the way app.login signs in: its steps run as fast as possible after route has opened and settled, the page settles after each one, and none of it is in the video. The scene's first frame shows the result.

- id: attach
  kind: app
  route: /requests
  setup:
    - { do: click, sel: "#new-request" }
    - { do: type, sel: "#request-title", text: A new monitor }
    - { do: click, sel: "#wizard-next" }
  narration: Attach a quote, and send the request.
  steps:
    - { cue: Attach, do: upload, sel: ".dropzone", file: ./quote.pdf }
    - { cue: send, do: click, sel: "#wizard-submit" }

Setup steps use the step format without cue, occ or offset: click, type (fills the field at once), hover, check, upload, press, scroll, wait and goto. What only matters on camera (zoom, ring, unzoom, park, and the fields ring, ringSel, ringMs, glideMs, pad, at) is a load error; make it a scene step. click, check and hover need sel. The scene's zoom and the declared navs are measured after setup, so a scene can start zoomed on the drawer setup opened. A setup selector that matches nothing fails the recording with scene "<id>" setup step <i> selector "<sel>" not found. Prefer setup to an app.initScript that fakes the state: it drives the app as a person would, so it keeps working when the app's internals change.

The video is an intro card (3 s by default, music only), then every scene in order, then an outro card (3 s) with title. See cards. A render with --only <id> leaves out the intro and outro cards and writes <output>-<id>.mp4 and <output>-<id>.srt.

steps

- { cue: Sign in, occ: 2, do: click, sel: "#signin" }
Field Meaning
do click, type, hover, check, upload, scroll, press, zoom, unzoom, ring, park, wait or goto.
cue A word or phrase from the narration (case-insensitive, whole words; punctuation and symbols such as & do not count, so Save & close matches "Save & close"). The step lands on its first word.
occ Which occurrence of the cue, counting from 1 (default 1). Use it when the cue appears more than once: in "To sign in, … and press Sign in", the button is occ: 2.
offset Seconds added to the cue time (negative is earlier).
sel A CSS selector, or a list of them. click, type, hover, check, upload, zoom and ring need one. With a list, the box is the union of all matches and the pointer aims at the first.
text What type types, the key press presses (default Enter), or the path goto opens.
file upload: the file to choose, or a list of files, relative to the scene file. A file that does not exist is a load error (scene "<id>" step <i>: upload file not found: <path>).
ms zoom: how long it holds after easing in (default 2000). ring: how long it holds (default 1200). wait: how long to wait. Any step: the minimum time before the next uncued step.
pad Pixels added around the box of a zoom or ring.
ring true on another step (for example a click) draws a ring around its target as well.
ringSel click, type, hover, check and upload: ring this element instead of the step's target (a selector or a list). Implies ring: true.
ringMs The same steps: how long that ring holds (default 1200).
glideMs click, type, hover, check, upload and park: how long the cursor takes to get there (default 520).
by scroll: scroll the window by this many px (positive is down).
to scroll: scroll the window to this scrollY. A scroll step takes one of sel, by and to.
at park: where the cursor goes (a spot). Default cursor.park, or right when that is off.
settle false skips the wait for the page to settle before this step.

What each action does:

  • click, type, hover. The cursor glides to the element and the action happens on the cue word. type clicks the field, then types text one character at a time. A hover cannot ring an element that the hover itself reveals (a tooltip, a menu that opens on hover): the ring is measured as the cursor arrives, before it appears. Ring it from the next step instead, for example { cue: …, do: ring, sel: ".tooltip" }. An action that moves what it rings is fine: a row that lifts on hover, or a dialog that grows and re-centres when an option is clicked. A ringSel ring (on a hover, click, type, check or upload) is drawn once the action has had its effect: after the layout change and the transitions and animations on those elements and their ancestors (at most 0.4 s after the cue), round them where they come to rest. On a type step it is drawn after the click into the field, before the typing. type types one character every 35 ms. When the typing would run so long that the next step acts late (a glide that sets off late shrinks to half its length, which absorbs a little), the render warns (typing "…" (24 characters, 0.84 s) runs until 2.14 s, after step 1 … is due to start at 1.68 s): that step would start late, so start typing on an earlier word, or shorten the text.
  • check. Ticks a checkbox or switch: the cursor glides to it, and it is clicked only when it is not already checked, so a re-render over seeded data that already has it ticked stays the same. The recording fails when it is still unchecked afterwards (scene "<id>" step <i>: <sel> is not checked after the click). sel must be the element that carries the state: the <input type=checkbox> itself, or the element with role="switch" (or role="checkbox") and aria-checked, not a label or a wrapper around it.
  • upload. Chooses a file the way a viewer would: the cursor glides to sel (the button, label or drop zone that opens the file chooser) and clicks it on the cue, and the file chooser that opens is answered with file (no dialog shows in the video). sel must be something visible that opens the chooser when clicked, not a hidden <input type=file>; a click that opens no chooser within 2 s fails the recording (clicking "<sel>" opened no file chooser; point sel at the button, label or drop zone that opens it). The files' contents are part of the cache key, so changing a file records the scene again. upload works in app.login too.
    - { cue: attach, do: upload, sel: ".dropzone", file: ./files/quote.pdf }
    
  • press. Presses a key (text, default Enter).
  • scroll. With sel, scrolls the element into the middle of the view (in whatever container scrolls it). With by or to, scrolls the window; with none of them, it scrolls the window down by most of a screen. by and to do not move a scroller nested inside the page (a scrolling panel or table): use sel on an element inside it. A by or to scroll that leaves the window where it was fails the recording, naming the likely nested scroller.
  • zoom. Eases the view in to the element (0.7 s), holds it for ms (default 2 s) or until the unzoom that closes it, then eases out. A zoom ended by an unzoom may not also set ms. The zoomed region keeps the frame's 16:9 shape, magnifies at most 2.5×, keeps 24 px of space around the target, stays inside the frame, and shows a declared nav whole or not at all. A target too big to need a zoom gets the full frame. When holding a declared nav whole is what makes the region the full frame (a large pad reaching a top bar, say), render and preview print a warning: scene "<id>" step <i>: zoom on <sel> became the full frame because it holds nav <nav> (see troubleshooting). When a caption finds no free position while a zoom is held, render and preview warn before composing: zoom on <sel> leaves no caption position free (its target fills N% of the zoomed height).
  • unzoom. Eases the zoom out, starting on its cue (it needs a zoom step before it in the scene, or the scene's own zoom, which it then ends). It has no sel. Use it to end a zoom on a word ("…comes first") instead of after a fixed ms.
  • ring. Draws a highlight ring around the element. A ring fades out early when its element is removed or hidden (a drawer that closes), so it never floats over what comes next. The element is scrolled into view first, unless it already shows in part and is taller than the screen, or an earlier ring is still showing (scrolling would move the page under that ring): then the ring runs off the screen's edge and the render warns (ring target "<sel>" is taller than the screen …); ring a smaller part, such as the card's heading.
  • park. Glides the cursor to a spot out of the way (at, default cursor.park). Not allowed on phone scenes, which have no cursor (use wait to hold). Parking also happens by itself; see cursor.
  • goto. Opens a path in the app.
  • wait. Pauses.

The first pointer step of a scene that comes too soon after the scene starts for a glide is pre-positioned: the cursor is already on its target from the first frame, and the action fires on its cue. On a phone scene, a pre-positioned first tap's touch indicator appears at the tap without fading in.

A step without a cue starts with the step before it (plus that step's ms), but never acts before that step does: a faster glide waits, and a ring or key press after a click comes once the click has landed. A first step without a cue acts 0.2 s into the scene, once the take has started. Only steps with a cue are checked for sync by the audit, so give a cue to every step a viewer should see happen on a word.

Once the voice is made, and before anything is recorded, every scene's steps are checked against their times. Each problem is named, all at once, with what to change (see troubleshooting):

  • a step that would act in the scene's first 0.12 s (a click on a first word at 0 s), while the flash marker that starts the take still shows;
  • a step that would act before the step listed above it (steps run in the order they are listed).

Two more cases are warnings, and the render goes on: a step that acts between 0.12 and 0.2 s (it usually records, but may still fall inside the flash marker), and a step that acts after the scene ends (its narration plus a short breath), which is not shown.

Before each step the recorder waits for the page to settle: no document, XHR or fetch requests in flight, a stable layout, and no visible loading indicator ([aria-busy=true], [role=progressbar] without a value, .is-loading, .skeleton or [data-scenecast-loading]). The wait never makes a cued step late for a page that is merely busy: from 0.15 s before the step is due (and at least 0.35 s after the step before it), only a page still loading a document or showing a loading indicator holds it up, and data requests or a layout still moving no longer do. A step without a cue has no word to be late for, so it always waits for the page to settle (a ring after a click that loads a drawer's content is measured on the loaded drawer). Open panels ([role=dialog], [role=menu], [role=listbox], [aria-modal=true], [data-scenecast-panel], or a selector in app.panels) are measured so captions keep clear of them.

cursor

Field Default Meaning
start center Where the cursor is when a scene starts. A scene's own cursor overrides it.
park right Where the cursor parks between distant pointer steps, or off.
parkAfterSec 2.5 Park when the next pointer step, or the scene end, is more than this many seconds after a pointer action.

A spot is center, left, right (96 px in from that edge, at 45% of the height, clear of the caption bands) or { x, y } in viewport CSS pixels. The park glide starts 0.6 s after the action, or when it ends (typing done), whichever is later, and never runs into the next glide. Only the drawn cursor parks: the real mouse stays where it was, so a menu that opens on hover stays open. Set park: off for the v1 behaviour.

phone scenes

A scene with viewport: phone is recorded at 390×844 with touch input, and drawn in a phone outline on the brand stage (brand.background). With phone.align: left (the default) the phone's centre is at 30% of the frame width, with captions in a column beside it; right puts it at 70%; center is the v1 layout, with captions below.

  • A tap has no glide: a 34 px touch indicator in brand.accent fades in 0.25 s before the tap, taps on the cue, and fades out. brand.accent may be any CSS colour; one that is not a colour warns and falls back to #F5C518.
  • park steps are not allowed (there is no cursor).

Captions

Captions come from the narration, shown as a sequence of rounded boxes of at most 2 lines of about 42 characters. A phrase is cut at clause punctuation (, : ; — .) first, never right after a function word ("the", "to", "your", …), and never between a possessive and its noun. The same holds for the line break inside a caption: rather than end a line on "your", the caption moves the word down, rebalancing its lines, or adds a caption when its lines would otherwise run past 42 characters. Two more breaks are treated the same way: between a hyphenated word and the word it leads into ("to-do / list"), and before a function word that ends a clause ("asked / for, Open"); a function word that ends a clause may end a line ("asked for, / Open"). Only a phrase that cannot be cut any other way breaks there.

Each caption takes the first position that covers nothing it must keep clear (the target, the cursor's destination, a ring, an open panel), trying bottom, top, bottom-left, bottom-right, top-left and top-right in that order. During a zoom they are placed against what is on screen at that moment. A box that covers 90% or more of the screen as shown (a whole-page container, say) is not kept clear, since nothing could avoid it. On a phone scene with the phone at the side, captions go in the column beside the phone (up to 30 characters a line, 3 lines), and fall back to the bottom or top when that column is blocked. The same text is written to <output>.srt.

Output

scenecast render video.yaml writes, in out/ (or --out <dir>):

  • <output>.mp4: 1920×1080, 30 fps, H.264 with AAC audio, loudness-normalised to −16 LUFS.
  • <output>.srt: the captions.
  • chapters.txt: HH:MM:SS Title for each scene.
  • audit/: audit-table.md, audit.json, contact-sheet.png and frames/. See the audit guide.

Intermediate files go to work/<id>/ (or --work <dir>). Each stage there is reused when its inputs have not changed. A render (or preview) locks that folder while it runs (work/<id>/.lock, holding its pid): a second render of the same video into the same folder stops at once with work dir <dir> is in use by another render (pid <pid>). The lock is removed when the render ends, fails or is stopped; one left by a process that is gone is taken over.

Render complete? Read every moment.

Read the audit guide