Overview
This node allows you to capture a website either by recording a video or taking a screenshot using Puppeteer and the puppeteer-screen-recorder library. It launches a headless browser, navigates to the specified URL, and performs the chosen capture mode.
Common scenarios:
- Creating tutorial or demo videos of web pages.
- Automatically capturing screenshots for monitoring website changes.
- Archiving visual states of websites at specific times.
- Generating media content for reports or presentations.
Practical examples:
- Record a 10-second video walkthrough of a landing page to share with marketing teams.
- Take a full-page screenshot of a news site homepage every day for archival.
- Capture a screenshot of a dynamically generated dashboard for automated reporting.
Properties
| Name | Meaning |
|---|---|
| Mode | Choose between "Video Recording" or "Screenshot". |
| URL | The website URL to record or capture. |
| Width | Viewport width in pixels. |
| Height | Viewport height in pixels. |
| Duration | (Video only) Length of the video recording in seconds. |
| Frame Rate | (Video only) Frames per second for the video recording. |
| Image Format | (Screenshot only) Format of the screenshot image: PNG, JPEG, or WEBP. |
| Full Page | (Screenshot only) Whether to capture the entire scrollable page or just the viewport. |
| Output File Name | Desired name of the output file. If empty, a timestamp-based name is used. |
| Video Format | (Video only) Format of the output video file: MP4, AVI, WEBM, or MOV. |
| Video Quality | (Video only) Quality setting for the video from 1 (lowest) to 100 (highest). |
| Follow New Tabs | (Video only) Whether to follow and record new tabs opened during recording. |
| Initial Delay | Time in seconds to wait before starting the capture or recording. |
| Scale | Scale factor for the browser viewport, e.g., "100%", "125%", "75%" or numeric equivalents like 1, 1.25. |
Output
The node outputs an array of items, each containing:
json: Metadata about the capture:
success: Boolean indicating if the operation succeeded.mode: Either"video"or"screenshot".file: The output filename including extension.format: The file format (video or image).duration: (Video only) Duration in seconds.widthandheight: Dimensions of the viewport.frameRate: (Video only) Frame rate used.initialDelay: Delay before capture started.scale: Scale factor applied.url: The captured URL.fullPage: (Screenshot only) Whether full page was captured.
binary.data: The actual media file data (video or image) encoded as binary, ready for further use or saving.
Dependencies
- Requires Puppeteer to launch and control a headless Chromium browser.
- Uses the
puppeteer-screen-recorderpackage for video recording functionality. - Node.js environment must have access to
/tmpdirectory or equivalent for temporary file storage. - Optional environment variable
PUPPETEER_EXECUTABLE_PATHcan specify a custom Chromium executable path. - No explicit API keys or external services are required.
Troubleshooting
- Invalid scale factor error: Occurs if the scale property is not a valid positive number or percentage string. Ensure scale is set correctly (e.g., "100%", "1", "1.25").
- Timeout navigating to URL: If the page does not load within 10 seconds, the operation fails. Check URL correctness and network connectivity.
- File write/read errors: Temporary files are stored in
/tmp. Ensure the process has write permissions and sufficient disk space. - Video recording issues: If the video codec or format is unsupported on your system, try changing the video format or quality settings.
- Headless browser launch failures: May require additional dependencies or sandbox disabling flags depending on the environment (Docker, Linux servers).