Count how many times a purple circle logo pops up
0:30CC0 · B.G. DeSylva Productions Inc
Proof frames
Tool calls
count_occurrences
Arguments
{
"source": "$CLIP",
"description": "a purple circle",
"start_sec": 0,
"fps": 5,
"max_spans": 10
}
Result
{
"ok": true,
"data": {
"status": "in_progress",
"retry_after_seconds": 5
}
}
count_occurrences
Arguments
{
"source": "$CLIP",
"description": "a purple circle",
"start_sec": 0,
"fps": 5,
"max_spans": 10
}
Result
{
"ok": true,
"data": {
"status": "complete",
"count": 3,
"spans": [
{
"index": 1,
"start_sec": 1.4,
"end_sec": 2.4,
"duration_sec": 1,
"score": 1,
"representative_sec": 1.8,
"frame_badge": "#1",
"weak": false,
"region": {
"x": 0.85,
"y": 0.038,
"w": 0.125,
"h": 0.188
},
"travel": "stationary"
},
{
"index": 2,
"start_sec": 5.6,
"end_sec": 6.6,
"duration_sec": 1,
"score": 1,
"representative_sec": 6,
"frame_badge": "#2",
"weak": false,
"region": {
"x": 0.85,
"y": 0.038,
"w": 0.125,
"h": 0.188
},
"travel": "stationary"
},
{
"index": 3,
"start_sec": 9.6,
"end_sec": 10.6,
"duration_sec": 1,
"score": 1,
"representative_sec": 10,
"frame_badge": "#3",
"weak": false,
"region": {
"x": 0.85,
"y": 0.038,
"w": 0.125,
"h": 0.188
},
"travel": "stationary"
}
],
"spans_returned": 3,
"spans_omitted": 0,
"window": {
"start_sec": 0,
"end_sec": 30.03
},
"fps_used": 5,
"frames_sampled": 151,
"frames_analyzed": 150,
"checks": {
"text": null,
"description": "a purple circle",
"color": "purple",
"shape": "circle"
},
"contact_sheet": {
"file_path": "<cache>/7467c4981563f6d52b88/contact_sheets/occurrences_6453ec90c99500f286f7.jpg",
"sample_count": 3,
"rows": 1,
"cols": 3,
"frame_width": 288,
"frame_height": 192,
"labels": [
"#1 1.8s",
"#2 6.0s",
"#3 10.0s"
],
"tool_file": {
"_tag": "ToolFile",
"name": "occurrences_6453ec90c99500f286f7.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<48048 base64 chars dropped>",
"byteLength": 36034
}
},
"note": "Spans are sample-based (+/- 1/fps); verify each representative_sec with inspect_window. contact_sheet is one image with a tile per listed span, in span order: a zoomed frame of the span's best match, boxed, labeled with the span number and time. Look at each tile and drop any span whose tile is not the asked-for thing; spans marked * (`weak`) are the likeliest false ones. The answer is the number of tiles that match, plus any omitted spans and respecting any merged gaps noted above.",
"verify": "Rough count: spans can be false, merge across scene cuts, split one appearance, or miss crossings. Before answering, look at each tile of the contact_sheet image (one per span, in span order, a zoomed frame of its best match, boxed) and drop any span whose tile is not the asked-for thing; spans with weak=true (tile label *) are the likeliest false ones. The answer is the number of tiles that match, plus any spans the sheet does not show; if you also count by eye and differ, trust your own."
}
}
Question and answer
- Question
- How many times does the logo pop up?
- Answer
- count_occurrences counts 3 appearances of a purple circle in the 30-second clip.
Check passedanswer 3, expected 3 (tolerance 0)
How it was checked
- Truth from
- constructed
- Fixed at
Planted by this recipe: ffmpeg overlaid a 80 px purple circle with a white K, drawn by Pillow, in the top-right corner of the first 30 s of the source, for 1 s at each of the times 1.4, 5.6, 9.6 s, with at least 3 s of clear picture between two icons. The truth is the number of planted icons, 3.
A script drew a small purple circle with a white letter over the top-right corner of this clip, at set times one second long, so the count is the number of those planted appearances. The tool can also miss one or count a look-alike, and the card does not show every frame.
Try it yourself
Use agentic-video to count how many times the purple circle logo pops up in my video. Call count_occurrences on the whole clip with the description "a purple circle", and tell me the count. Use my own file.
- Get the .mcpb file and open it in Claude Desktop.
- Or:
pip install agentic-video
Clip and licence
- Licence
- CC0
- Author
- B.G. DeSylva Productions Inc
- Source
- commons.wikimedia.org
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.