Skip to content

Commit 27580ef

Browse files
author
Pete Hunt
committed
docs: explain contact sheet frame sampling
1 parent 1e9149a commit 27580ef

6 files changed

Lines changed: 24 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,8 @@ agent-browser state clean --older-than <days> # Delete old states
469469

470470
With recording `--cursor`, the pointer and click ripple render with the page, keeping drags synchronized in every captured frame. The temporary overlay is inert, hidden from accessibility snapshots, and removed when recording stops. Screenshots taken during the recording include it.
471471

472+
Contact sheets sample candidate frames at the rate set by `--fps`, so brief UI states between samples may not appear. The final captured frame is always considered.
473+
472474
### Navigation
473475

474476
```bash

‎cli/src/mcp.rs‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ fn parity_tools() -> Vec<Value> {
13961396
"description": "Capture rate in frames per second (default 30, max 60).",
13971397
},
13981398
"cursor": { "type": "boolean", "description": "Render a pointer and click ripple with the page so drags stay synchronized. The inert overlay is hidden from accessibility snapshots, included in screenshots while recording, and removed on stop." },
1399-
"contactSheet": { "type": "boolean", "description": "Export first, changed, and final frames as a timestamped PNG beside the video." },
1399+
"contactSheet": { "type": "boolean", "description": "Export first, changed, and final frames as a timestamped PNG beside the video. Candidate frames are sampled at fps, and the final captured frame is always considered." },
14001400
"contactSheetThreshold": { "type": "number", "minimum": 0, "maximum": 1, "description": "Changed-pixel ratio required to select a contact-sheet frame (default 0.05). Implies contactSheet." },
14011401
}),
14021402
&["path"],
@@ -1425,7 +1425,7 @@ fn parity_tools() -> Vec<Value> {
14251425
"description": "Capture rate in frames per second (default 30, max 60).",
14261426
},
14271427
"cursor": { "type": "boolean", "description": "Render a pointer and click ripple with the page so drags stay synchronized. The inert overlay is hidden from accessibility snapshots, included in screenshots while recording, and removed on stop." },
1428-
"contactSheet": { "type": "boolean", "description": "Export first, changed, and final frames as a timestamped PNG beside the video." },
1428+
"contactSheet": { "type": "boolean", "description": "Export first, changed, and final frames as a timestamped PNG beside the video. Candidate frames are sampled at fps, and the final captured frame is always considered." },
14291429
"contactSheetThreshold": { "type": "number", "minimum": 0, "maximum": 1, "description": "Changed-pixel ratio required to select a contact-sheet frame (default 0.05). Implies contactSheet." },
14301430
}),
14311431
&["path"],
@@ -4913,6 +4913,19 @@ mod tests {
49134913
tool["inputSchema"]["properties"]["contactSheet"]["type"],
49144914
"boolean"
49154915
);
4916+
let contact_sheet_description = tool["inputSchema"]["properties"]["contactSheet"]
4917+
["description"]
4918+
.as_str()
4919+
.unwrap();
4920+
for needle in ["sampled at fps", "final captured frame"] {
4921+
assert!(
4922+
contact_sheet_description.contains(needle),
4923+
"{} contact-sheet description should mention {}: {}",
4924+
name,
4925+
needle,
4926+
contact_sheet_description
4927+
);
4928+
}
49164929
let threshold = &tool["inputSchema"]["properties"]["contactSheetThreshold"];
49174930
assert_eq!(threshold["minimum"], json!(0));
49184931
assert_eq!(threshold["maximum"], json!(1));

‎cli/src/output.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2942,6 +2942,10 @@ With --cursor, an inert overlay renders the pointer and page together so
29422942
drags stay synchronized. It is hidden from accessibility snapshots and
29432943
removed on stop. Screenshots taken while recording include the overlay.
29442944
2945+
Contact sheets sample candidates at the requested recording rate. Brief UI
2946+
states between samples may not appear; the final captured frame is always
2947+
considered.
2948+
29452949
Operations:
29462950
start <path> [url] Start recording the active page (navigates first if url given)
29472951
stop Stop recording and save video

‎docs/src/app/recording/page.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ agent-browser record start ./checkout.webm --contact-sheet
6060
agent-browser record start ./checkout.webm --contact-sheet-threshold 0.02
6161
```
6262

63-
The threshold accepts `0` to `1`, defaults to `0.05`, and implies `--contact-sheet`. Contact sheets contain at most 100 frames.
63+
The threshold accepts `0` to `1`, defaults to `0.05`, and implies `--contact-sheet`. Candidate frames are sampled at the rate set by `--fps`, so brief UI states between samples may not appear. The final captured frame is always considered. Contact sheets contain at most 100 frames.
6464

6565
![Example contact sheet with timestamps and highlighted change regions](/recording/contact-sheet-example.png)
6666

‎skill-data/core/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ agent-browser click @e3
386386
agent-browser record stop
387387
```
388388
389-
Recording uses the active tab. Use `--cursor` for an animated pointer, `--contact-sheet` for a visual summary, and `--fps 60` for motion-heavy recordings. The cursor renders with the page so drags stay synchronized. Its inert overlay is hidden from accessibility snapshots, included in screenshots while recording, and removed on stop.
389+
Recording uses the active tab. Use `--cursor` for an animated pointer, `--contact-sheet` for a visual summary, and `--fps 60` for motion-heavy recordings. The cursor renders with the page so drags stay synchronized. Its inert overlay is hidden from accessibility snapshots, included in screenshots while recording, and removed on stop. Contact sheets sample candidate frames at the rate set by `--fps`, and the final captured frame is always considered.
390390
391391
See [references/video-recording.md](references/video-recording.md) for frame rate guidance, codec options, and more.
392392

‎skill-data/core/references/video-recording.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ agent-browser record start ./checkout.webm --contact-sheet
109109
agent-browser record start ./checkout.webm --contact-sheet-threshold 0.02
110110
```
111111

112-
The threshold accepts values from `0` to `1` and defaults to `0.05`. Passing `--contact-sheet-threshold` implies `--contact-sheet`. At most 100 frames are included.
112+
The threshold accepts values from `0` to `1` and defaults to `0.05`. Passing `--contact-sheet-threshold` implies `--contact-sheet`. Candidate frames are sampled at the rate set by `--fps`, so brief UI states between samples may not appear. The final captured frame is always considered. At most 100 frames are included.
113113

114114
## Use Cases
115115

0 commit comments

Comments
 (0)