stagehand_demo_video
Record a narrated demo video of a browser automation script. Executes each step, captures screen frames, and adds spoken narration to produce a single MP4.
Instructions
Record a narrated demo video of a known-good Stagehand script. Each action runs through stagehand.act with a CDP screencast attached; per-action narration is generated via OpenAI TTS; per-segment mp4s are concatenated into a single final.mp4. Uses the active Stagehand session — make sure the page is at the desired starting state before calling. Requires OPENAI_API_KEY.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| voice | No | OpenAI TTS voice id. Default: 'alloy'. | |
| actions | Yes | Ordered list of {instruction, narrate} pairs. Each action runs through stagehand.act and becomes one narrated segment of the final video. | |
| maxWidth | No | Screencast capture max width. Default: 1280. | |
| maxHeight | No | Screencast capture max height. Default: 720. | |
| outputDir | No | Absolute directory to write the mp4 (and any intermediates). Defaults to a unique subdir under the OS temp dir. | |
| trailingDelay | No | Milliseconds to wait after each action before recording its end timestamp. Default: 1000ms. Lets in-flight CDP frames arrive. | |
| keepIntermediates | No | If true, keep the per-segment audio + mp4 + frame PNGs alongside final.mp4. Default: false (cleaned up). |