Skip to main content

MoviePy-style Python bindings for the Cutlass video engine.

Project description

cutlass (Python)

MoviePy-style Python bindings for the Cutlass video engine. Build a project with explicit tracks, place clips, animate properties, and export — all through a track-first object model over the pure-Rust timeline, GPU compositor, and platform-native exporter.

See api-design.md for the full v2 API reference.

Install

pip install --pre cutlass-py   # imports as `cutlass`

Wheels ship for macOS (Apple Silicon) and Windows (x64), Python 3.9+. The distribution is named cutlass-py (the bare cutlass name on PyPI belongs to an unrelated project); the module you import is cutlass. --pre is needed while releases carry a pre-release version (e.g. 0.5.3a0).

Install (from source)

Requires the Rust toolchain and maturin.

cd crates/cutlass-py
python3 -m venv .venv && source .venv/bin/activate
pip install maturin numpy
maturin develop --release      # builds + installs `cutlass` into the venv

Quick start

import cutlass
from cutlass import Project, Text, Solid

p = Project("demo", fps=30, canvas="16:9", background=(20, 20, 30))

bg = p.add_track("sticker", name="Background")
overlay = p.add_track("text", name="Titles")

bg.add(Solid((38, 42, 64, 255)), start=0.0, duration=2.0)
title = overlay.add(
    Text("Cutlass", size=220, color="#f0f0ff"),
    start=0.0,
    duration=2.0,
)
title.animate(opacity=[(0.0, 0.0), (0.5, 1.0)], easing="ease_out")

print(p)                      # Project(size=(1920, 1080), fps=30.000, duration=2.000s)
frame = p.get_frame(0.5)      # numpy uint8 array, shape (height, width, 4), RGBA
p.export("out.mp4")           # H.264/mp4 (+ AAC when audio clips exist)
p.save("demo.cutlass")

Object model

Project
├── media pool          p.import_media(path) -> Media
├── tracks              p.add_track(kind) -> Track
│   └── clips           track.add(content, start=...) -> Clip
│       ├── transform / crop / speed / volume
│       ├── effects     clip.add_effect(id) -> Effect
│       └── transition  clip.transition(id, duration=...)
└── render              p.get_frame(t), p.export(path)

Tracks are explicit. Create a track, then add clips to it. Content descriptors (Text, Solid, shapes, media.subclip(...)) describe what; track.add decides where and when.

Animation: set constants with properties (clip.opacity = 0.5) or keyframes with clip.animate(opacity=1.0, at=0.4) / batch curves clip.animate(opacity=[(0.0, 0.0), (0.4, 1.0)]).

Media import

import_media accepts probed video and audio files. Still images are deferred (the renderer has no still decoder yet); PNG/JPEG/etc. raise MediaError.

clip = p.import_media("footage.mp4")
main = p.add_track("video")
main.add(clip.subclip(3.0, 8.0), start=0.0)
main.add(clip[3:8], start=0.0)   # slicing sugar

Track kinds

video, audio, text, sticker, effect, filter, adjustment — the kind must match the clip content (TrackKindError on mismatch): media goes on video/audio, Text on text, Solid and shapes on sticker.

Errors

Exception When
OverlapError Clips overlap on the same track
TrackKindError Wrong track kind for content
MediaError Import/probe failure, still images
RenderError GPU frame or export failure

Development

maturin develop                     # debug build into the active venv
pip install pytest
python -m pytest tests/ -q          # full API suite (bootstraps its own mp4 via export)
python tests/smoke.py               # quick GPU frame smoke test
python examples/tour.py             # optional; needs sample media paths

Rust-side unit tests cover the pure conversion helpers. The test binary links libpython, so on macOS point dyld at the Python framework:

DYLD_FRAMEWORK_PATH="$(python3 -c 'import sys; print(sys.base_prefix.rsplit("/Python3.framework", 1)[0])')" \
    cargo test --no-default-features

Export: uses the platform-native encoder — Apple (VideoToolbox) and Windows (Media Foundation), both H.264 + AAC → mp4. Other platforms raise until their backends land.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cutlass_py-0.5.3a0.tar.gz (430.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cutlass_py-0.5.3a0-cp314-cp314-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.14Windows x86-64

cutlass_py-0.5.3a0-cp314-cp314-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

cutlass_py-0.5.3a0-cp313-cp313-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.13Windows x86-64

cutlass_py-0.5.3a0-cp313-cp313-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

cutlass_py-0.5.3a0-cp312-cp312-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.12Windows x86-64

cutlass_py-0.5.3a0-cp312-cp312-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

cutlass_py-0.5.3a0-cp311-cp311-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.11Windows x86-64

cutlass_py-0.5.3a0-cp311-cp311-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

cutlass_py-0.5.3a0-cp310-cp310-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.10Windows x86-64

cutlass_py-0.5.3a0-cp310-cp310-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

cutlass_py-0.5.3a0-cp39-cp39-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.9Windows x86-64

cutlass_py-0.5.3a0-cp39-cp39-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file cutlass_py-0.5.3a0.tar.gz.

File metadata

  • Download URL: cutlass_py-0.5.3a0.tar.gz
  • Upload date:
  • Size: 430.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cutlass_py-0.5.3a0.tar.gz
Algorithm Hash digest
SHA256 139b42747acf1492bc4451d0f1e9b61ad7b03d2b4786236145410e91cb6e6e85
MD5 a36305c5aaea42489399169b73c15ab5
BLAKE2b-256 a4801191cfbdcf1197d17ff5d99336f76781f9a5d94fdfbb0104bf64d971528d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0.tar.gz:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 810b5d8080b049a00e65bdfd7e4bffd26319e14d7d4632a7b6684b3989a74d92
MD5 2b8c8112dd6a5d830d4a8ca3f8b3fc27
BLAKE2b-256 2c791f95f7e8d103967846f54ba53a027fdf4e8cd2cdef5458aaddb41cf700f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp314-cp314-win_amd64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 057b919de84cb03b43fd6f34c295b9e68bc32309a711cd1490c5e0ee0fb95a27
MD5 f38540af4bacb61a89a7805a7d3d7fd4
BLAKE2b-256 3ef3f57554371d7742268b8c9a4a75e34f9f4f0204ce4a47feb8d7cc0817959e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 85f82a867be15d82f8f1b9e444bbc0b4b6a10e87a4bab2e4091f5cb56178aa82
MD5 d8b85020955b36e3cf1a29259f39be41
BLAKE2b-256 b143cbb210ef30b890e94be80913668ede094962af27f2050dedaa4e0431578e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp313-cp313-win_amd64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 813c7094e96439ed0f230a104d693e938cf238629f6009923815086afaf6d0d1
MD5 a9a82aec6fefdd2a700ff324a16af776
BLAKE2b-256 816c554f52ff7f7e91b321ae6cdc411d5278263d87ca0b400c13abde7d86fcb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bdfb071da4bf74703b8caa795cd8529b38e88217d0d47c1f2f68fad1c40d47cf
MD5 ccf06eb243106cfbb347f3081476f54e
BLAKE2b-256 31e71e85edd07d1c4e55cec7bb05e81ee6c471a94757dc642b330e85084c819e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp312-cp312-win_amd64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 13384be178606acc8ee55407d8e9cdcaea7f166fccf36cd25b9d9fe3e46d3e18
MD5 e839a8b699c44ae24e2360fb76144fdd
BLAKE2b-256 8b98074a9689e66b737f2a782db778675abc905338308b768a6ce920c0bf5549

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e5d1ca9ef5b9458e203ce9e644f99ffccf40c9871e28d03bb856abe83e6cc842
MD5 730c26aa4d59d809d25240909731ba80
BLAKE2b-256 2c891f515e546d9664dbba6a2788378031b9e385b78a6c3ed81ab2a026bd27c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp311-cp311-win_amd64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9350cfdc158990e9fe86c529cb58d9e6e7ae6bdca6e8104a6832e048d4c1e75a
MD5 3ff1b77f43be4d4805a8836244d70d20
BLAKE2b-256 79b4689e5323bd0a27249d7d504578f2fba2a82fad0db9ca0c3b33c72e961dfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 884bc57321f2f76b7a1df7088e7c00a56d200e243c0eaf74885fafdaa1150880
MD5 07179fd079846e47d95c0d51f8fd9336
BLAKE2b-256 2d4e0652b6cdb4fc0e32911467e0b8095393e72abbf6b4af89f4d4fd8b528c7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp310-cp310-win_amd64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ec45209cb4b720f6a03e59ccb8e9f092d9cbe988e8936dba6a60724b23aadd7
MD5 d372cba4492711ebedc23dbf15af808b
BLAKE2b-256 809b87f935af5865f623728749daf3628a1ac88ff9b4fb64179fc0d10925dfbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: cutlass_py-0.5.3a0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cutlass_py-0.5.3a0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3b7d997a02d1534b4955eeacc2d4612401373eec3b2e2b54e6244ad7d0e54398
MD5 9b604b34888e39efc7fe4fb8d057c1e2
BLAKE2b-256 ad62776b02984a6445472af4d67e11c4d3d243af577d5495957579514342b79e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp39-cp39-win_amd64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cutlass_py-0.5.3a0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cutlass_py-0.5.3a0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 152387215163495017c5dae95eb03d599028a2677a4e7d3fbd2ad4ca36aeedbf
MD5 3b0c5196f0d598c1825402f6a799469b
BLAKE2b-256 330e36766f0ce5994659e84ea07e87f281670c6ac51e14bb309e9d88a58473a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cutlass_py-0.5.3a0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: pywheels.yml on 1mrnewton/cutlass

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page