record_video
Records browser screen to MP4 or GIF using CDP screencast. Start and stop recording with customizable resolution, quality, and frame rate.
Instructions
Control video recording for the current browser session.
Records the browser screen using CDP screencast and encodes to MP4 or GIF. Requires ffmpeg for video encoding: install imageio-ffmpeg (pip install 'imageio-ffmpeg') or have ffmpeg on your system PATH. Without it, raw JPEG frames are saved instead.
Args: session_id: Active session ID. command: start: begin recording. stop: stop and encode video. status: check recording state. max_width: Maximum video width in pixels. Default: 1920. max_height: Maximum video height in pixels. Default: 1080. quality: JPEG frame quality (1-100). Default: 95. target_fps: Target frames per second (approximate). Default: 15. output_format: Output encoding format when stopping. "mp4" (default) or "gif". GIF uses palette-optimized encoding at 10fps/800px width for README-embeddable demos.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| command | Yes | ||
| max_width | No | ||
| max_height | No | ||
| quality | No | ||
| target_fps | No | ||
| output_format | No | mp4 |