Skip to main content

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 .otio file 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. Verified with PySceneDetect 0.7+.

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.

Metadata

Release files for clipwright-scene 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clipwright-scene 0.3.1
File Size Uploaded
clipwright_scene-0.3.1.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clipwright-scene 0.3.1
File Interpreter ABI Platform
clipwright_scene-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / clipwright_scene-0.3.1.tar.gz

Download URL clipwright_scene-0.3.1.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2619f2d4e0212101db187d845f222549bc7d7c6430d2529f143cbb661ad983d5
BLAKE2b-256 checksum
How to use checksums
c11240ace6fcda1312da468816ffb272c9fc0b90de9242c9ce9c23c4655eca04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.

Transparency log

Release files / clipwright_scene-0.3.1-py3-none-any.whl

Download URL clipwright_scene-0.3.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08937b516658b6e429aa7924f5189f6e92f19e550fea82b3f35d42c93ec58c1e
BLAKE2b-256 checksum
How to use checksums
25d6b4fac9dab0311b230792b70565a3d78a95269d6df7dbfda94e8087b5915a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page