agentic-video Gallery

Count how many times one short motion repeats

CountLectureTool missed
0:16CC0 · Andrew Krizhanovsky (Alexander Kirillov, lecturer)

Proof frames

Click a frame to seek

Tool calls

3 calls · agentic-video 0.3.1
count_repetitionsimac · 4 ms

Arguments

{
  "source": "$CLIP",
  "start_sec": 0.5,
  "end_sec": 15.1,
  "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_repetitionsimac · 1 ms

Arguments

{
  "source": "$CLIP",
  "start_sec": 0.5,
  "end_sec": 15.1,
  "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_repetitionsimac · 2 ms

Arguments

{
  "source": "$CLIP",
  "start_sec": 0.5,
  "end_sec": 15.1,
  "fps": 10,
  "max_period_sec": 3.5
}

Result

{
  "ok": true,
  "data": {
    "status": "complete",
    "count": 7,
    "cycles": [
      {
        "index": 1,
        "start_sec": 1.4,
        "end_sec": 2.7,
        "peak_sec": 2.1,
        "frame_badge": "#1"
      },
      {
        "index": 2,
        "start_sec": 3.2,
        "end_sec": 4.5,
        "peak_sec": 3.8,
        "frame_badge": "#2"
      },
      {
        "index": 3,
        "start_sec": 4.9,
        "end_sec": 6.2,
        "peak_sec": 5.5,
        "frame_badge": "#3"
      },
      {
        "index": 4,
        "start_sec": 6.6,
        "end_sec": 7.9,
        "peak_sec": 7.3,
        "frame_badge": "#4"
      },
      {
        "index": 5,
        "start_sec": 8.3,
        "end_sec": 9.6,
        "peak_sec": 9,
        "frame_badge": "#5"
      },
      {
        "index": 6,
        "start_sec": 10.1,
        "end_sec": 11.4,
        "peak_sec": 10.7,
        "frame_badge": "#6"
      },
      {
        "index": 7,
        "start_sec": 11.8,
        "end_sec": 13.1,
        "peak_sec": 12.4,
        "frame_badge": "#7"
      }
    ],
    "period_sec": 1.7,
    "median_period_sec": 1.7,
    "regularity": 1,
    "confidence": 1,
    "signal_quality": "good",
    "method_used": "motion",
    "motion_count": 7,
    "embedding_count": null,
    "periodic_count": 8,
    "note": "counts are estimates; verify ambiguous cycles with inspect_window",
    "contact_sheet": {
      "file_path": "<cache>/2856666da9aa58496612/contact_sheets/repetitions_0ac3cde320df65e17fc0.jpg",
      "sample_count": 7,
      "rows": 2,
      "cols": 4,
      "start_sec": 2.1,
      "end_sec": 12.4,
      "timestamps": [
        2.1,
        3.8,
        5.5,
        7.3,
        9,
        10.7,
        12.4
      ],
      "frame_width": 128,
      "frame_height": 72,
      "tool_file": {
        "_tag": "ToolFile",
        "name": "repetitions_0ac3cde320df65e17fc0.jpg",
        "mimeType": "image/jpeg",
        "encoding": "base64",
        "data": "<41484 base64 chars dropped>",
        "byteLength": 31113
      }
    },
    "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 speaker repeat the same gesture?
Answer
The tool counts 7 repetitions between 0.5 and 15.1 seconds.
Tool returned
7
Truth
8
Check failedanswer 7, expected 8 (tolerance 0)

How it was checked

Truth from
constructed
Fixed at

Planted by this recipe: ffmpeg cut 1.7 s of the source from 3.4 s and looped it 8 times back to back (the stretch 1 to 14.6 s), with 1 s of still first frame before and 1 s of still last frame after. The truth is 8, the number of copies. The window 0.5 to 15.1 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 1.7-second piece of this clip 8 times back to back, with still frames at each end, so the answer is the planted count of 8 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 15.1 seconds. Use count_repetitions on that window, then count the cycles by eye too and tell me the number. Use my own file.
  1. Get the .mcpb file and open it in Claude Desktop.
  2. Or: pip install agentic-video

Clip and licence

Licence
CC0
Author
Andrew Krizhanovsky (Alexander Kirillov, lecturer)
Source
commons.wikimedia.org
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.