Supporting YouTube/Bilibili video download, automatic clipping, and smart collection generation
AutoClip is an AI-powered intelligent video clipping system that can automatically download videos from YouTube, Bilibili, and other platforms, extract exciting clips through AI analysis, and intelligently generate collections. The system adopts a modern frontend-backend separation architecture, providing an intuitive web interface and powerful backend processing capabilities.
graph TB
A[User Interface] --> B[FastAPI Backend]
B --> C[Celery Task Queue]
B --> D[Redis Cache]
B --> E[SQLite Database]
C --> F[AI Processing Engine]
F --> G[Video Processing]
F --> H[Subtitle Analysis]
F --> I[Content Understanding]
B --> J[File Storage]
K[YouTube API] --> B
L[Bilibili API] --> B
# Clone the project
git clone https://github.com/zhouxiaoka/autoclip.git
cd autoclip
# Docker one-click startup
./docker-start.sh
# Development environment startup
./docker-start.sh dev
# Stop services
./docker-stop.sh
# Check service status
./docker-status.sh
# Clone the project
git clone https://github.com/zhouxiaoka/autoclip.git
cd autoclip
# One-click startup (recommended, includes complete checks and monitoring)
./start_autoclip.sh
# Quick startup (development environment, skips detailed checks)
./quick_start.sh
# Check system status
./status_autoclip.sh
# Stop system
./stop_autoclip.sh
# 1. Create virtual environment
python3 -m venv venv
source venv/bin/activate # Linux/macOS
# or venv\Scripts\activate # Windows
# 2. Install Python dependencies
pip install -r requirements.txt
# 3. Install frontend dependencies
cd frontend && npm install && cd ..
# 4. Install Redis
# macOS
brew install redis
brew services start redis
# Ubuntu/Debian
sudo apt update
sudo apt install redis-server
sudo systemctl start redis-server
# CentOS/RHEL
sudo yum install redis
sudo systemctl start redis
# 5. Install FFmpeg
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt install ffmpeg
# CentOS/RHEL
sudo yum install ffmpeg
# 6. Configure environment variables
cp env.example .env
# Edit .env file and fill in necessary configurations
Support for local file upload
AI Intelligent Analysis
Exciting clip scoring
Video Clipping and Collections
Support for manual editing and sorting
Real-time Progress Monitoring
Error handling and retry mechanisms
Bilibili Upload Feature [In Development]
Batch upload and queue management
Subtitle Editing Feature [In Development]
The system will automatically execute the following steps:
Create .env file:
# Database configuration
DATABASE_URL=sqlite:///./data/autoclip.db
# Redis configuration
REDIS_URL=redis://localhost:6379/0
# AI API configuration
API_DASHSCOPE_API_KEY=your_dashscope_api_key
API_MODEL_NAME=qwen-plus
# Logging configuration
LOG_LEVEL=INFO
ENVIRONMENT=development
DEBUG=true
# File storage
UPLOAD_DIR=./data/uploads
PROJECT_DIR=./data/projects
autoclip/
├── backend/ # Backend code
│ ├── api/ # API routes
│ │ ├── v1/ # API v1 version
│ │ │ ├── youtube.py # YouTube download API
│ │ │ ├── bilibili.py # Bilibili download API
│ │ │ ├── projects.py # Project management API
│ │ │ ├── clips.py # Video clip API
│ │ │ ├── collections.py # Collection management API
│ │ │ └── settings.py # System settings API
│ │ └── upload_queue.py # Upload queue management
│ ├── core/ # Core configuration
│ │ ├── database.py # Database configuration
│ │ ├── celery_app.py # Celery configuration
│ │ ├── config.py # System configuration
│ │ └── llm_manager.py # AI model management
│ ├── models/ # Data models
│ │ ├── project.py # Project model
│ │ ├── clip.py # Clip model
│ │ ├── collection.py # Collection model
│ │ └── bilibili.py # Bilibili account model
│ ├── services/ # Business logic
│ │ ├── video_service.py # Video processing service
│ │ ├── ai_service.py # AI analysis service
│ │ └── upload_service.py # Upload service
│ ├── tasks/ # Celery tasks
│ │ ├── processing.py # Processing tasks
│ │ ├── upload.py # Upload tasks
│ │ └── maintenance.py # Maintenance tasks
│ ├── pipeline/ # Processing pipeline
│ │ ├── step1_outline.py # Outline extraction
│ │ ├── step2_timeline.py # Timeline analysis
│ │ ├── step3_scoring.py # Exciting scoring
│ │ └── step6_video.py # Video generation
│ └── utils/ # Utility functions
├── frontend/ # Frontend code
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── UploadModal.tsx # Upload modal
│ │ │ ├── ClipCard.tsx # Clip card
│ │ │ ├── CollectionCard.tsx # Collection card
│ │ │ └── BilibiliManager.tsx # Bilibili management
│ │ ├── pages/ # Page components
│ │ │ ├── HomePage.tsx # Home page
│ │ │ ├── ProjectDetailPage.tsx # Project detail
│ │ │ └── SettingsPage.tsx # Settings page
│ │ ├── services/ # API services
│ │ │ └── api.ts # API client
│ │ └── stores/ # State management
│ └── package.json
├── data/ # Data storage
│ ├── projects/ # Project data
│ ├── uploads/ # Upload files
│ ├── temp/ # Temporary files
│ ├── output/ # Output files
│ └── autoclip.db # Database file
├── scripts/ # Utility scripts
│ ├── start_autoclip.sh # Startup script
│ ├── stop_autoclip.sh # Stop script
│ └── status_autoclip.sh # Status check
├── docs/ # Documentation
├── logs/ # Log files
├── Dockerfile # Docker image build file
├── Dockerfile.dev # Development environment Docker file
├── docker-compose.yml # Production environment Docker orchestration
├── docker-compose.dev.yml # Development environment Docker orchestration
├── docker-start.sh # Docker startup script
├── docker-stop.sh # Docker stop script
├── docker-status.sh # Docker status check script
├── .dockerignore # Docker ignore file
├── DOCKER.md # Docker deployment documentation
└── *.sh # Startup scripts
After starting the system, visit the following addresses to view API documentation:
| Endpoint | Method | Description |
|---|---|---|
/api/v1/projects |
GET | Get project list |
/api/v1/projects |
POST | Create new project |
/api/v1/projects/{id} |
GET | Get project details |
/api/v1/youtube/parse |
POST | Parse YouTube video information |
/api/v1/youtube/download |
POST | Download You |
$ claude mcp add autoclip \
-- python -m otcore.mcp_server <graph>