MCP tool for shot boundary (scene) detection and OTIO marker generation.
Project description
clipwright-scene
MCP tool for shot boundary detection.
Detects scene cuts in video files using FFmpeg's scdet filter (built-in, no extra install)
or PySceneDetect (optional, more accurate). Boundaries are written as zero-duration OTIO
markers on the V1 track of an output timeline.
MCP Tool
clipwright_detect_scenes
| Parameter | Type | Required | Description |
|---|---|---|---|
media |
string |
yes | Input video file path. |
output |
string |
yes | Output OTIO timeline file path (must end in .otio). |
options |
DetectScenesOptions |
no | Detection options (see Options section). |
timeline |
string |
no | Existing OTIO timeline path to augment. When provided, markers are appended to the V1 track instead of creating a new timeline. |
Return value: Standard ToolResult envelope — { ok, summary, data, artifacts, warnings }.
data.scene_count: Number of scene boundaries detected.data.backend: Backend used ("ffmpeg"or"pyscenedetect").data.total_duration_sec: Total duration of the media in seconds.artifacts[0]: The output.otiofile path (role: "timeline",format: "otio").
Options
DetectScenesOptions fields:
| Field | Type | Default | Description |
|---|---|---|---|
threshold |
float (0.0–1.0) |
0.3 |
Scene change sensitivity. Lower = more sensitive. AI agents should use ~0.5 for major cuts only, ~0.1 for subtle transitions. |
min_scene_duration |
float (≥ 0.0) |
1.0 |
Minimum seconds between boundaries. Closer boundaries are merged (highest confidence kept). Set 0.0 to disable merging. |
backend |
"ffmpeg" | "pyscenedetect" |
"ffmpeg" |
Detection backend. "ffmpeg" uses the built-in scdet filter. "pyscenedetect" uses the scenedetect CLI (requires install). |
Prerequisites
FFmpeg (required)
FFmpeg must be available on PATH or specified via the CLIPWRIGHT_FFMPEG environment variable:
export CLIPWRIGHT_FFMPEG=/path/to/ffmpeg
On Windows with winget:
winget install Gyan.FFmpeg
PySceneDetect (optional)
Required only when options.backend = "pyscenedetect". Install via pip:
pip install scenedetect
Or install the optional extra:
pip install "clipwright-scene[pyscenedetect]"
Note: PySceneDetect performs a full video decode and is significantly slower than the FFmpeg backend. It may produce more accurate results for content-based detection.
Output
The output is an OTIO timeline file containing zero-duration Marker objects on the V1 track.
Each marker represents a detected shot boundary (an instantaneous point event, not an interval).
Marker metadata
Each marker's metadata["clipwright"] contains:
| Key | Type | Description |
|---|---|---|
kind |
string |
Always "scene_boundary". |
scene_index |
int |
0-based sequential index. |
confidence |
float |
0.0–1.0. FFmpeg: normalized scdet score. PySceneDetect: always 1.0. |
backend |
string |
Backend that produced this boundary ("ffmpeg" or "pyscenedetect"). |
tool |
string |
Always "clipwright-scene". |
version |
string |
Package version. |
Augment mode
Provide an existing .otio file via the timeline parameter to append scene markers to
a previously created timeline (e.g., one produced by clipwright-transcribe or
clipwright-silence). No clips are added or removed; only markers are appended.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clipwright_scene-0.1.0.tar.gz.
File metadata
- Download URL: clipwright_scene-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f14b2ad960470100f7a33c05963f58d548c778c6eb85ecf77711761a1ef51a8
|
|
| MD5 |
7ca8b07dfcfa2e001ce767246ad0efe5
|
|
| BLAKE2b-256 |
94d8b8ae9c0e9fe390ca533647412b1d8a255a26361c104d8be92923dfdcad4f
|
Provenance
The following attestation bundles were made for clipwright_scene-0.1.0.tar.gz:
Publisher:
publish.yml on satoh-y-0323/clipwright
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clipwright_scene-0.1.0.tar.gz -
Subject digest:
4f14b2ad960470100f7a33c05963f58d548c778c6eb85ecf77711761a1ef51a8 - Sigstore transparency entry: 1825912240
- Sigstore integration time:
-
Permalink:
satoh-y-0323/clipwright@b973e69bd2243460ba70a6f937f5f52199fe3d89 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/satoh-y-0323
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b973e69bd2243460ba70a6f937f5f52199fe3d89 -
Trigger Event:
push
-
Statement type:
File details
Details for the file clipwright_scene-0.1.0-py3-none-any.whl.
File metadata
- Download URL: clipwright_scene-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7de57e89254647b43d9e6143731d63cea5b2482aaffa3a82ee916cf9ddf8c45c
|
|
| MD5 |
13918e227b2cb4b74bbc8edb588d83dd
|
|
| BLAKE2b-256 |
fb678c083f7d916110a4139917a13e29ebfc1a80447d3cc0658e0cc7b811c6a7
|
Provenance
The following attestation bundles were made for clipwright_scene-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on satoh-y-0323/clipwright
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clipwright_scene-0.1.0-py3-none-any.whl -
Subject digest:
7de57e89254647b43d9e6143731d63cea5b2482aaffa3a82ee916cf9ddf8c45c - Sigstore transparency entry: 1825912264
- Sigstore integration time:
-
Permalink:
satoh-y-0323/clipwright@b973e69bd2243460ba70a6f937f5f52199fe3d89 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/satoh-y-0323
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b973e69bd2243460ba70a6f937f5f52199fe3d89 -
Trigger Event:
push
-
Statement type: