AI video editor that takes natural language instructions and edits videos locally.
Project description
๐ฌ CutAI โ AI Video Editor with Natural Language
"Film it. Describe the edit. Done."
CutAI is an open-source, local-first AI video editor. Give it a video and a sentence โ it analyzes scenes, removes silence, adds subtitles, applies color grading, and renders the result. No cloud, no subscription, no upload. Everything runs on your machine.
$ cutai edit vlog.mp4 -i "remove boring parts, add subtitles, make it warm and cinematic"
๐ฌ Analyzing vlog.mp4...
โ
Detected 23 scenes (12:34)
โ
Transcribed 847 words
โ
Found 4 silent segments
๐ Edit Plan:
โข Remove 6 low-engagement scenes
โข Remove 4 silent segments
โข Add subtitles (auto-detected: English)
โข Apply warm color grade
๐ฌ Rendering โ output/vlog_edited.mp4
โ
Done! 7:21 (trimmed 42%)
โจ Features
Core Editing
- Natural language instructions โ describe edits in English or Korean
- Smart scene detection โ content-aware scene boundary detection via PySceneDetect
- Silence removal โ automatically finds and cuts dead air
- Auto-generated subtitles โ powered by Whisper, supports 99+ languages
- BGM mixing โ add mood-based background music with auto fade-in/out
- Color grading โ presets: bright, warm, cool, cinematic, vintage
- Transitions โ fade, dissolve, wipe between scenes
- Speed control โ speed up, slow down, or set custom playback rates
๐งฌ Edit Style Transfer
Extract the "editing DNA" from any video and apply it to your footage โ like LoRA for video editing.
# Extract how a YouTuber edits
$ cutai style-extract pewdiepie_video.mp4 -o pewdiepie-style.yaml
# Apply that style to your video
$ cutai style-apply myvlog.mp4 --style pewdiepie-style.yaml -o output.mp4
# Learn a channel's style from multiple videos
$ cutai style-learn vid1.mp4 vid2.mp4 vid3.mp4 --name "my-channel" -o channel-style.yaml
The Edit DNA captures rhythm (cut pacing, cuts per minute), transitions (fade vs. hard cut ratios), visual tone (brightness, saturation, color temperature), audio mixing (BGM presence, silence tolerance), and subtitle preferences โ all as a portable YAML file.
๐ฏ Smart Highlights
- Engagement scoring โ AI scores each scene (0โ100) based on audio energy, speech density, visual activity, and pacing
- Highlight reels โ auto-generate best-moments, narrative, or shorts-style highlight clips
- Duration targeting โ specify output length, and CutAI picks the best scenes to fit
๐ฌ Interactive Chat Mode
- REPL-based editing โ iteratively refine edits through conversation
- Undo/redo โ full history stack, roll back any edit
- Live preview โ generate quick 360p previews before final render
- Style loading โ load Edit DNA presets mid-session
- Slash commands โ
/preview,/render,/undo,/redo,/style,/plan,/help
๐ 100% Local & Free
- No cloud uploads โ your videos never leave your machine
- Works offline โ use with Ollama for fully air-gapped operation
- MIT licensed โ free for personal and commercial use, no usage limits
๐ Quick Start
Prerequisites
# macOS
brew install ffmpeg
# Ubuntu / Debian
sudo apt-get update && sudo apt-get install -y ffmpeg
# Windows (via Chocolatey)
choco install ffmpeg
Installation
pip install cutai
cutai --help
Your First Edit
# Basic edit โ remove silence and add subtitles
cutai edit video.mp4 -i "remove silence, add subtitles"
# Apply cinematic look
cutai edit vlog.mp4 -i "์๋ง ์ถ๊ฐ, ์๋ค๋งํฑํ๊ฒ, ๋ฐฐ๊ฒฝ์์
๋ฃ์ด์ค"
# Interactive chat mode
cutai chat video.mp4
# Quick low-res preview (5โ10ร faster)
cutai preview video.mp4 -i "remove boring parts"
Style Transfer Workflow
# 1. Extract style from a reference video
cutai style-extract reference.mp4 -o style.yaml
# 2. View what was extracted
cutai style-show style.yaml
# 3. Apply to your video
cutai edit myvideo.mp4 --style style.yaml
# Or use built-in presets
cutai edit myvideo.mp4 --style cinematic
Smart Highlights
# Generate a 60-second highlight reel
cutai highlights longvideo.mp4 --duration 60
# Shorts-style: best contiguous segment
cutai highlights longvideo.mp4 --duration 60 --style shorts
# Narrative: keep story arc (hook + ending)
cutai highlights longvideo.mp4 --duration 120 --style narrative
# View engagement scores per scene
cutai engagement video.mp4
Multi-Video Editing
# Combine clips into one video
cutai multi clip1.mp4 clip2.mp4 clip3.mp4 -i "make a travel montage"
# Combine with style
cutai multi day1.mp4 day2.mp4 -i "remove boring parts" --style vlog-casual
๐ Commands
| Command | Description |
|---|---|
cutai edit |
Full pipeline: analyze โ plan โ render |
cutai chat |
Interactive chat-based editing |
cutai analyze |
Analyze video (scenes, transcript, quality) |
cutai plan |
Generate edit plan without rendering |
cutai preview |
Quick low-res preview (360p) |
cutai multi |
Combine and edit multiple videos |
cutai highlights |
Auto-generate highlight reel |
cutai engagement |
Show per-scene engagement scores |
cutai style-extract |
Extract Edit DNA from a video |
cutai style-apply |
Apply Edit DNA to a video |
cutai style-learn |
Learn style from multiple videos |
cutai style-show |
Display Edit DNA details |
cutai prefs |
View/reset learned preferences |
๐งฌ Edit Style Transfer โ How It Works
The Idea: Every video editor has a style โ how fast they cut, which transitions they use, how they grade colors. CutAI extracts these patterns into a structured "Edit DNA" that can be saved, shared, and applied to other videos.
โโโโโโโโโโโโโโโ extract โโโโโโโโโโโโโ apply โโโโโโโโโโโโโโโโ
โ Reference โ โโโโโโโโโโโ โ Edit DNA โ โโโโโโโโโโโ โ Your Video โ
โ Video โ โ (YAML) โ โ (styled) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
Edit DNA Structure
name: cinematic
description: Slow pacing, desaturated tones, dramatic transitions
rhythm:
avg_cut_length: 6.0 # seconds between cuts
cuts_per_minute: 6.0 # overall pacing
pacing_curve: slow-fast-slow # how pace changes over time
transitions:
jump_cut_ratio: 0.5 # 50% hard cuts
fade_ratio: 0.3 # 30% fades
dissolve_ratio: 0.15 # 15% dissolves
avg_transition_duration: 1.0
visual:
avg_brightness: -0.1 # slightly darker
avg_saturation: 0.8 # desaturated
avg_contrast: 1.2 # boosted contrast
color_temperature: cool
audio:
has_bgm: true
bgm_volume_ratio: 0.2
silence_tolerance: 2.0 # allow longer pauses
subtitle:
has_subtitles: false
Think of it like image style transfer, but for video editing decisions. Or like a LoRA โ a small, portable file that shifts the behavior of the editing pipeline.
Built-in Presets
| Preset | Pacing | Color | Transitions |
|---|---|---|---|
cinematic |
Slow (6s avg cuts) | Cool, desaturated | Fades + dissolves |
vlog-casual |
Fast (2โ3s cuts) | Warm, bright | Jump cuts |
Create your own presets with cutai style-extract or write YAML by hand.
โ๏ธ Configuration
Config File
CutAI stores configuration at ~/.cutai/config.yaml:
openai_api_key: "" # For LLM-powered edit planning
default_whisper_model: base # tiny/base/small/medium/large
default_llm: gpt-4o # LLM model for planning
output_dir: ./output # Default output directory
Environment Variables
| Variable | Description |
|---|---|
OPENAI_API_KEY |
OpenAI API key (enables LLM-based planning) |
CUTAI_WHISPER_MODEL |
Default Whisper model size |
CUTAI_LLM |
Default LLM model |
CUTAI_OUTPUT_DIR |
Default output directory |
CUTAI_FFMPEG_PATH |
Custom FFmpeg binary path |
Local-Only Mode (No API Key)
CutAI works without any API key using rule-based planning. Common instructions like "remove silence", "add subtitles", "make it cinematic" are handled by built-in rules โ no LLM needed.
For more complex instructions, set OPENAI_API_KEY or use a local LLM via Ollama.
Personal Learning
CutAI learns from your editing patterns over time. Preferences are stored locally at ~/.cutai/learning.json โ your editing history never leaves your machine.
# View learned preferences
cutai prefs
# Reset learning data
cutai prefs --reset
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CutAI Pipeline โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ Analyzer โโโ Planner โโโ Editor โโโ Renderer โ โ
โ โ โ โ โ โ โ โ โ โ
โ โโข Scenes โ โโข Rules โ โโข Cutter โ โโข FFmpeg โ โ
โ โโข Whisper โ โโข LLM โ โโข Subtitleโ โโข Concat โ โ
โ โโข Quality โ โโข Style โ โโข BGM โ โโข Filters โ โ
โ โโข Energy โ โโข Learningโ โโข Color โ โ โ โ
โ โ โ โ โ โโข Speed โ โ โ โ
โ โ โ โ โ โโข Trans. โ โ โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Style Engine: Extractor โ DNA (YAML) โ Applier โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Engagement Engine: Audio + Visual + Structural โ 0-100โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Module Breakdown
cutai/
โโโ cli.py # Typer CLI with Rich formatting
โโโ config.py # Config management (~/.cutai/)
โโโ chat.py # Interactive REPL chat mode
โโโ highlight.py # Smart highlight generation
โโโ learning.py # Personal preference learning
โโโ multi.py # Multi-video editing pipeline
โโโ preview.py # Low-res preview renderer
โโโ models/
โ โโโ types.py # Pydantic v2 models (30+ types)
โโโ analyzer/
โ โโโ scene_detector.py # PySceneDetect integration
โ โโโ transcriber.py # Whisper transcription
โ โโโ quality_analyzer.py # Silence detection, audio analysis
โ โโโ engagement.py # Engagement scoring engine
โโโ editor/
โ โโโ cutter.py # Cut/trim operations
โ โโโ subtitle.py # ASS subtitle generation
โ โโโ bgm.py # Background music mixing
โ โโโ color.py # Color grading (FFmpeg filters)
โ โโโ speed.py # Speed adjustment
โ โโโ transition.py # Scene transitions
โ โโโ renderer.py # Final render orchestration
โโโ planner/
โ โโโ edit_planner.py # Rule-based + LLM planning
โโโ style/
โโโ extractor.py # Extract Edit DNA from video
โโโ applier.py # Apply Edit DNA to video
โโโ learner.py # Learn style from multiple videos
โโโ io.py # YAML serialization
โโโ presets/ # Built-in style presets
โโโ cinematic.yaml
โโโ vlog-casual.yaml
๐ค Contributing
We welcome contributions! See CONTRIBUTING.md for the full guide.
Quick Start
git clone https://github.com/mindsurf0176-ui/cutai.git
cd cutai
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -v
Ways to Contribute
- ๐ Bug reports โ open an issue with reproduction steps
- ๐งฌ Style presets โ create and share Edit DNA presets
- ๐ง New edit operations โ add operations in
cutai/editor/ - ๐ Documentation โ improve docs, add examples
- ๐ Translations โ help with i18n for rule-based patterns
๐ Benchmarks
Processing time depends on video length, Whisper model size, and whether LLM planning is used.
| Video Length | Analyze | Plan (rules) | Plan (LLM) | Render | Total (rules) |
|---|---|---|---|---|---|
| 1 min | ~5s | <1s | ~3s | ~10s | ~15s |
| 5 min | ~15s | <1s | ~5s | ~45s | ~60s |
| 15 min | ~40s | <1s | ~8s | ~2min | ~3min |
| 60 min | ~3min | <1s | ~15s | ~8min | ~11min |
Measured on M1 MacBook Pro, Whisper base model, 1080p source.
Hardware Requirements
- Minimum: 4GB RAM, any modern CPU, FFmpeg installed
- Recommended: 8GB+ RAM, Apple Silicon or modern x86-64
- Whisper models:
tiny(39MB) โlarge(3GB) โ bigger = more accurate but slower
๐บ๏ธ Roadmap
- Core editing (cuts, subtitles, BGM, color grading, transitions, speed)
- Edit Style Transfer (DNA extraction + application + learning)
- Engagement scoring + smart highlights
- Interactive chat mode with undo/redo + preview
- Multi-video editing
- Personal learning from editing patterns
- Built-in style presets
- GPU acceleration (CUDA / Metal)
- Web UI
- Plugin system for custom operations
- Community style preset marketplace
- Real-time preview during chat
- Batch processing mode
License
MIT โ free for personal and commercial use.
Star History
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 cutai-0.1.0.tar.gz.
File metadata
- Download URL: cutai-0.1.0.tar.gz
- Upload date:
- Size: 88.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee7c2ac9dd118068faf4ec27e4be309b8fa710f68f664dc7ad8d658db3bc2447
|
|
| MD5 |
176417a83e04068571973ba4e668b74e
|
|
| BLAKE2b-256 |
e3d9867da30524b3fd566987cd751bb36e4327f5be8ce61f8ae03bbe8b15f100
|
File details
Details for the file cutai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cutai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 88.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42c02809843b310b698d19a0d08911b1513d721bf8b86d91c1d8691a6a4a56db
|
|
| MD5 |
c631cf2eb0276593891a9b03fed8e8ba
|
|
| BLAKE2b-256 |
920a591bb99d84b2b1f539fc7a4cea887aa5ac41a3f28350bd79f9aaab926057
|