MCP tool for still-frame extraction from video into images, OTIO markers, and a JSON manifest.
Project description
clipwright-frames
MCP tool for still-frame extraction from video into images, OTIO markers, and a JSON manifest.
Extracts still frames from a video file using FFmpeg and writes:
- Image files (JPEG or PNG) to the specified output directory
- An OTIO timeline (
frames.otio) with one zero-durationMarkerper frame - A JSON manifest (
frames.json) listing each frame's path and timestamp
MCP Server Setup
Add clipwright-frames to your MCP client configuration:
{
"mcpServers": {
"clipwright-frames": {
"command": "clipwright-frames",
"args": []
}
}
}
Or using uvx without a global install:
{
"mcpServers": {
"clipwright-frames": {
"command": "uvx",
"args": ["--from", "clipwright-frames", "clipwright-frames"]
}
}
}
MCP Tool
clipwright_extract_frames
| Parameter | Type | Required | Description |
|---|---|---|---|
media |
string |
yes | Input video file path. |
output_dir |
string |
yes | Existing output directory where frames and artifacts are written. |
options |
ExtractFramesOptions |
no | Extraction options (mode, format, quality, etc.). |
Return value: Standard ToolResult envelope — { ok, summary, data, artifacts, warnings }.
data.frame_count: Number of frames extracted.data.mode: Extraction mode used ("interval","scene", or"timestamps").data.format: Output image format used ("jpeg"or"png").artifacts[0]: The output OTIO timeline path (role: "timeline",format: "otio").artifacts[1]: The JSON manifest path (role: "manifest",format: "json").
Extraction Modes
interval (default)
Extracts one frame every interval_sec seconds throughout the video.
{
"mode": "interval",
"interval_sec": 10.0
}
scene
Extracts frames at scene boundaries detected by clipwright-scene.
Requires an OTIO timeline produced by clipwright_detect_scenes.
{
"mode": "scene",
"scene_timeline": "/path/to/scenes.otio"
}
timestamps
Extracts frames at explicit timestamps (in seconds).
{
"mode": "timestamps",
"timestamps": [0.0, 5.5, 12.3, 30.0]
}
Options
ExtractFramesOptions fields:
| Field | Type | Default | Description |
|---|---|---|---|
mode |
"interval" | "scene" | "timestamps" |
"interval" |
Extraction mode. |
interval_sec |
float (> 0) |
10.0 |
Seconds between frames when mode="interval". |
scene_timeline |
string | null |
null |
OTIO timeline path. Required when mode="scene". |
timestamps |
list[float] |
[] |
Explicit timestamps in seconds when mode="timestamps". |
format |
"jpeg" | "png" |
"jpeg" |
Output image format. |
quality |
int (1–31) |
2 |
FFmpeg -q:v quality for JPEG (1=best, 31=worst). Ignored for PNG. |
max_width |
int | null |
null |
Maximum output width in pixels. Aspect ratio is preserved. null means no resizing. |
Output Contract
All output is written to output_dir. The tool never modifies the input media file.
OTIO timeline (frames.otio)
An OTIO timeline with one zero-duration Marker per extracted frame on the V1 track.
Each marker's metadata["clipwright"] contains:
| Key | Type | Description |
|---|---|---|
kind |
string |
Always "extracted_frame". |
timestamp_sec |
float |
Timestamp of the frame in seconds. |
JSON manifest (frames.json)
A JSON object with a frames array where each element describes one extracted frame:
{
"count": 3,
"mode": "interval",
"format": "jpeg",
"frames": [
{
"index": 0,
"timestamp_sec": 0.0,
"path": "/output/frame_00000.jpg"
}
]
}
Prerequisites
FFmpeg (required)
FFmpeg must be available on PATH or specified via the CLIPWRIGHT_FFMPEG environment variable:
export CLIPWRIGHT_FFMPEG=/path/to/ffmpeg
export CLIPWRIGHT_FFPROBE=/path/to/ffprobe
On Windows with winget:
winget install Gyan.FFmpeg
FFmpeg is used to seek to timestamps and extract frames. It is invoked as a subprocess and is never linked as a library.
Note:
clipwright-framesalso requires ffprobe (viainspect_media) for video-stream detection and duration probing, soCLIPWRIGHT_FFPROBEmust be configured as well.
License
MIT
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_frames-0.1.0.tar.gz.
File metadata
- Download URL: clipwright_frames-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
243d72af49e5a5af1fb517d4950bfca4ae43e6fdd7e12a4202bdb65e4cba662f
|
|
| MD5 |
ef9984cafbccdb5b105d6717c787e766
|
|
| BLAKE2b-256 |
4355d8e002f070abce9aad9c15130ff4eca02ad972a2b2a88e8c3b3b19b60b67
|
Provenance
The following attestation bundles were made for clipwright_frames-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_frames-0.1.0.tar.gz -
Subject digest:
243d72af49e5a5af1fb517d4950bfca4ae43e6fdd7e12a4202bdb65e4cba662f - Sigstore transparency entry: 1840522074
- Sigstore integration time:
-
Permalink:
satoh-y-0323/clipwright@a8af995e27f034c68b7feefaabd2a292af21d51a -
Branch / Tag:
refs/tags/v0.4.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@a8af995e27f034c68b7feefaabd2a292af21d51a -
Trigger Event:
push
-
Statement type:
File details
Details for the file clipwright_frames-0.1.0-py3-none-any.whl.
File metadata
- Download URL: clipwright_frames-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.0 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 |
c37eafd8e7a5aec69b9aae4f6c37de28fd9506960e0eed6d9370e69e05f46866
|
|
| MD5 |
12448e7f3c5a81e5bcef552c7b179831
|
|
| BLAKE2b-256 |
f50ed636c800986dff80a269646cc0309babaa86acc36a054cb91724d3fd25ed
|
Provenance
The following attestation bundles were made for clipwright_frames-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_frames-0.1.0-py3-none-any.whl -
Subject digest:
c37eafd8e7a5aec69b9aae4f6c37de28fd9506960e0eed6d9370e69e05f46866 - Sigstore transparency entry: 1840522109
- Sigstore integration time:
-
Permalink:
satoh-y-0323/clipwright@a8af995e27f034c68b7feefaabd2a292af21d51a -
Branch / Tag:
refs/tags/v0.4.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@a8af995e27f034c68b7feefaabd2a292af21d51a -
Trigger Event:
push
-
Statement type: