Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

How to Stop a Puppeteer Screen Recording

Call await recorder.stop() on the ScreenRecording returned by page.record(), then close the browser. Set the output path when the recording starts.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For Puppeteer’s built-in recorder, call await recorder.stop() on the ScreenRecording returned by page.record(). If you want a file, pass its path when recording starts, and stop the recorder before closing the browser.

Stop a recording started with Puppeteer’s current API

The current Puppeteer API starts a screen recording with page.record(). It returns a recorder object; keep that value and await its stop() method when the actions you want to capture are complete.

As an Amazon Associate I earn from qualifying purchases.

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

// Perform the browser actions to record here.

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

This follows Puppeteer’s Page.record() example: the path is supplied at recording start, and stopping is awaited before the browser closes. The API records through Chrome DevTools Protocol’s Page.startScreenRecording and produces an MP4 video stream.

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

Save the recording when you stop it

Set path in the options passed to page.record(), such as { path: 'recording.mp4' }. Then call await recorder.stop() to end the recording. The official example uses this order; do not close the browser before stopping the recorder.

Check which recording API created your recorder

Built-in current API: page.record()

Use the returned ScreenRecording object and call its stop() method. Puppeteer’s ScreenRecording reference describes stop() as stopping the screen recording.

Older built-in API: page.screencast()

If older code starts recording with page.screencast(), it also awaits recorder.stop(). However, Puppeteer’s next documentation labels Page.screencast() obsolete and directs users to Page.record(). That documentation describes the older method as working in Chrome 153 and later, producing WebM with VP9 at 30 FPS by default, and requiring ffmpeg. Check your installed Puppeteer version and its API rather than assuming an older snippet applies.

Third-party wrapper: puppeteer-screen-recorder

The separate puppeteer-screen-recorder package has its own PuppeteerScreenRecorder object. Its documented pattern is to await recorder.start(savePath) (or startStream) and later await recorder.stop(). Follow the wrapper’s own API; its recorder is not the built-in ScreenRecording returned by page.record().

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

Why recorder.stop() may not exist

  • You stored a different value. Confirm the variable contains the object returned by the recording method, rather than a page, browser, or unrelated promise.
  • Your code uses a different recorder API. Identify whether recording starts with page.record(), legacy page.screencast(), or the third-party wrapper. Their setup and recorder objects are distinct.
  • Your installed version differs from the example. Check the Puppeteer version and the documentation for that version. Current and next documentation distinguish page.record() from obsolete page.screencast().

Troubleshoot a recording that does not save or stop cleanly

  1. Find the start call. Look for page.record(), page.screencast(), or the wrapper’s start(). This identifies which stop method and recorder object to use.
  2. Keep the returned recorder. For built-in recording, assign the awaited result of page.record() to a variable, then call await recorder.stop().
  3. Supply a file path at start. For the current built-in example, pass path: 'recording.mp4' in the page.record() options.
  4. Stop before browser close. Await recorder.stop() before browser.close(), as in Puppeteer’s official example.
  5. Match the method to the package. For puppeteer-screen-recorder, use the object created by that package and its documented start/stop flow rather than mixing it with 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 still screenshot or PDF rather than a video recording, ScreenshotNeo takes them with one API request. For example, this cURL command saves a screenshot of Stripe as WebP:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

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

Sign up free for 1,000 screenshots a month, with no card required.

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.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.