A robust Node.js/Express server for handling video uploads, real-time recording, and AI-powered video processing.
- Real-time video recording via WebSocket
- Chunked video upload support using TUS protocol
- AWS S3 integration for video storage
- Video transcription using AssemblyAI
- AI-powered summary generation using Google's Gemini
- Support for multiple video formats (MP4, WebM, MOV, AVI)
- Plan-based limitations (Basic/Pro)
- FFmpeg integration for audio extraction and video processing
- Node.js & Express
- TypeScript
- Socket.IO for real-time communication
- TUS Server for resumable uploads
- AWS SDK for S3 storage
- FFmpeg for video processing
- AssemblyAI for transcription
- Google Gemini AI for summarization
- Node.js (v14 or higher)
- FFmpeg installed on the system
- AWS S3 bucket and credentials
- AssemblyAI API key
- Google Gemini API key
Create a .env file in the root directory:
# Server Configuration
VIDEO_SERVER_PORT=5000
NEXT_API_HOST=http://localhost:3000/api
RECORDER_HOST=http://localhost:3000
# AWS Configuration
BUCKET_NAME=your-bucket-name
ACCESS_KEY=your-aws-access-key
SECRET_KEY=your-aws-secret-key
BUCKET_REGION=your-bucket-region
# API Keys
ASSEMBLY_AI_KEY=your-assembly-ai-key
GEMINI_API_KEY=your-gemini-api-key- Clone the repository:
git clone [repository-url]
cd video-processing-server- Install dependencies:
npm install- Build the project:
npm run build- Start the server:
# Development
npm run dev
# Production
npm start/src/config- Configuration and service initialization/constants- Application constants and limits/routes- API routes including upload handling/services- Core business logic/socket- WebSocket handling/types- TypeScript interfaces/utils- Utility functionsapp.ts- Express application setupserver.ts- Server entry point
POST /upload- TUS protocol endpoint for chunked uploads
video-chunks- Receive video chunks for real-time recordingprocess-video- Trigger video processing after recordingdisconnect- Handle client disconnection
- Video Upload/Recording
- File Validation
- S3 Upload
- Audio Extraction (Pro Plan)
- Transcription (Pro Plan)
- AI Summary Generation (Pro Plan)
- Metadata Update
- Cleanup
- CORS protection
- File type validation
- Plan-based restrictions
- Secure credential handling
- Max file size: 1GB
- Max duration: 30 minutes
- Max file size: 10GB
- Max duration: 3 hours
- Additional features: Transcription & AI Summary
- Fork the repository
- Create your 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 was created for learning purposes, inspired by Web Prodigies https://www.youtube.com/watch?v=3R63m4sTpKo
Omkar D