OBS WebSocket icon

OBS WebSocket

Control OBS Studio via WebSocket

Screenshot → Take Screenshot

AI-generated

Summary

Capture a screenshot of a specified source in OBS Studio, returning the image data in the desired format and size.

Inputs

  • Source Name (required) — Specify the name of the source to capture a screenshot from.
  • Image Format — Select the image file format (PNG or JPG) for the screenshot. Defaults to PNG.
  • Image Width — Set the width of the screenshot. Use -1 to capture at the source's original width. Defaults to 1920.
  • Image Height — Set the height of the screenshot. Use -1 to capture at the source's original height. Defaults to 1080.

Output shape

a single JSON object per input item

The returned JSON includes success status, the source name, the base64-encoded imageData string, and the image format used. No file is saved to disk with this operation.

Examples

Example 1: Take a screenshot of a camera source named "Camera1" in PNG format at full resolution.

Set 'Source Name' to 'Camera1', 'Image Format' to 'PNG', 'Image Width' and 'Image Height' to -1.

Discussion