OBS WebSocket icon

OBS WebSocket

Control OBS Studio via WebSocket

Screenshot → Save Screenshot

AI-generated

Summary

Save a screenshot image file of a specified source in OBS Studio with customizable image format and dimensions.

Inputs

  • Source Name (required) — Specify the exact name of the source you want to take a screenshot of in OBS.
  • Image Format — Select the image format of the screenshot file, either PNG or JPG. Defaults to PNG.
  • File Path (required) — Provide the full file system path including the filename where the screenshot image will be saved.
  • Image Width — Optionally set the width of the screenshot image in pixels; use -1 to use the source's native width. Defaults to 1920.
  • Image Height — Optionally set the height of the screenshot image in pixels; use -1 to use the source's native height. Defaults to 1080.

Output shape

a JSON object indicating success or failure including source name, saved file path, and image format

The output confirms the screenshot was saved with details: sourceName, filePath, format, and a success message. Errors are handled via standard n8n error handling.

Examples

Example 1: Save a PNG screenshot of the source 'Camera1' at 1280x720 pixels

Set Source Name to 'Camera1', Image Format to PNG, File Path to '/screenshots/camera1.png', Image Width to 1280, and Image Height to 720.

Example 2: Save a JPG screenshot using the source's native dimensions

Set Source Name to the target source, Image Format to JPG, File Path to desired location, and set Image Width and Height to -1.

Discussion