Skip to content
urdidourdidoDocs

Record scenes

Nothing on screen in an urdido video is staged. A scene is the product working on a clean instance, a terminal is a real session run and replayed, and a quoted page is the page as it is served. This guide records each of them from the declaration.

[[record.step]] entries declare the commands that record a video’s scenes:

Terminal window
urdido record video.toml

It runs them in order, stops at the first failure, and leaves the last complete recording untouched. --list shows the steps and what a failed run left, and --from <step> resumes a failed run at that step.

Terminal window
urdido instance fresh video.toml <name>

A recording runs against a product instance the declaration names: a Compose fixture, or one docker run written exactly as a person types it, so a scene that shows the start shows the command that really ran. The actions are plan, up, fresh, reset, down and status. It needs Docker, and stops by name when Docker is missing.

Declare what to type under [terminal.scenes.<scene>] commands. Then:

  1. urdido terminal video.toml runs each command for real in a cleared folder and keeps what it printed. [terminal] keep trims a long output to the lines worth reading.
  2. node film-terminal.mjs terminal/session.json footage/terminal, from the urdido-record npm package, types each command and shows its output in the terminal replay’s window.

Declare both as [[record.step]] entries and urdido record makes them in order. A command that fails refuses the session, and the shot under a line is terminal:<scene>.

Declare the page under [page.scenes.<name>], with its url and the sentences to find:

[page.scenes.post]
url = "https://example.org/the-post"
find = ["The first sentence quoted.", "The second one."]
hold = 2.5

urdido page video.toml (or --scene post for one) opens the published page in a browser and films it with each sentence found and highlighted, into footage/page/<name>.webm; the shot is page:<name>. A sentence the page no longer prints stops the film, so a quote that drifted from its source is never filmed.

Terminal window
urdido footage footage/src/clip.mp4

It measures the clip’s shot cuts, black and still stretches in one pass and keeps them beside it as clip.mp4.index.json, keyed by the file’s hash. A shot whose start is "auto" reads that index, so a clip is measured again only when it changes.

Terminal window
urdido footage footage/src/clip.mp4 --describe

--describe also asks the local vision model polyweave runs (its [vision] model, never a paid service) what the middle frame of each shot shows and which words are on it, and keeps the answers in the index. A shot that names what it wants ("at": { "find": ... }) asks the same on its first plan, so the flag only shows you the descriptions ahead of time.

A store trailer ends on a card: the logo, the price, the store badges. The index records where that card starts (end) and how it was found. urdido cuts before it only when it can trust the answer:

Found by How Used
eye You confirmed it, below Yes
described The vision model describes the last shots as a logo, title or store card Yes
still A still picture holds from inside the last 25 seconds to the end Yes
scene The last cut or black frame 25 to 4 seconds from the end No: shown as a hint

A trusted card is never played: an "auto" start, an explainer shot’s footage and a clip looped under a card all stop before it. urdido footage <clip> prints what it found. Confirm it, or say the clip has none:

Terminal window
urdido footage footage/src/clip.mp4 --end 68.9
urdido footage footage/src/clip.mp4 --end none

A confirmed answer is kept until the file changes.