Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For Puppeteer’s built-in screen recorder, call await recorder.stop() on the ScreenRecording returned by page.record(). If you want a video file, set its path when starting the recording, then stop it before closing the browser.

Stop a built-in Puppeteer recording

The current Puppeteer API starts a recording with page.record(). It returns a Promise<ScreenRecording>; await that promise, keep the returned recorder, and call its stop() method when recording is finished. The Puppeteer Page.record() reference documents the API and an MP4 file example.

const recorder = await page.record({ path: 'recording.mp4' });

// Perform the browser actions you want to record.

await recorder.stop();
await browser.close();

Stopping before browser.close() lets Puppeteer finish the recording operation before the browser shuts down. The ScreenRecording reference describes stop() as the method that stops the screen recording.

Save the recording when you stop it

For the built-in recorder, provide the output path in the options passed to page.record(), not in the later stop() call. The official example uses recording.mp4; Puppeteer documents the output as an MP4 video stream. Use a path writable by the process running your script.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check which recorder API your code uses

Current built-in API: page.record()

If your code calls page.record(), stop the returned object with await recorder.stop(). This is the current built-in entry point in the Puppeteer reference.

Older built-in API: page.screencast()

Some older examples use page.screencast() and likewise stop the returned recorder with await recorder.stop(). Puppeteer’s next documentation labels Page.screencast() obsolete and directs users to Page.record(). That documentation describes the older method as WebM with VP9 at 30 FPS by default, available in Chrome 153+ and requiring ffmpeg. Check the documentation for the Puppeteer version installed in your project before adopting an older snippet.

Third-party puppeteer-screen-recorder package

The third-party wrapper has its own PuppeteerScreenRecorder object. Its documented flow is to call await recorder.start(savePath) (or startStream) and later await recorder.stop(). Follow the wrapper’s API for the object it creates rather than mixing it with Puppeteer’s built-in page.record() recorder. The package details are less firmly verified than the official Puppeteer API; consult the package’s current documentation for the version you use.

Troubleshoot recorder.stop()

  • stop is missing: Check what value you stored in recorder and how recording starts. With the built-in API, await page.record() and retain its returned ScreenRecording. If you use the third-party wrapper, make sure the value is its recorder object.
  • The browser closes before recording finishes: Await recorder.stop() before calling browser.close().
  • No output file appears: For built-in recording, specify path in the page.record() options, and verify that the path is writable.
  • An older example does not match your installation: Confirm the installed Puppeteer version and whether your code uses page.record() or the obsolete page.screencast() entry point. Do not assume their output formats or requirements are interchangeable.
  • Wrapper methods do not match the example: Verify that the package and version are puppeteer-screen-recorder; its separate start/stop flow is not the built-in Page API.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If you need a website screenshot rather than a video of browser actions, ScreenshotNeo takes a screenshot or PDF with one GET request. See the API documentation for parameters.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie banners, newsletter popups and chat widgets before capture; bot checks, blank pages and failed loads are not billed. Its MCP server lets AI agents take screenshots. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.

Sign up for ScreenshotNeo and get 1,000 free screenshots a month with no card.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.