Count how many times a ball bounces in a clip
0:08CC-BY-SA-4.0 · مصطفى ملو (Wikimedia Commons user)
Proof frames
Tool calls
count_repetitions
Arguments
{
"source": "$CLIP",
"start_sec": 0.5,
"end_sec": 7.58,
"fps": 10
}
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": 7.58,
"fps": 10
}
Result
{
"ok": true,
"data": {
"status": "complete",
"count": 4,
"cycles": [
{
"index": 1,
"start_sec": 0.599,
"end_sec": 2.134,
"peak_sec": 1.367,
"frame_badge": "#1"
},
{
"index": 2,
"start_sec": 2.132,
"end_sec": 3.668,
"peak_sec": 2.9,
"frame_badge": "#2"
},
{
"index": 3,
"start_sec": 3.666,
"end_sec": 5.201,
"peak_sec": 4.433,
"frame_badge": "#3"
},
{
"index": 4,
"start_sec": 5.199,
"end_sec": 6.734,
"peak_sec": 5.967,
"frame_badge": "#4"
}
],
"period_sec": 1.536,
"median_period_sec": 1.536,
"regularity": 0.751,
"confidence": 0.3,
"signal_quality": "periodic",
"method_used": "periodic",
"motion_count": 0,
"embedding_count": null,
"periodic_count": 4,
"note": "counts are estimates; verify ambiguous cycles with inspect_window; the methods disagree: the periodicity check counted 4 cycles about 1.536 s apart and replaced the amplitude count of 0 (motion 0), so confidence is capped at 0.3. Either count may be right: count by eye before answering",
"contact_sheet": {
"file_path": "<cache>/a35815d503ab4a939852/contact_sheets/repetitions_b6fa52ea9bbcc4a1f5f2.jpg",
"sample_count": 4,
"rows": 1,
"cols": 4,
"start_sec": 1.367,
"end_sec": 5.967,
"timestamps": [
1.367,
2.9,
4.433,
5.967
],
"frame_width": 128,
"frame_height": 72,
"tool_file": {
"_tag": "ToolFile",
"name": "repetitions_b6fa52ea9bbcc4a1f5f2.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<31400 base64 chars dropped>",
"byteLength": 23549
}
},
"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 ball bounce in this clip?
- Answer
- The tool counts 4 bounces between 0.5 and 7.58 seconds.
Check passedanswer 4, expected 4 (tolerance 0)
How it was checked
- Truth from
- constructed
- Fixed at
Planted by this recipe: a 48 px filled circle was drawn with Pillow over one still frame of the source (taken at 33.58 s) and bounced 4 times, each bounce 1.52 s long on the same path, with 1 s of still picture before and 1 s after; the moving stretch runs from 1 to 7.08 s. The truth is 4, the number of bounces. The call's window, 0.5 to 7.58 s (given as start_sec and end_sec by the card as the user's input), is the moving stretch plus 0.5 s of still picture each side.
A script drew a plain circle over one still frame of this cooking footage and bounced it 4 times at 1.52 seconds each, so the answer is the planted count of 4. The rest of the picture never moves. The window was given by the card, not found by the tool.
Try it yourself
Use agentic-video to count how many times the ball bounces in my video between 0.5 and 7.58 seconds. Use count_repetitions on that window, then tell me the count and the times of the peaks. 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-SA-4.0
- Author
- مصطفى ملو (Wikimedia Commons user)
- Source
- commons.wikimedia.org
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.