GuanYixuan/pyCapCut
A lightweight, flexible, and easy-to-use Python tool for generating CapCut drafts to build automated video editing/remix pipelines! Another similar project: https://github.com/GuanYixuan/pyJianYingDraft
What it solves
This project provides a programmatic way to generate and edit CapCut draft files using Python. It allows users to automate the creation of video projects, including adding media, text, effects, transitions, and keyframes, which can then be opened and exported via the desktop CapCut application.
How it works
It interacts directly with the draft_content.json files used by CapCut. Users define their video structure—such as tracks, segments, and effects—using the library's Python classes. The tool handles the complex internal data structures of CapCut drafts, allowing for template-based editing, material replacement, and precise timing control using either microsecond units or human-readable time strings.
Who it’s for
This tool is designed for content creators, developers, or editors who want to automate repetitive video editing tasks, create batch video content, or build custom video generation pipelines that leverage CapCut's rendering engine.
Highlights
- Programmatic Editing: Full control over tracks, segments, and media properties via Python.
- Template Support: Load existing drafts as templates to swap out media, text, or specific segments while preserving complex styles.
- Rich Feature Set: Supports keyframes, masks, chroma keying, blend modes, animations, and filters.
- Flexible Timing: Supports both microsecond-based precision and convenient time strings (e.g., "1.5s", "1m").
- SRT Integration: Easily import subtitle files into dedicated text tracks.
Related
- Project
- Project
- Project
- Project