Find each shot change in a 4-shot tutorial clip
Proof frames
Tool calls
detect_cuts
Arguments
{
"source": "$CLIP"
}
Result
{
"ok": true,
"data": {
"cuts": [
{
"timestamp_sec": 5.2,
"score": 0.678267,
"kind": "cut"
},
{
"timestamp_sec": 11.96,
"score": 0.627296,
"kind": "cut"
},
{
"timestamp_sec": 19.32,
"score": 0.623705,
"kind": "cut"
}
],
"total": 3
}
}
inspect_windows
Arguments
{
"source": "$CLIP",
"windows": [
{
"start_sec": 4.7,
"end_sec": 5.45
},
{
"start_sec": 11.46,
"end_sec": 12.21
},
{
"start_sec": 18.82,
"end_sec": 19.57
}
],
"fps": 2
}
Result
{
"ok": true,
"data": {
"windows": [
{
"index": 1,
"input_indices": [
0
],
"start_sec": 4.7,
"end_sec": 5.45,
"fps": 2,
"frames": [
{
"index": 1,
"timestamp_sec": 4.7,
"timecode": "00:00:04.700",
"file_path": "<cache>/4f91f33b7ea5996d8337/dense_7e8f49953d00ec53436c/frame_0001.jpg",
"width": 640,
"height": 360,
"requested_timestamp": 4.7,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 2,
"timestamp_sec": 5.2,
"timecode": "00:00:05.200",
"file_path": "<cache>/4f91f33b7ea5996d8337/dense_7e8f49953d00ec53436c/frame_0002.jpg",
"width": 640,
"height": 360,
"requested_timestamp": 5.2,
"decoded_timestamp": null,
"timestamp_delta": null
}
],
"contact_sheet_path": "/private<cache>/4f91f33b7ea5996d8337/contact_sheets/sheet_2samples_2cols_66df1.jpg",
"estimated_vision_tokens": 516,
"tool_file": {
"_tag": "ToolFile",
"name": "sheet_2samples_2cols_66df1.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<100524 base64 chars dropped>",
"byteLength": 75391
}
},
{
"index": 2,
"input_indices": [
1
],
"start_sec": 11.46,
"end_sec": 12.21,
"fps": 2,
"frames": [
{
"index": 1,
"timestamp_sec": 11.46,
"timecode": "00:00:11.460",
"file_path": "<cache>/4f91f33b7ea5996d8337/dense_55210264c4d7fb3d8714/frame_0001.jpg",
"width": 640,
"height": 360,
"requested_timestamp": 11.46,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 2,
"timestamp_sec": 11.96,
"timecode": "00:00:11.960",
"file_path": "<cache>/4f91f33b7ea5996d8337/dense_55210264c4d7fb3d8714/frame_0002.jpg",
"width": 640,
"height": 360,
"requested_timestamp": 11.96,
"decoded_timestamp": null,
"timestamp_delta": null
}
],
"contact_sheet_path": "/private<cache>/4f91f33b7ea5996d8337/contact_sheets/sheet_2samples_2cols_22699d.jpg",
"estimated_vision_tokens": 516,
"tool_file": {
"_tag": "ToolFile",
"name": "sheet_2samples_2cols_22699d.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<107136 base64 chars dropped>",
"byteLength": 80350
}
},
{
"index": 3,
"input_indices": [
2
],
"start_sec": 18.82,
"end_sec": 19.57,
"fps": 2,
"frames": [
{
"index": 1,
"timestamp_sec": 18.82,
"timecode": "00:00:18.820",
"file_path": "<cache>/4f91f33b7ea5996d8337/dense_fb131dc2327fb47a7dd7/frame_0001.jpg",
"width": 640,
"height": 360,
"requested_timestamp": 18.82,
"decoded_timestamp": null,
"timestamp_delta": null
},
{
"index": 2,
"timestamp_sec": 19.32,
"timecode": "00:00:19.320",
"file_path": "<cache>/4f91f33b7ea5996d8337/dense_fb131dc2327fb47a7dd7/frame_0002.jpg",
"width": 640,
"height": 360,
"requested_timestamp": 19.32,
"decoded_timestamp": null,
"timestamp_delta": null
}
],
"contact_sheet_path": "/private<cache>/4f91f33b7ea5996d8337/contact_sheets/sheet_2samples_2cols_5c7126.jpg",
"estimated_vision_tokens": 516,
"tool_file": {
"_tag": "ToolFile",
"name": "sheet_2samples_2cols_5c7126.jpg",
"mimeType": "image/jpeg",
"encoding": "base64",
"data": "<96088 base64 chars dropped>",
"byteLength": 72066
}
}
],
"total": 3,
"total_frames": 6,
"estimated_vision_tokens": 1548
}
}
Question and answer
- Question
- Where does the shot change? Show me each change.
- Answer
- detect_cuts lists 3 shot changes, at 5.20, 11.96, 19.32 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), each from a different public clip: shot 1 is 5.2 s of wikipedia-tutorial-reliability-en from 15.12 s; shot 2 is 6.76 s of commons-media-upload-screen-recording from 27.72 s; shot 3 is 7.36 s of wikipedia-tutorial-editing-en from 17.4 s; shot 4 is 4.92 s of commons-upload-image-2025 from 82.84 s. Checked on the joined clip before the run: each planted cut is the first frame of the new shot (the clip has a frame at exactly that time, 25 frames per second), each join reaches a scene score of 0.4 or more (5.2 s (scene score 0.68), 11.96 s (scene score 0.63), 19.32 s (scene score 0.62)), and no shot has an inner scene score of 0.2 or more. Sources changed by the slug-order rule: shot 2 moved from semantic-search-screen-recording to commons-media-upload-screen-recording (inner scene score reached 0.2). The planted shot changes are at 5.2 s, 11.96 s, 19.32 s, and the truth is those times with tolerance 0.5 s. The calls are detect_cuts with its default threshold, then inspect_windows from 0.5 s before to 0.25 s after each planted time at 2 fps, a window fixed here before the run.
A script joined 4 single shots from 4 different public tutorial 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 the half second before and a quarter second after 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-3.0
- Author
- Living Colour Filmproduktion, Hamburg, for Wikimedia Deutschland
- Source
- commons.wikimedia.org
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
Also uses (insert 1)
- 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.
Also uses (insert 2)
- Licence
- CC-BY-3.0
- Author
- Living Colour Filmproduktion, Hamburg, for Wikimedia Deutschland
- Source
- commons.wikimedia.org
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
Also uses (insert 3)
- Licence
- CC0
- Author
- Dev Jadiya
- Source
- commons.wikimedia.org
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication