Save Replay
save_replaySave the last N seconds of a running replay buffer to an MP4, preserving a recent screen segment while the buffer keeps recording.
Instructions
Save the last N seconds of a replay buffer (start_recording replayBufferSec) to an mp4; the buffer keeps running.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>"
},
"name": "save_replay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | No | Output .mp4 path (default under SCREENCAST_HOME/recordings). | |
| lastSec | No | Seconds back from now (default and max: the buffer length). | |
| reencode | No | Frame-exact re-encode. Default: instant stream copy that may hide up to 2 s of earlier frames. | |
| overwrite | No | Replace an existing output. | |
| sessionId | Yes | Session id of a replay buffer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sessionId | Yes | ||
| outputPath | Yes | ||
| durationSec | Yes |