# Playwright and FFmpeg, or a take: three ways to script a demo video

Playwright records what a script did. FFmpeg can cut and zoom it if you tell it where and when. A take keeps the clicks beside the video, so the zooms plan themselves and stay editable.

By [Hongbin Li](https://www.hongbinli.com/) · Updated November 2026

Ask an assistant how to have a coding agent record a product demo and the usual answer is: drive the page with Playwright, record the video, edit it with FFmpeg. That works, and for some jobs it is the right answer. This page says what each piece gives you, what is left for you to do, and how the same Playwright run can become an edited video without the hand work. (Disclosure: vosso is our product.)

## What each gives you

*Playwright video, Playwright with FFmpeg, and a vos take, checked 18 November 2026*

|  | Playwright video | Plus FFmpeg | A vos take |
| --- | --- | --- | --- |
| What it is | A recording of the page’s viewport, written when the context closes | The same file, cut and transformed by filters | The recording, the cursor’s track and the script’s steps, kept together |
| The pointer | An opt-in draws one between actions; off by default | Whatever the recording has | Drawn from the cursor’s track, so it is smooth and sharp inside a zoom |
| Zoom on each action | None | A zoompan filter, with the place and the time worked out by you | Planned from the clicks; each one a clip you can move or delete |
| Cutting the waiting | None | Trim and concat, by timestamps you find | Trims and speed changes on a timeline, or by the agent from the step list |
| Captions, music, a frame | None | Possible, each by its own filter | Titles per step, a music bed, a frame and a backdrop |
| Changing it later | Run the script again | Edit the command and run it again | Change a value in the edit; nothing is recorded again |
| After the next release | Run the script again, then edit again | The same, with new timestamps | Run the script again; the edit carries over |
| Browsers | Chromium, Firefox and WebKit | Any input file | Chromium |

Sources, read 18 November 2026: Playwright ([videos](https://playwright.dev/docs/videos) , [recordVideo options](https://playwright.dev/docs/api/class-browser) , [trace viewer](https://playwright.dev/docs/trace-viewer)) ; FFmpeg ([about](https://ffmpeg.org/about.html) , [filters](https://ffmpeg.org/ffmpeg-filters.html)).

## What Playwright records

Turn the video option on and Playwright records the page’s viewport, at 25 frames a second unless you raise it, scaled to fit 800 by 800 unless you set a size. The file is written when the browser context closes. It is a faithful record of what the script did, which is what a test wants.

Recent versions add an opt-in that highlights each action with an outline and a title, and draws a pointer that moves from one action to the next. That helps a reader follow a test. It is not an edit: the frame stays at full width, every wait is still there, and nothing tells the viewer where to look.

A **trace** is a different thing. It is a record you open in Playwright’s Trace Viewer: each action, DOM snapshots, the network, and a film strip of screenshots. It is not a video. But it knows exactly where and when every click landed, and that turns out to matter below.

## What FFmpeg adds, and what it costs

FFmpeg can crop, scale, zoom and pan, and join clips, each with a filter. What it cannot know is your product. For every zoom you give it a place and a time; for every cut, two timestamps. A thirty-second demo with eight zooms and four cuts is a long command, and when the interface moves by forty pixels the numbers are wrong. An agent can write that command. It writes it again after every change.

## Keep your Playwright run, and get the edit

If you already have the run, you do not have to choose. Record the video and the trace in the same run, then:

```
vos ingest video.webm --cursor trace.zip --out take
```

The video becomes the take’s footage, and the clicks in the trace, with their points and times, become its cursor track. From there the planner has clicks to zoom on, and the take opens in the same editor as any other. Without a trace there is no cursor track and nothing is planned; you place zooms by eye.

Or let the recorder drive the page itself. The script is a list of steps, close to what a test already says, and the take keeps each step’s time and place:

```
vos record --actions actions.json --url http://localhost:3000 --out take
```

See [record with the CLI](https://vos.so/docs/record/record-with-the-cli) and [the script’s reference](https://vos.so/docs/cli/actions-json).

## When Playwright and FFmpeg are the right choice

- **The video is evidence, not marketing.** A failing test for a bug report, a run attached to a pull request. Nobody needs a zoom.
- **You need Firefox or WebKit.** Playwright records all three engines; vosso records Chromium.
- **You want nothing new in the repo.** If your tests already use Playwright, its video costs one option.
- **The cut is one of a kind.** For a single film you will never make again, hand-tuned FFmpeg is as good as anything.

A take earns its place when the video is shown to people and has to be made again: every release, every changed screen. More on that in [a video for every release](https://vos.so/use-cases/release-videos), and the agent tools that do this are compared on [demo videos made by AI agents](https://vos.so/blog/ai-agents-product-demo-videos).

## Frequently asked questions

### Can Playwright record a video of my app?

Yes. Playwright records the page’s viewport when you turn the video option on; it is off by default, and the file is written when the browser context closes. Its docs give a default of 25 frames a second and a size scaled to fit 800 by 800 unless you set one.

### Does a Playwright video show the mouse cursor?

It can. Recent versions have an opt-in that highlights each action with an outline and a title and draws a pointer moving between actions. It is off unless you ask for it, so a plain recording shows the page changing with no pointer.

### How do I turn a Playwright recording into a product demo?

Two ways. By hand: use FFmpeg’s crop, scale, zoompan and concat filters, working out each zoom’s place and time yourself. Or hand the video and its trace to vos ingest, which reads the clicks out of the trace and plans a zoom for each, as an edit you can change.

### Is a Playwright trace a video?

No. A trace is a debugging record you open in the Trace Viewer: the actions, DOM snapshots, network requests and a film strip of screenshots. It is the best record of what a test did and where it clicked, which is exactly what a zoom needs to know.

### When is Playwright with FFmpeg the right choice?

When the video is evidence, not marketing: a failed test for a bug report, a run attached to a pull request. Also when you need Firefox or WebKit, or want no dependency beyond what your tests already use. It asks more work of you for every second that should look edited.

Something else? [hello@vos.so](mailto:hello@vos.so)

## Try it on a run you already have

Free. One command turns a Playwright video and its trace into an edit.

---

Source: https://vos.so/blog/playwright-ffmpeg-or-a-take
