agentic-video Gallery

Count the clicks in a quiet stretch of sound

CountTutorialTool missed
0:20CC-BY-4.0 · Status 401

Proof frames

Click a frame to seek

Tool calls

1 calls · agentic-video 0.3.3
audio_onsetsbox · 141 ms

Arguments

{
  "source": "$CLIP",
  "start_sec": 0,
  "end_sec": 20,
  "min_strength": 0.36,
  "band_hz": [
    1000,
    4000
  ]
}

Result

{
  "ok": true,
  "data": {
    "source_path": "~/work/cards/clicks-tutorial/clip.mp4",
    "start_sec": 0,
    "end_sec": 20,
    "sample_rate": 48000,
    "hop_samples": 256,
    "time_resolution_ms": 5.333,
    "min_strength": 0.36,
    "band_hz": {
      "name": null,
      "low_hz": 1000,
      "high_hz": 4000
    },
    "compare_to": null,
    "compare_min_delta_db": null,
    "onsets": [
      {
        "time_sec": 1.610667,
        "strength": 0.453051,
        "band_db": {
          "sub": -42.412,
          "low_mid": -35.222,
          "mid": -19.046,
          "high": -30.543,
          "air": -35.427
        },
        "band_energy_db": 12.144
      },
      {
        "time_sec": 3.504,
        "strength": 0.4393,
        "band_db": {
          "sub": -64.231,
          "low_mid": -61.96,
          "mid": -66.023,
          "high": -81.721,
          "air": -89.87
        },
        "band_energy_db": -35.756
      },
      {
        "time_sec": 3.776,
        "strength": 0.459708,
        "band_db": {
          "sub": -46.623,
          "low_mid": -39.266,
          "mid": -23.667,
          "high": -35.087,
          "air": -39.363
        },
        "band_energy_db": 7.627
      },
      {
        "time_sec": 4.453333,
        "strength": 0.363871,
        "band_db": {
          "sub": -58.124,
          "low_mid": -58.201,
          "mid": -64.212,
          "high": -67.746,
          "air": -79.899
        },
        "band_energy_db": -31.327
      },
      {
        "time_sec": 5.328,
        "strength": 0.471595,
        "band_db": {
          "sub": -68.016,
          "low_mid": -71.102,
          "mid": -80.554,
          "high": -95.203,
          "air": -98.28
        },
        "band_energy_db": -53.761
      },
      {
        "time_sec": 6.688,
        "strength": 0.433565,
        "band_db": {
          "sub": -45.834,
          "low_mid": -37.573,
          "mid": -21.552,
          "high": -33.049,
          "air": -38.589
        },
        "band_energy_db": 9.783
      },
      {
        "time_sec": 10.032,
        "strength": 0.361685,
        "band_db": {
          "sub": -66.03,
          "low_mid": -71.452,
          "mid": -83.659,
          "high": -92.591,
          "air": -98.936
        },
        "band_energy_db": -52.029
      },
      {
        "time_sec": 17.077333,
        "strength": 0.480129,
        "band_db": {
          "sub": -67.921,
          "low_mid": -68.083,
          "mid": -73.015,
          "high": -78.346,
          "air": -86.01
        },
        "band_energy_db": -40.67
      }
    ],
    "total": 8,
    "merged_count": 4
  }
}

Question and answer

Question
How many clicks are there in this video's sound, and when do they happen?
Answer
The tool reports 8 sound onsets, at 1.61, 3.50, 3.78, 4.45, 5.33, 6.69, 10.03, 17.08 s, in the first 20 seconds, in the 1000 to 4000 Hz band.
Tool returned
[1.610667,3.504,3.776,4.453333,5.328,6.688,10.032,17.077333]
Truth
[1.616,3.777,5.3,6.691,8.777,10.003]
Check failedprecision 0.62 (min 1), recall 0.83 (min 1), tolerance 0.05s

How it was checked

Truth from
constructed
Fixed at

Planted by this recipe before any tool ran: ffmpeg cut the quietest 20 s of the source's sound (the run of 10 consecutive 2 s steps with the lowest mean level, from 86 s, mean -56.74 dB), and mixed 6 clicks over it: 10 ms full-scale 1 kHz square waves at 1.616, 3.777, 5.300, 6.691, 8.777, 10.003 s of the clip. The truth is these planted click times; the tolerance 0.05 s is the match window for the tool's onset times.

A script mixed 6 clicks into the quietest 20 seconds of this clip's own sound, at times it chose, so the truth is those set times. The tool reports onsets, not clicks, and the card does not show the rest of the clip.

Try it yourself

Using agentic-video, find the sharp clicks in the sound of my video. Call audio_onsets on the first 20 seconds of my file with band_hz 1000 to 4000 and min_strength 0.36, then list the time of each onset it reports, in seconds. 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
CC-BY-4.0
Author
Status 401
Source
commons.wikimedia.org
This file is licensed under the Creative Commons Attribution 4.0 International license.