17 KiB
🎬 CapCutAPI - Enterprise Video Editing Automation Platform
🚀 Open source CapCut API tool with MCP (Model Context Protocol) support
🎯 Project Overview
CapCutAPI is a powerful enterprise-grade video editing automation platform built with Python, providing complete CapCut video editing capabilities. Through dual interfaces of HTTP API and MCP protocol, it enables seamless integration with AI assistants and automation tools.
🏆 Core Advantages
|
🎬 Professional Video Editing
|
🤖 AI Smart Integration
|
|
🔌 Dual API Interfaces
|
🌍 Cross-platform Compatibility
|
🎥 Product Showcase
🚀 Core Features
📋 Feature Matrix
| Feature Module | HTTP API | MCP Protocol | Description |
|---|---|---|---|
| 🎬 Draft Management | ✅ | ✅ | Create, read, modify, save CapCut draft files |
| 🎥 Video Processing | ✅ | ✅ | Multi-format video import, editing, transitions, effects |
| 🔊 Audio Editing | ✅ | ✅ | Audio tracks, volume control, audio effects |
| 🖼️ Image Processing | ✅ | ✅ | Image import, animations, masks, filters |
| 📝 Text Editing | ✅ | ✅ | Multi-style text, shadows, backgrounds, animations |
| 📄 Subtitle System | ✅ | ✅ | SRT subtitle import, styling, time sync |
| ✨ Effects Engine | ✅ | ✅ | Visual effects, filters, transition animations |
| 🎭 Sticker System | ✅ | ✅ | Sticker assets, position control, animation effects |
| 🎯 Keyframes | ✅ | ✅ | Property animations, timeline control, easing functions |
| 📊 Media Analysis | ✅ | ✅ | Video duration detection, format analysis |
🛠️ API Interface Overview
📡 HTTP API Endpoints (9 endpoints)
Trae 参考了 2 个上下文 README-zh.md README.md 📝 README 文档更新完成 我已经为您准备了优化后的 README 文档内容,包括英文版和中文版。以下是完整的文档内容:📄 英文文档 (README.md) README.md
应用
🎬 CapCutAPI - Enterprise Video Editing Automation Platform



🚀 Open source CapCut API tool with MCP (Model Context Protocol) support🌐 Try Online • 📖 中文文档 • 🔧 MCP Docs • 🌍 MCP 中文指南---## 🎯 Project OverviewCapCutAPI is a powerful enterprise-grade video editing automation platform built with Python, providing complete CapCut video editing capabilities. Through dual interfaces of HTTP API and MCP protocol, it enables seamless integration with AI assistants and automation tools.### 🏆 Core Advantages
| 🎬 Professional Video Editing- Complete CapCut functionality support- Multi-track timeline editing- Advanced effects and transitions- Keyframe animation system | 🤖 AI Smart Integration- Native MCP protocol support- Seamless AI assistant integration- Automated workflow processes- Batch processing capabilities |
| 🔌 Dual API Interfaces- RESTful HTTP API- Model Context Protocol- Real-time processing response- Enterprise-grade stability | 🌍 Cross-platform Compatibility- CapCut International support- JianYing China support- Windows/macOS compatible- Cloud deployment ready |
### 🎵 Music Video Production
AI-driven video generation powered by CapCutAPI📡 HTTP API Endpoints (9 endpoints)
🎬 Draft Management ├── POST /create_draft # Create new draft └── POST /save_draft # Save draft file
🎥 Media Assets ├── POST /add_video # Add video material ├── POST /add_audio # Add audio material └── POST /add_image # Add image material
📝 Text Content ├── POST /add_text # Add text elements └── POST /add_subtitle # Add subtitle files
✨ Effect Enhancement ├── POST /add_effect # Add visual effects └── POST /add_sticker # Add sticker elements
🔧 MCP Tool Set (11 tools)
🎬 Project Management ├── create_draft # Create video project └── save_draft # Save project file🎥 Media Editing ├── add_video # Video track + transition effects ├── add_audio # Audio track + volume control └── add_image # Image assets + animation effects
📝 Text System ├── add_text # Multi-style text + shadow background └── add_subtitle # SRT subtitles + styling
✨ Advanced Features ├── add_effect # Visual effects engine ├── add_sticker # Sticker animation system ├── add_video_keyframe # Keyframe animations └── get_video_duration # Media information retrieval
| 🐍 Python Environment | Python 3.8.20+ (Recommended 3.10+) |
| 🎬 CapCut Application | CapCut International or JianYing China |
| 🎵 FFmpeg | For media file processing and analysis |
| 💾 Storage Space | At least 2GB available space |
| **🌐 HTTP API Server**```bashpython capcut_server.py```*Default port: 9001* | **🔧 MCP Protocol Server**```bashpython mcp_server.py```*Supports stdio communication* |
📹 Adding Video Material
```pythonimport requests# Add background videoresponse = requests.post("http://localhost:9001/add_video", json={ "video_url": "https://example.com/background.mp4", "start": 0, "end": 10, "width": 1080, "height": 1920, "volume": 0.8, "transition": "fade_in"})print(f"Video addition result: {response.json()}")```📝 Creating Styled Text
```pythonimport requests# Add title textresponse = requests.post("http://localhost:9001/add_text", json={ "text": "🎬 Welcome to CapCutAPI", "start": 0, "end": 5, "font": "Arial", "font_color": "#FFD700", "font_size": 48, "shadow_enabled": True, "background_color": "#000000"})print(f"Text addition result: {response.json()}")```🎯 Complete Workflow
```python# 1. Create new projectdraft = mcp_client.call_tool("create_draft", { "width": 1080, "height": 1920})draft_id = draft["result"]["draft_id"]# 2. Add background videomcp_client.call_tool("add_video", { "video_url": "https://example.com/bg.mp4", "draft_id": draft_id, "start": 0, "end": 10, "volume": 0.6})# 3. Add title textmcp_client.call_tool("add_text", { "text": "AI-Driven Video Production", "draft_id": draft_id, "start": 1, "end": 6, "font_size": 56, "shadow_enabled": True, "background_color": "#1E1E1E"})# 4. Add keyframe animationmcp_client.call_tool("add_video_keyframe", { "draft_id": draft_id, "track_name": "main", "property_types": ["scale_x", "scale_y", "alpha"], "times": [0, 2, 4], "values": ["1.0", "1.2", "0.8"]})# 5. Save projectresult = mcp_client.call_tool("save_draft", { "draft_id": draft_id})print(f"Project saved: {result['result']['draft_url']}")```Copyright (c) 2024 CapCutAPI Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...