Count how many times one short motion repeats
0:11CC-BY-4.0 · Status 401
Proof frames
Tool calls
count_repetitions
Arguments
{
"source": "$CLIP",
"start_sec": 0.5,
"end_sec": 10.5,
"fps": 10,
"max_period_sec": 3.5
}
Result
{
"ok": true,
"data": {
"status": "in_progress",
"retry_after_seconds": 2,
"verify": "Rough count. Before answering, count cycles by eye with inspect_window or contact_sheet over this window; if your count differs, trust your own."
}
}
count_repetitions
Arguments
{
"source": "$CLIP",
"start_sec": 0.5,
"end_sec": 10.5,
"fps": 10,
"max_period_sec": 3.5
}
Result
{
"ok": true,
"data": {
"status": "complete",
"count": 2,
"cycles": [
{
"index": 1,
"start_sec": 2.4,
"end_sec": 4.1,
"peak_sec": 2.6,
"frame_badge": "#1"
},
{
"index": 2,
"start_sec": 5.5,
"end_sec": 7.1,
"peak_sec": 5.7,
"frame_badge": "#2"
}
],
"period_sec": 3.1,
"median_period_sec": 3.1,
"regularity": 1,
"confidence": 1,
"signal_quality": "good",
"method_used": "motion",
"motion_count": 2,
"embedding_count": null,
"periodic_count": 3,
"note": "counts are estimates; verify ambiguous cycles with inspect_window",
"contact_sheet": {
"file_path": "<cache>/50ce931072d29d4aac79/contact_sheets/repetitions_7bd9c73d76a6e2eb89fd.jpg",
"sample_count": 2,
"rows": 1,
"cols": 2,
"start_sec": 2.6,
"end_sec": 5.7,
"timestamps": [
2.6,
5.7
],
"frame_width": 128,
"frame_height": 72,
"tool_file": {
"_tag": "ToolFile",
"name": "repetitions_7bd9c73d76a6e2eb89fd.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<14540 base64 chars dropped>",
"byteLength": 10903
}
},
"verify": "Rough count. Before answering, count cycles by eye with inspect_window or contact_sheet over this window; if your count differs, trust your own."
}
}
Question and answer
- Question
- How many times does the same motion repeat on screen?
- Answer
- The tool counts 2 repetitions between 0.5 and 10.5 seconds.
- Tool returned
- 2
- Truth
- 3
Check failedanswer 2, expected 3 (tolerance 0)
How it was checked
- Truth from
- constructed
- Fixed at
Planted by this recipe: ffmpeg cut 3 s of the source from 53 s and looped it 3 times back to back (the stretch 1 to 10 s), with 1 s of still first frame before and 1 s of still last frame after. The truth is 3, the number of copies. The window 0.5 to 10.5 s is the user input: the stretch plus 0.5 s of still picture each side, given as start_sec and end_sec.
A script repeated one 3-second piece of this clip 3 times back to back, with still frames at each end, so the answer is the planted count of 3 copies. The sound repeats with the picture. The window was given by the card, not found by the tool.
Try it yourself
Use agentic-video to count how many times the motion repeats in my video between 0.5 and 10.5 seconds. Use count_repetitions on that window, then count the cycles by eye too and tell me the number. Use my own file.
- Get the .mcpb file and open it in Claude Desktop.
- Or:
pip install agentic-video
Clip and licence
- Licence
- CC-BY-4.0
- Author
- Status 401
- Source
- commons.wikimedia.org
This file is licensed under the Creative Commons Attribution 4.0 International license.