CutSmith is an AI-assisted, non-destructive video editor controlled via natural language directly in your browser. Editing commands—such as cuts, crossfades, blur transitions, and independent audio track management—compile directly into a single-pass FFmpeg filter_complex pipeline built on a strict Model-View-Controller (MVC) architecture.
Author: Erno Pakarinen / CODESMITH
Open source - Free - MIT LICENSE
- Natural Language Editing: Cut scenes, split clips at timestamps or the playhead marker, apply transitions, and manage audio tracks in English or Finnish.
- Non-Destructive Timeline: All edits are persisted in a lightweight JSON project state (
workspace/project_state.json) without modifying original source media files. - Precision Range Selection: Highlight exact ranges directly on the timeline (
Shift + drag) to target cuts, blur transitions, or crossfades across clip boundaries. - Transitions & Effects: Seamless boundary crossfades (
xfade/acrossfade), smooth animated (incremental) zoom, and static or progressive blur effects (gblur+ alpha crossfade). - Visual Object Targeting (VLM): Locate visible objects or UI elements on a video frame using a local vision model (
qwen2.5vl:3b) and chain object-targeted animated zoom with progressive blur in a single prompt. - Independent Audio Track Control: Detach or mute the original video audio track, edit video cuts and crossfades freely without audio glitches, and attach a continuous audio track across the entire timeline.
- Separate Audio Timeline: Detach video audio onto its own
audio_clipslane so picture and sound can be cut, moved, and leveled independently (J-cuts / L-cuts). - Timeline Fade In / Fade Out: Apply whole-timeline fades from/to black on both video and audio (e.g. "Tee videon alkuun 5 sekunnin fade in ja videon loppuun sama 5 sekunnin fade out").
Before installing, ensure the following are available on your system:
- Python 3.11+ (3.11 or 3.12 recommended)
- FFmpeg & FFprobe installed and available in your system
PATH - A local LLM runtime (e.g., Ollama) or an OpenAI-compatible API endpoint
Linux (Ubuntu / Debian / Linux Mint):
sudo apt update && sudo apt install -y ffmpeg python3-venv python3-pipmacOS (Homebrew):
brew install ffmpeg pythonWindows (winget):
winget install Gyan.FFmpeg Python.Python.3.12CutSmith is tested with the local Qwen3-8B model for editing commands, and optionally Qwen2.5-VL 3B for visual object targeting (locating objects/UI elements on screen for zoom):
# Install Ollama (https://ollama.com) and pull the main editing model:
ollama pull qwen3:8b
# Optional: pull the local vision model (VLM) for object-targeted zoom:
ollama pull qwen2.5vl:3b-
Clone the repository and enter the directory:
git clone https://github.com/codesmith-fi/cutsmith.git cd cutsmith -
Create and activate a virtual environment:
python3 -m venv .venv source .venv/bin/activate # Linux / macOS # .venv\Scripts\activate # Windows
-
Install Python dependencies:
pip install --upgrade pip pip install -r requirements.txt
-
Configure environment variables (optional): Copy
.env.exampleto.envto customizeOLLAMA_HOST,CUTSMITH_MODEL,CUTSMITH_KEEP_ALIVE(e.g.15son 8 GB VRAM GPUs to free memory before NVENC export),CUTSMITH_VLM_MODEL(defaultqwen2.5vl:3b), orCUTSMITH_VLM_KEEP_ALIVE(default0to unload VLM immediately after locating an object):cp .env.example .env
Start the server using the launch script or directly via Uvicorn:
chmod +x run.sh
./run.shOr manually:
.venv/bin/uvicorn web.api:app --reload \
--reload-dir agent --reload-dir compiler --reload-dir controller \
--reload-dir mcp_server --reload-dir model --reload-dir web \
--reload-exclude 'workspace/*' --port 8000Open http://localhost:8000 in your browser.
- Import Media: Drag and drop a video file (e.g.,
.mp4) onto the preview or import area. - Split or Cut:
- Click the timeline to position the playhead and type: "Split the video into two clips here" or "Split the video at 2:20".
- Hold Shift and drag across the timeline to select a range, then type: "Cut out the selected range".
- Add a Crossfade:
- Highlight a range spanning the boundary between two clips and type: "Apply a crossfade to the selected range", or specify exact durations: "Take 5 seconds from the end of clip 1 and 5 seconds from the start of clip 2 and create a crossfade".
- Add a Blur Transition:
- Highlight a scene and type: "Add a smooth blur transition to the start and end of the selected range".
- Manage Audio Independently:
- "Remove audio track from the video" → edit video clips and crossfades → "Attach audio track 1 to the video".
- Separate Audio Timeline:
- "Erota videosta ääni omalle raidalleen" → cut/move audio alone ("Siirrä ääniklippi 2 alkamaan kohdasta 0:08", "Laske ääniraidan voimakkuus puoleen").
- Timeline Fade In / Out:
- "Tee videon alkuun 5 sekunnin fade in ja videon loppuun sama 5 sekunnin fade out" or "Lisää 3 sekunnin loppuhäivytys".
- Visual Object Targeting, Animated Zoom & Progressive Blur (VLM):
- Requires
ollama pull qwen2.5vl:3b. Chain object localization, smooth incremental zoom, and progressive blur in a single prompt: "At 0:40, locate the ship in the middle, apply an incremental zoom between 0:40 and 0:45, and blur the video towards the end" (or "Zoomaa alukseen kohdassa 0:40, tee tasainen zoomaus 0:40–0:45 ja blurraa video kohti loppua").
- Requires
Run the unit and FFmpeg integration test suite with pytest:
.venv/bin/pytestcutsmith/
├── model/ # Data models (Timeline, Clip, Transition, BlurEffect, AudioTrack)
├── compiler/ # FFmpeg filter_complex compiler and preview renderer
├── controller/ # EditorController, state management, and workspace/project_state.json
├── mcp_server/ # AI agent tool interfaces
├── agent/ # LLM integration and natural language command parsing
├── web/ # FastAPI backend and browser UI
└── tests/ # Automated unit and integration tests