agentic-video Gallery

Count how often a light turns on or off in archive news footage

Motion and regionsNews archiveVerified
0:40PD · Universal Newsreels

Proof frames

Click a frame to seek

Tool calls

1 calls · agentic-video 0.3.1
track_region_eventsimac · 878 ms

Arguments

{
  "source": "$CLIP",
  "start_sec": 0,
  "end_sec": 39.91,
  "region": {
    "x": 0.59025,
    "y": 0.082,
    "width": 0.182,
    "height": 0.176
  },
  "sample_fps": 2
}

Result

{
  "ok": true,
  "data": {
    "region": {
      "x": 0.59025,
      "y": 0.082,
      "width": 0.182,
      "height": 0.176
    },
    "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": 3,
        "timestamp_sec": 3.5,
        "from_timestamp_provenance": {
          "requested_timestamp": 3,
          "decoded_timestamp": null,
          "timestamp_delta": null
        },
        "timestamp_provenance": {
          "requested_timestamp": 3.5,
          "decoded_timestamp": null,
          "timestamp_delta": null
        },
        "change_score": 0.233852,
        "mean_abs_diff": 0.1894,
        "changed_fraction": 0.316406,
        "evidence_moments": {
          "before": {
            "timestamp_sec": 3,
            "timestamp_provenance": {
              "requested_timestamp": 3,
              "decoded_timestamp": null,
              "timestamp_delta": null
            }
          },
          "after": {
            "timestamp_sec": 3.5,
            "timestamp_provenance": {
              "requested_timestamp": 3.5,
              "decoded_timestamp": null,
              "timestamp_delta": null
            }
          }
        },
        "rank": 1
      },
      {
        "from_timestamp_sec": 6.5,
        "timestamp_sec": 7,
        "from_timestamp_provenance": {
          "requested_timestamp": 6.5,
          "decoded_timestamp": null,
          "timestamp_delta": null
        },
        "timestamp_provenance": {
          "requested_timestamp": 7,
          "decoded_timestamp": null,
          "timestamp_delta": null
        },
        "change_score": 0.238314,
        "mean_abs_diff": 0.194161,
        "changed_fraction": 0.320312,
        "evidence_moments": {
          "before": {
            "timestamp_sec": 6.5,
            "timestamp_provenance": {
              "requested_timestamp": 6.5,
              "decoded_timestamp": null,
              "timestamp_delta": null
            }
          },
          "after": {
            "timestamp_sec": 7,
            "timestamp_provenance": {
              "requested_timestamp": 7,
              "decoded_timestamp": null,
              "timestamp_delta": null
            }
          }
        },
        "rank": 2
      },
      {
        "from_timestamp_sec": 9.5,
        "timestamp_sec": 10,
        "from_timestamp_provenance": {
          "requested_timestamp": 9.5,
          "decoded_timestamp": null,
          "timestamp_delta": null
        },
        "timestamp_provenance": {
          "requested_timestamp": 10,
          "decoded_timestamp": null,
          "timestamp_delta": null
        },
        "change_score": 0.234973,
        "mean_abs_diff": 0.189941,
        "changed_fraction": 0.318604,
        "evidence_moments": {
          "before": {
            "timestamp_sec": 9.5,
            "timestamp_provenance": {
              "requested_timestamp": 9.5,
              "decoded_timestamp": null,
              "timestamp_delta": null
            }
          },
          "after": {
            "timestamp_sec": 10,
            "timestamp_provenance": {
              "requested_timestamp": 10,
              "decoded_timestamp": null,
              "timestamp_delta": null
            }
          }
        },
        "rank": 3
      },
      {
        "from_timestamp_sec": 12.5,
        "timestamp_sec": 13,
        "from_timestamp_provenance": {
          "requested_timestamp": 12.5,
          "decoded_timestamp": null,
          "timestamp_delta": null
        },
        "timestamp_provenance": {
          "requested_timestamp": 13,
          "decoded_timestamp": null,
          "timestamp_delta": null
        },
        "change_score": 0.234633,
        "mean_abs_diff": 0.189943,
        "changed_fraction": 0.317627,
        "evidence_moments": {
          "before": {
            "timestamp_sec": 12.5,
            "timestamp_provenance": {
              "requested_timestamp": 12.5,
              "decoded_timestamp": null,
              "timestamp_delta": null
            }
          },
          "after": {
            "timestamp_sec": 13,
            "timestamp_provenance": {
              "requested_timestamp": 13,
              "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.234711,
        "mean_abs_diff": 0.189801,
        "changed_fraction": 0.318115,
        "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
      },
      "…trimmed 3 more"
    ],
    "event_count": 8,
    "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 8 state changes in the box over the clip; each switch on and each switch off is one change.
Check passedanswer 8, expected 8 (tolerance 0)

How it was checked

Truth from
constructed
Fixed at

Planted by this recipe before any tool ran: a dark box (91 by 66 px, left edge at 227 px, top edge at 18 px) was drawn over the picture for the whole 40 s clip, and a yellow light inside it was switched on and off 4 times, at the toggle times 3.25, 6.75, 9.75, 12.75, 15.75, 18.75, 21.75, 25.25 s, with ffmpeg. The truth is 8 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 4 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.590, y 0.082, width 0.182, 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.
  1. Get the .mcpb file and open it in Claude Desktop.
  2. Or: pip install agentic-video

Clip and licence

Licence
PD
Author
Universal Newsreels
Source
commons.wikimedia.org
This work has been released into the public domain by its copyright holder, Universal Pictures. This applies worldwide.