Count how often a light turns on or off in space footage
0:40PD · NASA Johnson Space Center
Proof frames
Tool calls
track_region_events
Arguments
{
"source": "$CLIP",
"start_sec": 0,
"end_sec": 39.91,
"region": {
"x": 0.587656,
"y": 0.083056,
"width": 0.20125,
"height": 0.175556
},
"sample_fps": 2
}
Result
{
"ok": true,
"data": {
"region": {
"x": 0.587656,
"y": 0.083056,
"width": 0.20125,
"height": 0.175556
},
"start_sec": 0,
"end_sec": 39.91,
"sample_fps": 2,
"sample_count": 80,
"temporal_resolution_sec": 0.5,
"scan_segments": [
{
"start_sec": 0,
"end_sec": 39.91,
"sample_count": 80
}
],
"transitions": [
{
"from_timestamp_sec": 2.5,
"timestamp_sec": 3,
"from_timestamp_provenance": {
"requested_timestamp": 2.5,
"decoded_timestamp": null,
"timestamp_delta": null
},
"timestamp_provenance": {
"requested_timestamp": 3,
"decoded_timestamp": null,
"timestamp_delta": null
},
"change_score": 0.160525,
"mean_abs_diff": 0.130357,
"changed_fraction": 0.216553,
"evidence_moments": {
"before": {
"timestamp_sec": 2.5,
"timestamp_provenance": {
"requested_timestamp": 2.5,
"decoded_timestamp": null,
"timestamp_delta": null
}
},
"after": {
"timestamp_sec": 3,
"timestamp_provenance": {
"requested_timestamp": 3,
"decoded_timestamp": null,
"timestamp_delta": null
}
}
},
"rank": 1
},
{
"from_timestamp_sec": 5.5,
"timestamp_sec": 6,
"from_timestamp_provenance": {
"requested_timestamp": 5.5,
"decoded_timestamp": null,
"timestamp_delta": null
},
"timestamp_provenance": {
"requested_timestamp": 6,
"decoded_timestamp": null,
"timestamp_delta": null
},
"change_score": 0.15987,
"mean_abs_diff": 0.129349,
"changed_fraction": 0.216553,
"evidence_moments": {
"before": {
"timestamp_sec": 5.5,
"timestamp_provenance": {
"requested_timestamp": 5.5,
"decoded_timestamp": null,
"timestamp_delta": null
}
},
"after": {
"timestamp_sec": 6,
"timestamp_provenance": {
"requested_timestamp": 6,
"decoded_timestamp": null,
"timestamp_delta": null
}
}
},
"rank": 2
},
{
"from_timestamp_sec": 8.5,
"timestamp_sec": 9,
"from_timestamp_provenance": {
"requested_timestamp": 8.5,
"decoded_timestamp": null,
"timestamp_delta": null
},
"timestamp_provenance": {
"requested_timestamp": 9,
"decoded_timestamp": null,
"timestamp_delta": null
},
"change_score": 0.160043,
"mean_abs_diff": 0.129484,
"changed_fraction": 0.216797,
"evidence_moments": {
"before": {
"timestamp_sec": 8.5,
"timestamp_provenance": {
"requested_timestamp": 8.5,
"decoded_timestamp": null,
"timestamp_delta": null
}
},
"after": {
"timestamp_sec": 9,
"timestamp_provenance": {
"requested_timestamp": 9,
"decoded_timestamp": null,
"timestamp_delta": null
}
}
},
"rank": 3
},
{
"from_timestamp_sec": 12,
"timestamp_sec": 12.5,
"from_timestamp_provenance": {
"requested_timestamp": 12,
"decoded_timestamp": null,
"timestamp_delta": null
},
"timestamp_provenance": {
"requested_timestamp": 12.5,
"decoded_timestamp": null,
"timestamp_delta": null
},
"change_score": 0.15974,
"mean_abs_diff": 0.12928,
"changed_fraction": 0.216309,
"evidence_moments": {
"before": {
"timestamp_sec": 12,
"timestamp_provenance": {
"requested_timestamp": 12,
"decoded_timestamp": null,
"timestamp_delta": null
}
},
"after": {
"timestamp_sec": 12.5,
"timestamp_provenance": {
"requested_timestamp": 12.5,
"decoded_timestamp": null,
"timestamp_delta": null
}
}
},
"rank": 4
},
{
"from_timestamp_sec": 15.5,
"timestamp_sec": 16,
"from_timestamp_provenance": {
"requested_timestamp": 15.5,
"decoded_timestamp": null,
"timestamp_delta": null
},
"timestamp_provenance": {
"requested_timestamp": 16,
"decoded_timestamp": null,
"timestamp_delta": null
},
"change_score": 0.15958,
"mean_abs_diff": 0.129035,
"changed_fraction": 0.216309,
"evidence_moments": {
"before": {
"timestamp_sec": 15.5,
"timestamp_provenance": {
"requested_timestamp": 15.5,
"decoded_timestamp": null,
"timestamp_delta": null
}
},
"after": {
"timestamp_sec": 16,
"timestamp_provenance": {
"requested_timestamp": 16,
"decoded_timestamp": null,
"timestamp_delta": null
}
}
},
"rank": 5
},
{
"from_timestamp_sec": 18.5,
"timestamp_sec": 19,
"from_timestamp_provenance": {
"requested_timestamp": 18.5,
"decoded_timestamp": null,
"timestamp_delta": null
},
"timestamp_provenance": {
"requested_timestamp": 19,
"decoded_timestamp": null,
"timestamp_delta": null
},
"change_score": 0.159589,
"mean_abs_diff": 0.129048,
"changed_fraction": 0.216309,
"evidence_moments": {
"before": {
"timestamp_sec": 18.5,
"timestamp_provenance": {
"requested_timestamp": 18.5,
"decoded_timestamp": null,
"timestamp_delta": null
}
},
"after": {
"timestamp_sec": 19,
"timestamp_provenance": {
"requested_timestamp": 19,
"decoded_timestamp": null,
"timestamp_delta": null
}
}
},
"rank": 6
}
],
"event_count": 6,
"uncertain": false,
"incomplete": false,
"uncertainty_reason": null
}
}
Question and answer
- Question
- How many times does the light turn on or off in this video?
- Answer
- The tool counts 6 state changes in the box over the clip; each switch on and each switch off is one change.
Check passedanswer 6, expected 6 (tolerance 0)
How it was checked
- Truth from
- constructed
- Fixed at
Planted by this recipe before any tool ran: a dark box (161 by 79 px, left edge at 360 px, top edge at 22 px) was drawn over the picture for the whole 40 s clip, and a yellow light inside it was switched on and off 3 times, at the toggle times 2.75, 5.75, 8.75, 12.25, 15.75, 18.75 s, with ffmpeg. The truth is 6 state changes (each switch on and each switch off counts once), fixed here before the run. The call samples 2 frames per second over the clip with the box inset by 0.1 of its size on each side.
A script drew a dark box over the picture and switched a light in it on and off 3 times at set times, so the count is those planted changes (each on and each off counts once) and only the box was checked.
Try it yourself
Use agentic-video to count how often the light in my video turns on or off. Run track_region_events on the box at x 0.588, y 0.083, width 0.201, height 0.176 (fractions of the frame) from 0 to 39.91 seconds, sampling 2 frames per second. Tell me the event count, then show me the first change. Use my own file.
- Get the .mcpb file and open it in Claude Desktop.
- Or:
pip install agentic-video
Clip and licence
- Licence
- PD
- Author
- NASA Johnson Space Center
- Source
- commons.wikimedia.org
This file is in the public domain in the United States because it was solely created by NASA.