An AI-powered video editing application that allows you to edit videos using natural language commands. Built with FastAPI, React, TypeScript, and Convex.
- Natural Language Commands: Edit videos by simply telling the AI what you want to do
- Automatic Transcription: Whisper-powered speech-to-text with word-level timestamps
- Smart Video Editing: Cut, trim, add captions, and remove filler words
- Platform-Optimized Export: Export videos for TikTok, YouTube, LinkedIn, and more
- Real-time Collaboration: Work on videos with your team in real-time (future feature)
- Modern UI: Beautiful, responsive interface built with React and Tailwind CSS
- FastAPI: High-performance Python web framework
- Convex: Real-time database and backend functions
- Whisper: OpenAI's speech recognition model
- FFmpeg: Video processing and manipulation
- OpenAI: Natural language processing for command parsing
- React 18: Modern React with hooks and concurrent features
- TypeScript: Type-safe JavaScript
- Vite: Fast build tool and dev server
- Tailwind CSS: Utility-first CSS framework
- Zustand: Lightweight state management
- React Query: Server state management
- Video.js: Video player component
- Node.js 18+ and npm
- Python 3.11+
- FFmpeg installed on your system
- OpenAI API key
-
Clone the repository
git clone <repository-url> cd ai-video-editor
-
Install dependencies
# Install root dependencies npm install # Install frontend dependencies cd frontend && npm install # Install backend dependencies cd ../backend && pip install -r requirements.txt
-
Set up environment variables
# Copy backend environment file cd backend cp env.example .env # Edit .env with your API keys OPENAI_API_KEY=your_openai_key_here
-
Set up Convex
cd backend npx convex dev --once -
Start the development servers
# From the root directory npm run dev
This will start:
- Frontend: http://localhost:3000
- Backend: http://localhost:8000
- Convex: https://ai-video-editor.convex.cloud
- Upload a Video: Drag and drop or click to upload a video file
- Wait for Processing: The system will automatically transcribe your video
- Start Editing: Use natural language commands like:
- "Find where they talk about fundraising"
- "Remove all filler words"
- "Cut from 1:30 to 2:00"
- "Add captions with yellow text"
- "Export as TikTok video"
- "Find where he talks about fundraising"
- "Jump to 2 minutes 30 seconds"
- "Search for technical features"
- "Cut from 1:30 to 2:00"
- "Remove all ums and ahs"
- "Trim to first 60 seconds"
- "Keep only the introduction"
- "Add yellow captions, size 24"
- "Make captions bold and centered"
- "Add professional captions"
- "Export as TikTok video"
- "Make it vertical for mobile"
- "Export for LinkedIn"
ai-video-editor/
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── stores/ # Zustand state stores
│ │ ├── services/ # API services
│ │ ├── types/ # TypeScript types
│ │ └── utils/ # Utility functions
│ └── package.json
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── routers/ # API endpoints
│ │ ├── services/ # Business logic
│ │ └── config.py # Configuration
│ ├── convex/ # Convex functions
│ └── requirements.txt
└── package.json # Root package.json
POST /api/upload- Upload video fileGET /api/videos- List all videosGET /api/videos/{id}- Get video detailsDELETE /api/videos/{id}- Delete video
POST /api/transcribe/{video_id}- Start transcriptionGET /api/transcript/{video_id}- Get transcriptGET /api/search/{video_id}- Search transcript
POST /api/edit/trim/{video_id}- Trim videoPOST /api/edit/cut/{video_id}- Cut video segmentsPOST /api/edit/captions/{video_id}- Add captionsPOST /api/edit/export/{video_id}- Export video
POST /api/chat- Process natural language commandPOST /api/chat/execute/{video_id}- Execute command on videoGET /api/chat/history/{video_id}- Get chat history
cd backend
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend
npm run devcd backend
npx convex dev# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test# Build frontend
cd frontend
npm run build
# Build backend
cd backend
# (FastAPI doesn't need building)# Build and run with Docker Compose
docker-compose up --build- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for Whisper and GPT models
- Convex for the real-time database
- FFmpeg for video processing
- The open-source community for all the amazing tools and libraries
If you encounter any issues or have questions, please:
- Check the Issues page
- Create a new issue with detailed information
- Join our Discord for community support
Built with ❤️ for the hackathon community