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.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Use the Chrome DevTools Protocol (CDP) method Page.captureScreenshot. It returns an image in the data field as a base64-encoded string. Send that method through an existing CDP connection—or through Chrome DevTools Protocol Monitor—not as a shell command. Decode the returned string and write the bytes to a PNG, JPEG, or WebP file.

This guide covers Protocol Monitor, raw WebSocket clients, viewport and full-page captures, clipping, encoding options, troubleshooting, and an API alternative.

What Page.captureScreenshot does

The Page domain’s Page.captureScreenshot method is described by Chrome as “Capture page screenshot.” A successful response has a data property containing base64-encoded image data. Your client decides how to decode and save those bytes.

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

The method accepts these documented controls:

Option Purpose Important detail
format Selects png, jpeg, or webp. PNG is the default.
quality Controls lossy JPEG quality. Integer from 0 through 100; it does not describe PNG quality.
clip Captures a rectangle. Uses x, y, width, height, and scale in a Page.Viewport object.
captureBeyondViewport Requests content beyond the current viewport. Documented default is false; the tip-of-tree reference marks it experimental.
fromSurface Captures from the rendering surface rather than the view. Documented default is true.
optimizeForSpeed Requests faster image encoding. Documented default is false; faster encoding can produce a larger file.

Tip-of-tree protocol documentation can differ from the Chrome build you run. Check the protocol definition and behavior bundled with your target version, especially for experimental fields.

#1 Best Overall
Audio Express AXHDCAP 4K HDMI Video Capture Card, Cam Link Card Game Audio Adapter HDMI to USB 2.0 Record Capture Device for Streaming, Live Broadcasting, Video Conference, Teaching, Gaming
  • [Enhanced 4K-1080P Video Capture Experience] Capture the Magic: Elevate your video recordings to new heights with our upgraded anti-static 1080P Video Capture Card. Immerse yourself in stunning visuals, supporting HDMI input at 4K 60FPS and USB output for capturing in 1080P, complete with rich stereo sound. Enjoy crystal-clear video recordings, dynamic gaming live streams, and professional conference broadcasts. Note: HDMI resolution: Max input can be 3840×2160@30Hz / Video output resolution: Max output can be 1920×1080@30Hz
  • [Seamless Real-Time Preview] Stay in the Moment: Our advanced ultra-low latency technology ensures seamless real-time transmission of video streams. Experience instant, lag-free previews, allowing you to capture every detail precisely. Effortlessly record video directly to your hard disk, all without compromising on quality or introducing any delays.
  • [Versatility and Broad Compatibility] Your Creative Hub: Connect your DSLR, camcorder, or action camera to a wide range of operating systems, including Windows, MacOS, and Linux. Unlock a world of possibilities with real-time streaming to popular platforms like Twitch, Youtube, OBS, Zoom, Potplayer, and VLC, giving you the tools to share your content effortlessly.
  • [Effortless Plug and Play] Simplicity Redefined: Say goodbye to complex installations. Our plug-and-play design eliminates the need for drivers or external power supplies. Seamlessly integrate high-definition acquisition into various scenarios, whether it's educational recordings, immersive gaming, precise medical imaging, captivating live streams, or professional broadcasting.
  • [Seize Every Detail with Precision] Unleash your creativity and attention to detail with our video capture card. Capture every nuance, every color, and every moment with precision, thanks to the enhanced capabilities of our technology. Whether you're a content creator, a gamer, or a professional, our capture card empowers you to seize the finest elements and bring them to life in your recordings and live streams.

Fastest route: DevTools Protocol Monitor

  1. Open the page in Chrome and open DevTools with More tools → Protocol monitor. If Protocol Monitor is not visible, open the DevTools command menu and search for it.
  2. Start a command entry and choose the Page domain and captureScreenshot method.
  3. Send parameters such as {"format":"png"}, or send an empty object for defaults.
  4. Inspect the response’s data value. It is base64 text, so decode it before saving a file.

Protocol Monitor is useful for learning the exact JSON exchanged by DevTools. It also avoids writing a WebSocket client for a one-off capture.

Send the command over CDP

A CDP client first connects to a page target, enables the Page domain when required by its workflow, then sends a request with an incrementing numeric identifier. The request body is JSON:

{"id":1,"method":"Page.captureScreenshot","params":{"format":"png"}}

The response associates the same id with a result:

{"id":1,"result":{"data":"iVBORw0KGgoAAA..."}}

Decode only the result.data string. Do not save the base64 characters themselves as an image.

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

Python example using a CDP WebSocket

This script uses the websocket-client package and Chrome’s local debugging endpoint. Start Chrome with remote debugging enabled, then replace the target URL and WebSocket URL with the values returned by Chrome’s debugging endpoint.

import base64
import json
import websocket

ws = websocket.create_connection("ws://127.0.0.1:9222/devtools/page/TARGET_ID", timeout=30)
next_id = 1

def call(method, params=None):
    global next_id
    request = {"id": next_id, "method": method}
    if params is not None:
        request["params"] = params
    current_id = next_id
    next_id += 1
    ws.send(json.dumps(request))
    while True:
        message = json.loads(ws.recv())
        if message.get("id") == current_id:
            if "error" in message:
                raise RuntimeError(message["error"])
            return message["result"]

call("Page.enable")
result = call("Page.captureScreenshot", {"format": "png"})
with open("shot.png", "wb") as image:
    image.write(base64.b64decode(result["data"]))
ws.close()

Install the dependency with python -m pip install websocket-client. The script waits through unrelated CDP events until it receives the response matching its request id.

Rank #2
Capture Card, 4K HDMI Video Capture Card, Game Capture Card, 1080P 60FPS Video Capture Device, HDMI to USB 3.0 Capture Card for Streaming, Work with Camera/Xbox/PS4/PS5/PC/OBS
  • 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
  • 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
  • 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
  • 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
  • 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.

Node.js example using the ws package

import WebSocket from 'ws';
import { writeFile } from 'node:fs/promises';

const ws = new WebSocket('ws://127.0.0.1:9222/devtools/page/TARGET_ID');
let id = 0;
const pending = new Map();

function call(method, params = {}) {
  return new Promise((resolve, reject) => {
    const requestId = ++id;
    pending.set(requestId, { resolve, reject });
    ws.send(JSON.stringify({ id: requestId, method, params }));
  });
}

ws.on('message', async raw => {
  const message = JSON.parse(raw.toString());
  if (!message.id || !pending.has(message.id)) return;
  const { resolve, reject } = pending.get(message.id);
  pending.delete(message.id);
  message.error ? reject(message.error) : resolve(message.result);
});

ws.on('open', async () => {
  try {
    await call('Page.enable');
    const result = await call('Page.captureScreenshot', { format: 'png' });
    await writeFile('shot.png', Buffer.from(result.data, 'base64'));
    ws.close();
  } catch (error) {
    console.error(error);
    ws.close();
    process.exitCode = 1;
  }
});

Install the WebSocket client with npm install ws. Run the file as an ES module, and substitute the page target’s WebSocket URL.

Capture a region with clip

Pass a clip object when you need a rectangle rather than the whole viewport:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{
  "format": "png",
  "clip": {
    "x": 100,
    "y": 200,
    "width": 800,
    "height": 500,
    "scale": 1
  }
}

The coordinates and dimensions are device-independent pixels. A scale above 1 can increase output pixel density; verify the resulting dimensions in your image pipeline. Coordinates are relative to the page’s layout in the target viewport, so scrolling, zoom, emulation, and dynamic content can change what falls inside the rectangle.

Viewport, device emulation, and full-page captures

Set a viewport before capturing

For reproducible mobile or desktop output, configure metrics first with Emulation.setDeviceMetricsOverride, then capture:

{
  "mobile": false,
  "width": 1440,
  "height": 900,
  "deviceScaleFactor": 1
}

The DevTools guide demonstrates this sequence, but it is an example rather than a universal device preset. Choose dimensions that match your test case and clear or replace the override when the session is complete.

Rank #3
Guermok Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P 60FPS & 2K 30FPS
  • 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
  • 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
  • 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
  • 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
  • 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0

Request content beyond the viewport

Set captureBeyondViewport to true when you need a full-page-style image:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
{"format":"png","captureBeyondViewport":true}

The option’s documented default is false and it is experimental in the current tip-of-tree reference. Chromium behavior can use the actual page content size, so the resulting image may not equal the nominal viewport dimensions. Inspect the file’s width and height instead of assuming them.

Long pages can contain lazy-loaded images, sticky elements, animations, or content that changes while the capture is taken. For stable automation, wait for the page’s own ready condition, disable or freeze animations with page code when appropriate, and capture after layout has settled.

Choosing format and encoding

  • PNG: lossless and the default; suitable for text, interfaces, and pixel comparisons.
  • JPEG: useful when smaller lossy files are acceptable. Set quality from 0 to 100; this setting is documented for JPEG, not PNG.
  • WebP: supported by the protocol and often useful when your consumer accepts it.
  • optimizeForSpeed: set to true when encoding latency matters more than file size. The documented default is false.

There is no benchmark in the protocol definition that predicts your exact file size or capture time. Measure with your pages, viewport, format, and Chrome build.

Common failures and fixes

“Method not found” or an unknown parameter

Your Chrome build or target protocol may not support a tip-of-tree field. Remove experimental options first, then consult the protocol definition exposed by your target build. Keep the basic call—Page.captureScreenshot with format—as the compatibility baseline.

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

No image file or an unreadable file

Confirm that you decoded result.data from base64 and opened the output in binary mode. Saving the JSON response or base64 text directly will not create a valid image.

Rank #4
Video Capture Card, 4K USB3.0 HDMI to USB C, 1080P60FPS HDMI Capture Card for Streaming, Gaming, Video Recording Compatible with Switch, Xbox, PS4/5, OBS,iPad Mac OS Windows,Camera, Zoom(Silver)
  • 【4K HDMI Input, 2K@30Hz Recording】Powered by a true USB 3.0 high-speed interface, the capture card supports up to 4K@30Hz HDMI input and records at 2K@30Hz or 1080P@60Hz. Perfect for gamers, streamers, and professionals who need crisp, smooth video for live streaming, gameplay recording, or online meetings.
  • 【Ultra Low Latency Screen Sharing】Built with a premium aluminum alloy shell and advanced chipset for stable heat dissipation, ensuring ultra-low latency transmission. Capture high-quality video and dual-channel audio in real time—no lag, no frame drop—ideal for Twitch, YouTube, or OBS streaming.
  • 【Easy Plug and Play, Compact & Portable】No driver or external power required—just plug and play via USB 3.0 or Type-C connection to your Windows or macOS computer. Lightweight and compact design makes it easy to carry for outdoor streaming, live shows, or mobile recording setups.
  • 【Wide Compatibility & Multi-Device Support】Compatible with Windows 7 8 10 11, macOS, Linux,Android and supports most popular software such as OBS, Zoom, VLC, Twitch Studio, and more. Works seamlessly with PS4, PS5, Xbox, Switch, DSLR cameras, TV boxes, and other HDMI-output devices for streaming to YouTube, Twitch, etc.
  • 【What You Get】Includes: HDMI Capture Card, USB 3.0 to USB-C Adapter, User Manual. Tips: Make sure your tablet’s OTG function is enabled before connecting. Test your HDMI device with a monitor first to confirm video and audio output, then connect to the Video Capture Card for recording.

Blank or incomplete output

Capture after navigation and layout have settled. Check that the target page is the intended CDP target, wait for required selectors or application state in your client, and account for lazy content and animations. For a full-page request, inspect output dimensions and test whether your Chrome version implements captureBeyondViewport as expected.

The clip is offset or the wrong size

Recheck device-independent-pixel coordinates, viewport metrics, page zoom, and scroll position. A clip is not a CSS selector; resolve an element’s bounding rectangle in page code and pass its numeric geometry.

Connection or target errors

Make sure Chrome was started with remote debugging, that the WebSocket URL belongs to a page target rather than a browser-level endpoint, and that the target remains open. Handle CDP events separately from responses and match each response by its numeric request id.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

For a hosted capture, ScreenshotNeo provides a single GET request that returns PNG, JPEG, WebP, or PDF. It accepts cookie and consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and whether the request was billed. Its MCP server offers take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

Example cURL request (see the ScreenshotNeo documentation):

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

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is on every plan. Create a free ScreenshotNeo account.

Best Value
Capture Card 4K HDMI Video Streaming to USB 3.0 1080P 60FPS Capture Device
  • High-Quality Video Capture, 4K HDMI Capture Card Ready: Capture smooth and vibrant video with this 4K HDMI capture card, engineered for gamers and content creators who demand crisp 1080P 60FPS video quality. Whether you're streaming to Twitch or recording gameplay for YouTube, your footage will look professional and detailed
  • Plug-and-Play USB Capture Card, No Drivers Needed: Designed as a USB capture card for streaming, this device works instantly out of the box, just plug into your PC or laptop and start capturing. Fully compatible with popular software like OBS Studio, Streamlabs, and XSplit, making setup quick and stress-free for beginners and pros alike
  • Universal Compatibility PS5, Xbox, Switch & More: Stream or record gameplay from virtually any HDMI-enabled device including Nintendo Switch, PS5, Xbox Series X, DSLR cameras, and PCs. The video capture card for gaming supports seamless passthrough so you can play without lag while your audience watches every frame in real time
  • Low-Latency Performance for Smooth Streaming: This capture card for streaming minimizes delay between gameplay and broadcast, so you get reliable, low-latency capture that works well for competitive gaming, live broadcasts, and podcast sessions. Suitable for those building their channel with high-quality, engaging content
  • Compact & Portable Design for Content Creators: Lightweight and portable, this USB 3.0 capture card works well for creators who travel or switch gaming setups often. Throw it in your bag and stream or record wherever you are, at home, events, LAN parties, streaming or studio sessions

When CDP is the better choice

  • Use CDP when Chrome is already running in your test or automation process and you need precise control over targets, emulation, clipping, and protocol events.
  • Use a hosted API when you do not want to manage Chrome processes, WebSocket targets, page readiness, consent cleanup, or retry logic.
  • For either workflow, record the Chrome or service configuration, viewport, format, and capture parameters so later images can be compared fairly.

Frequently Asked Questions

Is Page.captureScreenshot a command-line command?

No. It is a CDP protocol method sent as JSON over a CDP connection or through DevTools Protocol Monitor.

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

What does the response contain?

The result contains a base64-encoded image string in the data field; decode it to obtain file bytes.

Can CDP save a screenshot directly to a filename?

The protocol returns encoded data. Your client must decode and write the bytes to a file.

Does captureBeyondViewport always produce the same full-page dimensions?

No. The option is experimental in the tip-of-tree reference, and implementations can size the image from actual page content. Inspect the resulting dimensions.

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.