Skip to content

Repository files navigation

MixCut

AI-powered video mixing and editing platform. Upload raw clips, describe your goal in plain language, and receive a polished output video — refine with natural language until satisfied.

Features

  • Multi-Agent Pipeline: LangGraph-based orchestration with Understand → Plan → Execute → Subtitle → TTS → Review → Export nodes
  • Natural Language Editing: Describe video goals in plain language; correct outputs with iterative feedback
  • Multi-Model Support: Anthropic Claude, OpenAI GPT-4o, Google Gemini, DashScope Qwen3-VL/Qwen3, Ollama (any model)
  • Video Processing: FFmpeg-powered trim, concat, resize, speed adjustment, text overlay, transitions
  • Subtitle & TTS: Whisper transcription with LLM polish, MiniMax/Volcengine TTS dubbing
  • Real-time Progress: SSE-based live job progress, agent trace logging
  • Observable: OpenTelemetry tracing, Prometheus metrics, Jaeger integration, structlog JSON logging
  • Professional UI: Next.js 15 + Tailwind CSS 4, custom video player, timeline editor, chat panel

Architecture

┌─────────────────────────────────────────────────────────┐
│ Next.js 15 Frontend │
│ TypeScript · Tailwind · TanStack Query │
└────────────────────────┬────────────────────────────────┘
│ REST + SSE
┌────────────────────────▼────────────────────────────────┐
│ FastAPI Backend │
│ API Gateway · Job Management │
├──────────────────────────────────────────────────────────┤
│ Agent Harness Layer │
│ Retry · Timeout · Circuit Breaker · Validation │
├──────────┬──────────────┬──────────────┬────────────────┤
│ Model │ LangGraph │ FFmpeg │ Storage │
│ Registry │ Multi-Agent │ Pipeline │ Local / S3 │
└──────────┴──────────────┴──────────────┴────────────────┘
│ │ │
┌────────▼──────────────▼──────────────▼─────────────────┐
│ Infrastructure │
│ PostgreSQL · Redis · MinIO · Jaeger · Prometheus │
└─────────────────────────────────────────────────────────┘

Tech Stack

LayerTechnology
FrontendNext.js 15, React 19, TypeScript, Tailwind CSS 4, TanStack Query, Zustand
BackendFastAPI, Pydantic v2, SQLAlchemy 2.0 (async), asyncpg, Alembic
AgentsLangGraph, multi-model registry with fallback routing
VideoFFmpeg (trim, concat, resize, speed, overlay, subtitle burn, audio mix)
TranscriptionWhisper large-v3
TTSMiniMax TTS, Volcengine TTS
QueueCelery 5 + Redis
DatabasePostgreSQL 16
StorageLocal filesystem / S3-compatible (MinIO)
ObservabilityOpenTelemetry, Prometheus, Jaeger, structlog

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Python 3.11+
  • Node.js 20+
  • FFmpeg

1. Start Infrastructure

cp .env.example .env
make infra-up

This starts PostgreSQL, Redis, MinIO, Jaeger, Prometheus, and Grafana.

ServiceURL
PostgreSQLlocalhost:5432
Redislocalhost:6379
MinIO APIhttp://localhost:9000
MinIO Consolehttp://localhost:9001
Jaeger UIhttp://localhost:16686
Prometheushttp://localhost:9090
Grafanahttp://localhost:3001

2. Backend

cd backend
pip install -e ".[dev]"
make backend-dev # or: uvicorn backend.main:app --reload --port 8000

3. Worker

make worker-dev # or: celery -A backend.workers.tasks worker --loglevel=INFO

4. Frontend

cd frontend
npm install
npm run dev # http://localhost:3000

API Endpoints

MethodPathDescription
GET/api/v1/healthHealth check
GET/POST/api/v1/projectsList / create projects
POST/api/v1/assets/project/{id}/uploadUpload video/image
POST/api/v1/jobsStart a render job
GET/api/v1/jobs/{id}Get job status
GET/api/v1/jobs/{id}/streamSSE progress stream
POST/api/v1/jobs/{id}/resumeResume after human review
POST/api/v1/jobs/{id}/correctSubmit correction
GET/api/v1/modelsList model providers
GET/api/v1/models/healthModel health status
POST/api/v1/exportExport final video
GET/metricsPrometheus metrics

Agent Pipeline

Upload → Understand (parallel per asset) → Plan → Execute
→ [Subtitle] → [TTS] → Human Review → Export
↓
Correct → Re-run affected nodes

Each node runs through the Agent Harness: retry with exponential backoff, per-node timeout, circuit breaker per model provider, and output schema validation.

Project Structure

MixCut/
├── backend/
│ ├── api/ # FastAPI route handlers
│ ├── agent/ # LangGraph agents & nodes
│ │ ├── agents/ # Agent definitions (understand, plan, execute, etc.)
│ │ ├── nodes/ # Node implementations
│ │ └── prompts/ # LLM prompt templates
│ ├── harness/ # Agent reliability layer
│ ├── model/ # Multi-model provider registry
│ ├── models/ # SQLAlchemy ORM models
│ ├── schemas/ # Pydantic schemas
│ ├── tools/ # FFmpeg, Whisper, TTS, storage
│ ├── workers/ # Celery tasks
│ ├── observability/ # Logging, metrics, tracing
│ └── tests/ # Backend tests
├── frontend/
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ │ ├── editor/ # Editor page components
│ │ ├── dashboard/ # Dashboard components
│ │ ├── layout/ # Shell, sidebar, topbar
│ │ └── ui/ # Design system primitives
│ ├── lib/ # API client, SSE, store, i18n
│ └── hooks/ # Custom React hooks
├── docker-compose.yml # Local infrastructure
├── Makefile # Developer commands
└── AGENTS.md # Detailed architecture spec

Development Commands

make infra-up # Start Postgres, Redis, MinIO, Jaeger, Prometheus, Grafana
make infra-down # Stop all services
make infra-logs # Follow service logs
make infra-check # Verify service endpoints
make backend-dev # Run FastAPI with hot reload
make worker-dev # Run Celery worker
make frontend-dev # Run Next.js dev server

Environment Variables

See .env.example for all configuration options including:

  • Model provider API keys (Anthropic, OpenAI, Google, DashScope, Ollama)
  • Database and Redis connection strings
  • Storage backend configuration (local / S3)
  • TTS provider credentials (MiniMax, Volcengine)
  • Agent harness tuning (timeouts, circuit breaker thresholds)
  • Observability endpoints

License

MIT

About

AI-powered video mixing and editing platform. Upload raw clips, describe your goal in plain language, and receive a polished output video — refine with natural language until satisfied.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages