Find each shot change in a 4-shot monitoring clip
Proof frames
Tool calls
detect_cuts
Arguments
{
"source": "$CLIP"
}
Result
{
"ok": true,
"data": {
"cuts": [
{
"timestamp_sec": 5.16,
"score": 0.430871,
"kind": "cut"
},
{
"timestamp_sec": 12.12,
"score": 0.743909,
"kind": "cut"
},
{
"timestamp_sec": 19.64,
"score": 0.699133,
"kind": "cut"
}
],
"total": 3
}
}
inspect_windows
Arguments
{
"source": "$CLIP",
"windows": [
{
"start_sec": 4.16,
"end_sec": 6.16
},
{
"start_sec": 11.12,
"end_sec": 13.12
},
{
"start_sec": 18.6,
"end_sec": 20.6
}
],
"fps": 2
}
Result
{
"ok": true,
"data": {
"windows": [
{
"index": 1,
"input_indices": [
0
],
"start_sec": 4.16,
"end_sec": 6.16,
"fps": 2,
"frames": [
{
"index": 1,
"timestamp_sec": 4.16,
"timecode": "00:00:04.160",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_0282d04b6e247d202978/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 4.16,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 2,
"timestamp_sec": 4.66,
"timecode": "00:00:04.660",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_0282d04b6e247d202978/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 4.66,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 3,
"timestamp_sec": 5.16,
"timecode": "00:00:05.160",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_0282d04b6e247d202978/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 5.16,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 4,
"timestamp_sec": 5.66,
"timecode": "00:00:05.660",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_0282d04b6e247d202978/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 5.66,
"decoded_timestamp": null,
"timestamp_delta": null
}
],
"contact_sheet_path": "/private<cache>/1ca0b84960eb4d2e4541/contact_sheets/sheet_4s…",
"estimated_vision_tokens": 1032,
"tool_file": {
"_tag": "ToolFile",
"name": "sheet_4samples_4cols_1fd1c7.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<367584 base64 chars dropped>",
"byteLength": 275688
}
},
{
"index": 2,
"input_indices": [
1
],
"start_sec": 11.12,
"end_sec": 13.12,
"fps": 2,
"frames": [
{
"index": 1,
"timestamp_sec": 11.12,
"timecode": "00:00:11.120",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_c695171c1ab11b3fc4e5/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 11.12,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 2,
"timestamp_sec": 11.62,
"timecode": "00:00:11.620",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_c695171c1ab11b3fc4e5/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 11.62,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 3,
"timestamp_sec": 12.12,
"timecode": "00:00:12.120",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_c695171c1ab11b3fc4e5/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 12.12,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 4,
"timestamp_sec": 12.62,
"timecode": "00:00:12.620",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_c695171c1ab11b3fc4e5/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 12.62,
"decoded_timestamp": null,
"timestamp_delta": null
}
],
"contact_sheet_path": "/private<cache>/1ca0b84960eb4d2e4541/contact_sheets/sheet_4s…",
"estimated_vision_tokens": 1032,
"tool_file": {
"_tag": "ToolFile",
"name": "sheet_4samples_4cols_20968b.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<356584 base64 chars dropped>",
"byteLength": 267436
}
},
{
"index": 3,
"input_indices": [
2
],
"start_sec": 18.6,
"end_sec": 20.6,
"fps": 2,
"frames": [
{
"index": 1,
"timestamp_sec": 18.6,
"timecode": "00:00:18.600",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_e90f09c974b49987a641/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 18.6,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 2,
"timestamp_sec": 19.1,
"timecode": "00:00:19.100",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_e90f09c974b49987a641/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 19.1,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 3,
"timestamp_sec": 19.6,
"timecode": "00:00:19.600",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_e90f09c974b49987a641/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 19.6,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 4,
"timestamp_sec": 20.1,
"timecode": "00:00:20.100",
"file_path": "<cache>/1ca0b84960eb4d2e4541/dense_e90f09c974b49987a641/fram…",
"width": 640,
"height": 360,
"requested_timestamp": 20.1,
"decoded_timestamp": null,
"timestamp_delta": null
}
],
"contact_sheet_path": "/private<cache>/1ca0b84960eb4d2e4541/contact_sheets/sheet_4s…",
"estimated_vision_tokens": 1032,
"tool_file": {
"_tag": "ToolFile",
"name": "sheet_4samples_4cols_53e4b7.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<318392 base64 chars dropped>",
"byteLength": 238793
}
}
],
"total": 3,
"total_frames": 12,
"estimated_vision_tokens": 3096
}
}
Question and answer
- Question
- Where does the shot change? Show me each change.
- Answer
- detect_cuts lists 3 shot changes, at 5.16, 12.12, 19.64 seconds.
How it was checked
- Truth from
- constructed
- Fixed at
Planted by this recipe before any tool ran: ffmpeg joined 4 single shots with hard cuts only (no fades, no sound, each scaled to 640x360): shot 1 is 5.16 s of jane-byrne-interchange-traffic from 5.52 s; shot 2 is 6.96 s of pomorie-harbour-pier from 11.08 s; shot 3 is 7.48 s of traffic-light-tree-static-audio from 50.48 s; shot 4 is 4.32 s of lindau-webcam-harbour from 1.84 s. The planted shot changes are at 5.16 s, 12.12 s, 19.6 s, and the truth is those times with tolerance 0.5 s. The calls are detect_cuts with its default threshold, then inspect_windows over 1 s either side of each planted time at 2 fps, a window fixed here before the run.
A script joined 4 single shots from 4 public monitoring clips with three hard cuts and no fades or sound, at times it chose. The windows are centred on those planted changes, not on the tool's output, and the card does not show any other change the tool might list.
Try it yourself
Using agentic-video on my video (the file I attach or name): run detect_cuts on the whole video and list the time of every shot change it finds. Then run inspect_windows over one second either side of each change and show me the frames there. Give me each change time.
- Get the .mcpb file and open it in Claude Desktop.
- Or:
pip install agentic-video
Clip and licence
- Licence
- CC-BY-SA-4.0
- Author
- Sea Cow
- Source
- commons.wikimedia.org
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Also uses (insert 1)
- Licence
- CC0
- Author
- Mojmir Churavy
- Source
- commons.wikimedia.org
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
Also uses (insert 2)
- Licence
- CC-BY-SA-3.0
- Author
- Chris McKenna
- Source
- commons.wikimedia.org
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Also uses (insert 3)
- Licence
- CC-BY-SA-4.0
- Author
- Datarhei
- Source
- commons.wikimedia.org
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.