Professional Video Editing with Intelligent Analysis
A modern video editing platform with AI-powered analysis, built for professionals and creators
🎥 Video Processing
- Multi-format support (MP4, AVI, MOV, MKV, WebM, FLV)
- Real-time processing with live progress updates
- Advanced export options with quality controls
- Batch processing for multiple files
🤖 AI-Powered Analysis
- Intelligent scene detection and classification
- Facial emotion recognition and sentiment analysis
- Object detection and content recognition
- Audio transcription with speech-to-text
- Smart content recommendations
✂️ Professional Editing
- Timeline-based editing interface
- Real-time preview with instant feedback
- AI-suggested cuts and transitions
- Background removal and replacement
- Color grading and enhancement tools
📊 Advanced Analytics
- Engagement prediction algorithms
- Performance metrics and insights
- Content optimization suggestions
- Detailed analysis reports (PDF/JSON)
The project follows a clean, organized structure for maximum maintainability:
VideoCraft/
├── backend/ # FastAPI Python server
│ ├── app/ # Application logic
│ │ ├── api/ # REST endpoints
│ │ ├── core/ # Configuration
│ │ └── models/ # Data models
│ ├── uploads/ # File storage
│ ├── processed/ # Output files
│ └── simple_main_backup.py # Production server
├── frontend/ # React application
│ ├── src/ # Source code
│ │ ├── components/ # UI components
│ │ ├── pages/ # Page views
│ │ └── services/ # API services
│ └── build/ # Production build
├── docs/ # Documentation
├── scripts/ # Setup & start scripts
├── deployment/ # Docker & production
└── config/ # Configuration files
Backend: FastAPI, Python 3.8+, HuggingFace Transformers
Frontend: React 18, Material-UI, Axios
AI Models: DETR, Whisper, RoBERTa, MediaPipe
Deployment: Docker, Nginx, Uvicorn
- Python 3.8+ with pip
- Node.js 16+ with npm
- Git for version control
- 2GB+ RAM for AI processing
Option 1: Automated Setup (Recommended)
git clone https://github.com/your-username/VideoCraft.git
cd VideoCraft
scripts/start-videocraft.ps1 # Windows PowerShell
# or
scripts/start-videocraft.bat # Windows Command PromptOption 2: Manual Setup
- Clone & Navigate
git clone https://github.com/your-username/VideoCraft.git
cd VideoCraft- Backend Setup
cd backend
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # Linux/Mac
pip install -r requirements.txt- Frontend Setup
cd ../frontend
npm install- Start Services
# Terminal 1 - Backend
cd backend && python simple_main_backup.py
# Terminal 2 - Frontend
cd frontend && npm start- Application: http://localhost:3001
- API Documentation: http://localhost:8001/docs
- Interactive API: http://localhost:8001/redoc
Drag & Drop Interface
- Support for files up to 2GB
- Formats: MP4, AVI, MOV, MKV, WebM, FLV, M4V, 3GP
- Batch upload multiple files simultaneously
- Real-time upload progress tracking
Upload Options:
// Supported formats
const formats = ['.mp4', '.avi', '.mov', '.mkv', '.webm', '.flv'];
const maxSize = 2 * 1024 * 1024 * 1024; // 2GBAutomatic Processing Once uploaded, videos are analyzed using advanced AI:
- Scene Detection: Identifies scene changes and transitions
- Emotion Analysis: Detects facial expressions and emotional tone
- Object Recognition: Identifies people, objects, and activities
- Audio Transcription: Converts speech to searchable text
- Quality Assessment: Analyzes video and audio quality metrics
Analysis Results:
{
"scenes": [...],
"emotions": [...],
"objects": [...],
"transcription": "...",
"quality_score": 8.5
}Timeline Editor
- Drag and drop clips onto timeline
- Precise cutting and trimming tools
- Real-time preview window
- Smooth transition effects
- Layer-based editing
AI-Powered Enhancements
- Smart background removal
- Automatic color correction
- Noise reduction for audio
- Intelligent cropping suggestions
- Content-aware scaling
Multiple Export Formats
- Video Export: MP4, AVI, MOV with quality options
- PDF Reports: Comprehensive analysis summaries
- JSON Data: Raw analysis data for developers
- Project Files: Save editing sessions
Export API Example:
// Export video with custom settings
await exportService.exportVideo(projectId, {
format: 'mp4',
quality: 'high',
resolution: '1920x1080'
});Batch Processing Process multiple videos with consistent settings:
# API endpoint for batch processing
POST /api/batch/process
{
"files": ["video1.mp4", "video2.mp4"],
"settings": {"auto_enhance": true}
}Custom Workflows Create reusable editing templates:
const workflow = {
steps: [
{ type: 'analyze', settings: {...} },
{ type: 'enhance', settings: {...} },
{ type: 'export', format: 'mp4' }
]
};Upload & File Management
POST /api/upload/video # Upload video files (up to 2GB)
GET /api/upload/list # List uploaded files
DELETE /api/upload/{filename} # Delete specific fileAI Analysis
POST /api/analyze/video # Comprehensive video analysis
POST /api/analyze/scenes # Scene detection only
POST /api/analyze/emotions # Emotion recognition
POST /api/analyze/objects # Object detectionProcessing & Enhancement
POST /api/process/enhance # AI-powered enhancement
POST /api/process/background # Background removal
POST /api/process/color # Color correction
POST /api/process/audio # Audio enhancementExport & Output
POST /api/export/video # Export processed video
POST /api/export/report # Generate PDF report
POST /api/export/data # Export JSON analysis
GET /api/export/status # Check export progressPOST /api/auth/login # User authentication
GET /api/projects # List user projects
POST /api/projects # Create new project
PUT /api/projects/{id} # Update project
DELETE /api/projects/{id} # Delete projectGET /api/status/{task_id} # Get processing status
GET /api/progress/{job_id} # Real-time progress updates
POST /api/cancel/{task_id} # Cancel running taskCreate .env files for configuration:
Backend Configuration (backend/.env)
# Server Settings
HOST=0.0.0.0
PORT=8001
DEBUG=false
WORKERS=4
# File Upload
MAX_UPLOAD_SIZE=2147483648 # 2GB
UPLOAD_DIR=./uploads
TEMP_DIR=./temp
# AI Models
USE_GPU=false
CACHE_DIR=./models_cache
MODEL_TIMEOUT=300
# Database
DATABASE_URL=sqlite:///./videocraft.dbFrontend Configuration (frontend/.env)
REACT_APP_API_URL=http://localhost:8001
REACT_APP_MAX_FILE_SIZE=2147483648
PORT=3001
BROWSER=none
GENERATE_SOURCEMAP=falseDocker Deployment
cd deployment/
docker-compose -f docker-compose.production.yml up -dManual Production Setup
# Build frontend
cd frontend && npm run build
# Start production backend
cd backend && python simple_main_backup.py --production
# Configure Nginx (optional)
cp config/nginx.production.conf /etc/nginx/sites-available/videocraftBackend Optimization
# Increase worker processes
uvicorn.run("main:app", workers=4, port=8001)
# Enable caching
CACHE_ENABLED=true
REDIS_URL=redis://localhost:6379Frontend Optimization
// Code splitting
const LazyComponent = lazy(() => import('./Component'));
// Bundle analysis
npm run build -- --analyzeBackend Organization
backend/app/
├── api/ # Route handlers
├── core/ # Configuration & utilities
├── models/ # Database models
├── services/ # Business logic
└── dependencies/ # Dependency injection
Frontend Organization
frontend/src/
├── components/ # Reusable UI components
├── pages/ # Route-level components
├── services/ # API communication
├── hooks/ # Custom React hooks
├── context/ # Global state management
└── utils/ # Helper functions
1. Backend API Endpoint
# backend/app/api/new_feature.py
from fastapi import APIRouter, Depends
from app.services.new_service import NewService
router = APIRouter()
@router.post("/new-feature")
async def create_feature(
data: FeatureSchema,
service: NewService = Depends()
):
return await service.process(data)2. Frontend Integration
// frontend/src/services/newFeatureAPI.js
import axios from 'axios';
export const newFeatureAPI = {
async process(data) {
const response = await axios.post('/api/new-feature', data);
return response.data;
}
};3. React Component
// frontend/src/components/NewFeature.jsx
import { useState } from 'react';
import { newFeatureAPI } from '../services/newFeatureAPI';
export const NewFeature = () => {
const [result, setResult] = useState(null);
const handleProcess = async (data) => {
const result = await newFeatureAPI.process(data);
setResult(result);
};
return <div>...</div>;
};Backend Tests
cd backend
pip install pytest pytest-asyncio
pytest tests/ -v --cov=appFrontend Tests
cd frontend
npm test -- --coverage --watchAll=falseIntegration Tests
# Full application testing
scripts/test-integration.ps1🔧 Server Won't Start
# Check port availability
netstat -ano | findstr :8001
netstat -ano | findstr :3001
# Kill existing processes
taskkill /f /im python.exe
taskkill /f /im node.exe
# Use alternative ports
python simple_main_backup.py --port 8002
npm start -- --port 3002🔧 Upload Fails
# Check disk space
dir c:\ | findstr "bytes free"
# Verify file permissions
icacls uploads /grant Everyone:F
# Clear temporary files
del /q temp\*.*🔧 AI Models Not Loading
# Clear model cache
rmdir /s models_cache
mkdir models_cache
# Reinstall dependencies
pip uninstall transformers torch
pip install transformers torch --no-cache-dir🔧 Frontend Build Issues
# Clear npm cache
npm cache clean --force
# Delete and reinstall
rmdir /s node_modules
del package-lock.json
npm installMemory Optimization
# Reduce model precision
import torch
model = model.half() # Use 16-bit precision
# Limit batch size
BATCH_SIZE = 1 # For low-memory systemsNetwork Optimization
// Implement request caching
const cache = new Map();
const cachedRequest = async (url) => {
if (cache.has(url)) return cache.get(url);
const result = await fetch(url);
cache.set(url, result);
return result;
};- Fork & Clone
git clone https://github.com/YOUR-USERNAME/VideoCraft.git
cd VideoCraft
git remote add upstream https://github.com/ORIGINAL-OWNER/VideoCraft.git- Create Feature Branch
git checkout -b feature/amazing-new-feature- Development Setup
# Install development dependencies
pip install -r backend/requirements-dev.txt
npm install --dev
# Enable pre-commit hooks
pre-commit install- Make Changes & Test
# Run tests
npm test
pytest
# Check code quality
npm run lint
flake8 backend/- Submit Pull Request
git add .
git commit -m "feat: add amazing new feature"
git push origin feature/amazing-new-featurePython (Backend)
- Follow PEP 8 style guide
- Use type hints for all functions
- Write docstrings for public methods
- Maintain 90%+ test coverage
JavaScript (Frontend)
- Use ESLint configuration
- Follow React best practices
- Implement proper error boundaries
- Use TypeScript for complex components
- Clear Description: Explain what and why
- Tests Included: Cover new functionality
- Documentation Updated: Update relevant docs
- Breaking Changes: Clearly marked and explained
This project is licensed under the MIT License - see the LICENSE file for details.
AI Models & Libraries
- HuggingFace for transformer models
- OpenAI for Whisper speech recognition
- Google for MediaPipe framework
- Facebook Research for DETR object detection
Frameworks & Tools
- FastAPI for high-performance backend
- React for modern frontend development
- Material-UI for beautiful UI components
- Docker for containerization
Made with ❤️ by the VideoCraft AI Team
Current Version: 1.0.0
Last Updated: August 2025
Production Ready: ✅
Active Development: ✅
For detailed project status, see docs/PROJECT_STATUS.md