Skip to main content

videopython

PyPI Python License CI

Structured, local-first video editing for Python and AI agents.

Videopython represents an edit as a validated Python model or JSON plan. Whether the plan comes from your code, an LLM, or an MCP client, it renders through the same streaming engine with bounded frame buffers.

Documentation · First edit · API reference

Why videopython?

  • Structured edits — segments and operations are Pydantic models with a generated JSON Schema.
  • Predictable rendering — validate dimensions, timing, and operation constraints before decoding frames.
  • Bounded memory — stream decode, effects, and encode without loading the full source into memory.
  • Local AI — add transcription, scene understanding, generation, dubbing, and automatic editing without cloud inference APIs.
  • Agent-ready tools — expose analysis, planning, validation, and rendering through the included MCP server.

Installation

Install FFmpeg, then run uv add videopython (or pip install videopython). The optional ai and mcp extras add model runtimes and the MCP server. See the installation guide for supported Python versions, extras, FFmpeg features, and model setup.

Quick start

Describe the edit, validate it without loading frames, then render it:

from videopython.editing import VideoEdit

edit = VideoEdit.from_dict({
    "segments": [
        {
            "source": "input.mp4",
            "start": 10.0,
            "end": 20.0,
            "operations": [
                {"op": "resize", "width": 1080, "height": 1920},
                {"op": "color_adjust", "saturation": 1.15, "contrast": 1.05},
                {"op": "fade", "mode": "in", "duration": 0.5},
            ],
        }
    ]
})

edit.validate()
edit.run_to_file("output.mp4")

run_to_file() streams the source through FFmpeg and the operation pipeline, so frame buffers stay bounded for long videos. Continue with Your first edit.

What you can build

Area Capabilities Start here
Editing Cuts, transforms, effects, overlays, subtitles, audio, and multi-segment plans Editing guides
AI workflows Transcription, detection, scene understanding, generation, dubbing, and automatic editing Local AI
LLM integrations Generated schemas, structured validation, repair, and dimension normalization LLM plan guide
MCP agents Local tools for media analysis, planning, validation, and rendering MCP guide

Core editing does not install PyTorch or other model runtimes. AI dependencies load only when you use an AI feature.

Scope

Videopython is a library for programmatic editing. It does not provide a hosted inference service, an interactive editing application, universal support for model runtimes and FFmpeg builds, or a second in-memory operation engine.

Project status

Videopython follows semantic versioning. See the compatibility policy for public contracts and versioning rules, and release notes for changes between versions. Report vulnerabilities through the security policy.

For local setup, tests, documentation builds, and releases, see DEVELOPMENT.md.

Metadata

Release files for videopython 1.0.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 videopython 1.0.1
File Size Uploaded Provenance Actions
videopython-1.0.1.tar.gz 1.1 MB With provenance Details for videopython-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for videopython 1.0.1
File Interpreter ABI Platform Actions
videopython-1.0.1-py3-none-any.whl Python 3 none any Details for videopython-1.0.1-py3-none-any.whl

Total release size: 2.3 MB

Release files / videopython-1.0.1.tar.gz

Download URL videopython-1.0.1.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
901b1e061e17f8600065f406254f2f7da5b32321f0d0c79129b9f23695283f21
BLAKE2b-256 checksum
How to use checksums
8386a021269f58f7184bdadda8e589fb3131734e69e6f7a16f568d92db5c1813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

Release files / videopython-1.0.1-py3-none-any.whl

Download URL videopython-1.0.1-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f9705760aafe0dabe514dec084b6d68f0cb01440f12b38043687ad6c09ae3c66
BLAKE2b-256 checksum
How to use checksums
22cb72e7354b3d8bc60813142b9998b70cf986aaf9905aebc24a1d6d36d11ab1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

Security for videopython 1.0.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 videopython-1.0.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 Nov 28, 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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

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