Skip to main content

clipwright-transition

MCP tool that adds transition directives (fade, dissolve, fadeblack, fadewhite) to an OTIO timeline for realisation by clipwright-render.

Overview

clipwright-transition accepts an OTIO timeline (typically produced by clipwright-sequence) and annotates it with transition directives at clip boundaries. The directives are stored in metadata["clipwright"]["transition"] and consumed by clipwright-render, which materialises them as xfade/acrossfade filter chains during the final encoding pass.

Design principle (separation of annotation and realisation): clipwright-transition writes only the OTIO directive; it does not transcode or touch media files. All media processing is deferred to clipwright-render.

No FFmpeg or FFprobe is needed at transition-annotation time.

Prerequisites

  • Python 3.11 or later
  • clipwright core package (shared types, envelope, OTIO utils)
  • An OTIO timeline with two or more video clips on a single V1 track (e.g. produced by clipwright-sequence)

MCP Tool: clipwright_add_transition

Parameters

Name Type Default Description
timeline string required Path to the input OTIO timeline file (.otio extension required).
output string required Output OTIO timeline file path (.otio extension required, must differ from timeline). The parent directory must exist.
options AddTransitionOptions required Transition mode: either uniform (apply the same transition to all internal boundaries) or per_boundary (specify per-boundary transitions). Exactly one must be provided.
options.uniform TransitionSpec | null null Apply a single transition spec to every internal clip boundary.
options.uniform.type string required Transition type: "fade", "dissolve", "fadeblack", or "fadewhite".
options.uniform.duration_sec float required Transition duration in seconds (0 < duration ≤ 5.0).
options.per_boundary list[BoundaryTransition] | null null Per-boundary transition list (max 1000 entries). All internal boundaries must be covered (no partial/gapped specification in v1).
options.per_boundary[].after_clip_index int required Zero-based index of the clip before the boundary (≥ 0).
options.per_boundary[].type string required Transition type (same allowlist as uniform.type).
options.per_boundary[].duration_sec float required Transition duration in seconds (same constraint as uniform.duration_sec).

Return value

{
  "ok": true,
  "summary": "Applied dissolve transition (0.5s) to 2 boundary(ies) [uniform mode]. Generated output.otio. Pass it to clipwright-render to materialise the transitions.",
  "data": {
    "boundary_count": 2,
    "mode": "uniform"
  },
  "artifacts": [{"role": "timeline", "path": "output.otio", "format": "otio"}],
  "warnings": []
}

Error codes

Code Cause
INVALID_INPUT output has a non-.otio extension
INVALID_INPUT output parent directory does not exist
INVALID_INPUT output resolves to the same path as timeline
INVALID_INPUT The timeline has fewer than two video clips
INVALID_INPUT The timeline has no video track or two or more video tracks
INVALID_INPUT The timeline already contains an OTIO Transition object
INVALID_INPUT A per_boundary index is out of range [0, n_clips-2]
INVALID_INPUT per_boundary contains duplicate after_clip_index values
UNSUPPORTED_OPERATION per_boundary does not cover all internal boundaries (partial/gapped specification is unsupported in v1; use uniform or specify all n_clips-1 boundaries)
FILE_NOT_FOUND The timeline path does not exist

Three-Phase Workflow

clipwright_build_sequence(clips, output)          # Phase 1 — build multi-clip OTIO
        │
        ▼  OTIO timeline with ordered V1 clips
clipwright_add_transition(timeline, output, opts)  # Phase 2 — annotate transitions
        │
        ▼  OTIO timeline with transition directives
clipwright_render(timeline, output_media)          # Phase 3 — encode with transitions
        │
        ▼  single output video with crossfades

MCP Client Registration

Register clipwright-transition as a standalone MCP server in your client configuration (.mcp.json / claude_desktop_config.json). No environment variables are required at annotation time.

{
  "mcpServers": {
    "clipwright-transition": {
      "command": "clipwright-transition"
    }
  }
}

clipwright-render (which materialises the transitions into a video) requires CLIPWRIGHT_FFMPEG.

Usage Examples

Apply a uniform dissolve between all clips

# Via MCP call_tool
result = await session.call_tool("clipwright_add_transition", {
    "timeline": "/project/sequence.otio",
    "output": "/project/with_transitions.otio",
    "options": {
        "uniform": {"type": "dissolve", "duration_sec": 0.5}
    }
})
# Then render
render_result = await session.call_tool("clipwright_render", {
    "timeline": "/project/with_transitions.otio",
    "output": "/project/final.mp4"
})

Apply per-boundary transitions

result = await session.call_tool("clipwright_add_transition", {
    "timeline": "/project/sequence.otio",
    "output": "/project/with_transitions.otio",
    "options": {
        "per_boundary": [
            {"after_clip_index": 0, "type": "fade", "duration_sec": 1.0},
            {"after_clip_index": 1, "type": "fadeblack", "duration_sec": 0.5}
        ]
    }
})

Note: All internal boundaries must be covered in v1. For a 3-clip timeline (after_clip_index values 0 and 1 are the two internal boundaries), both must be specified. Partial/gapped specification will return UNSUPPORTED_OPERATION.

Non-Destructive Guarantee

clipwright-transition never modifies the input timeline file. It always writes a new OTIO file to output. Existing metadata["clipwright"] keys (from other tools) are preserved; only the "transition" key is added.

Installation

Within a uv workspace:

uv run --package clipwright-transition clipwright-transition

Or install from PyPI:

pip install clipwright-transition
clipwright-transition

License

MIT — See LICENSE for details.

Metadata

Release files for clipwright-transition 0.2.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-transition 0.2.1
File Size Uploaded Provenance Actions
clipwright_transition-0.2.1.tar.gz 9.7 kB With provenance Details for clipwright_transition-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clipwright-transition 0.2.1
File Interpreter ABI Platform Actions
clipwright_transition-0.2.1-py3-none-any.whl Python 3 none any Details for clipwright_transition-0.2.1-py3-none-any.whl

Total release size: 21.7 kB

Release files / clipwright_transition-0.2.1.tar.gz

Download URL clipwright_transition-0.2.1.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ff875c7e37d811c90cb69d9a345a3e7d6d1af66b2fc1d31732318a1989052aec
BLAKE2b-256 checksum
How to use checksums
a651c07cd0d20f7100deb2a296efe7e8961885b8e36f5f12739c65182517a0a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 8, 2026.

Transparency log

Release files / clipwright_transition-0.2.1-py3-none-any.whl

Download URL clipwright_transition-0.2.1-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57387108ec8257099748daaf9dfe05258d7cf86f8a06f1b710bb95f29e0c4f9a
BLAKE2b-256 checksum
How to use checksums
99ec643427c715ea7b192de36b130d1611f2cdda7fdbb071d464443e5b6c9670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 8, 2026.

Transparency log

Security for clipwright-transition 0.2.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for clipwright_transition-0.2.1.tar.gz

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 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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