Skip to main content

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."

License: MIT Python 3.10+ PyPI version CI

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

Star History Chart

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

cutai-0.1.0.tar.gz (88.3 kB view details)

Uploaded Source

Built Distribution

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

cutai-0.1.0-py3-none-any.whl (88.2 kB view details)

Uploaded Python 3

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

Hashes for cutai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ee7c2ac9dd118068faf4ec27e4be309b8fa710f68f664dc7ad8d658db3bc2447
MD5 176417a83e04068571973ba4e668b74e
BLAKE2b-256 e3d9867da30524b3fd566987cd751bb36e4327f5be8ce61f8ae03bbe8b15f100

See more details on using hashes here.

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

Hashes for cutai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42c02809843b310b698d19a0d08911b1513d721bf8b86d91c1d8691a6a4a56db
MD5 c631cf2eb0276593891a9b03fed8e8ba
BLAKE2b-256 920a591bb99d84b2b1f539fc7a4cea887aa5ac41a3f28350bd79f9aaab926057

See more details on using hashes here.

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