A fast, modern web-based video processing tool focused on meme creation and social media content. Built with React/Next.js frontend and Node.js backend using FFmpeg for video processing.
- Docker and Docker Compose installed on your system
- Git (to clone the repository)
-
Clone the repository
git clone https://github.com/Professa/videtopia.git cd videtopia -
Run with Docker Compose
docker-compose up --build -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Health Check: http://localhost:3001/health
That's it! The application will be running with all dependencies automatically installed.
- Upload: Support for MP4, MOV, AVI, WebM, MKV, FLV formats
- Compression: High, medium, low quality presets with custom CRF values
- Cropping: Visual crop tool with aspect ratio presets (1:1, 16:9, 9:16, 4:5)
- Scaling: Resolution presets (4K, 1080p, 720p, 480p) with custom dimensions
- Trimming: Precise start/end time controls with visual timeline
- Speed: 0.25x to 4x speed adjustment with audio pitch correction
- Effects: Reverse, blur, sharpen, brightness, contrast filters
- Formats: Output to MP4, WebM, or optimized GIF
- Drag & Drop: Intuitive file upload interface
- Real-time Progress: Live processing updates via WebSocket
- Responsive Design: Works on desktop, tablet, and mobile
- Auto-cleanup: Files automatically deleted after 30 minutes
- Framework: Next.js 14 with TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- State Management: Zustand
- File Upload: react-dropzone
- Video Player: Custom HTML5 video player
- Notifications: react-hot-toast
- Runtime: Node.js with Express
- Video Processing: FFmpeg
- File Handling: Multer
- Real-time Updates: Socket.IO
- TypeScript: Full type safety
- Containerization: Docker & Docker Compose
- Job Queue: Bull (Redis-backed) with retries and persistence
- Real-time Updates: Socket.IO (WebSocket, with polling fallback)
- File Storage: Local filesystem with auto-cleanup
- CORS: Configurable origins for production
videtopia/
βββ frontend/ # Next.js frontend application
β βββ src/
β β βββ app/ # App Router pages
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
ββ β βββ lib/ # Utility functions
β β βββ store/ # Zustand state management
β βββ Dockerfile # Frontend Docker configuration
β βββ package.json
βββ backend/ # Node.js backend API
β βββ src/
β β βββ middleware/ # Express middleware
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β β βββ types/ # TypeScript definitions
β β βββ utils/ # FFmpeg utilities
β βββ Dockerfile # Backend Docker configuration
β βββ package.json
βββ docker-compose.yml # Multi-container setup
βββ README.md # This file
βββ .gitignore
The application uses the following environment variables:
NODE_ENV: Environment (production/development)PORT: Server port (default: 3001)ALLOWED_ORIGINS: CORS allowed origins (comma-separated)MAX_FILE_SIZE: Maximum file size in bytes (default: 100MB)UPLOAD_DIR: Upload directory pathOUTPUT_DIR: Output directory pathCLEANUP_INTERVAL: Cleanup interval in milliseconds (default: 1 hour)REDIS_URL: Redis connection string (default:redis://localhost:6379)
NEXT_PUBLIC_API_URL: Backend API URL
The docker-compose.yml file includes:
- Redis service: Required for the Bull job queue
- Backend service: Node.js API with FFmpeg
- Frontend service: Next.js application
- Volume mounts: Persistent file storage
- Health checks: Automatic service monitoring
- Environment variables: Pre-configured for easy deployment
# Start all services
docker-compose up --build -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down-
Clone and configure
git clone https://github.com/yourusername/videtopia.git cd videtopia -
Update environment variables Edit
docker-compose.ymlto set your domain:environment: - ALLOWED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
-
Deploy
docker-compose up --build -d
-
Set up reverse proxy (recommended) Use Nginx or Traefik to handle SSL and domain routing.
POST /api/uploadβ Upload a video file (rate limited: 10/15 min per IP)POST /api/processβ Start a processing job (rate limited: 30/15 min per IP)GET /api/status/:jobIdβ Get job status and progressGET /api/download/:jobIdβ Download the processed file
GET /healthβ Health check endpoint
- File Validation: Strict MIME type and extension checking
- Size Limits: Configurable file size restrictions (default 100 MB)
- CORS Protection: Configurable origin allowlist
- Rate Limiting: Upload and process endpoints throttled per IP
- No public file access: Raw uploads are never publicly accessible; processed files served only via authenticated job ID
- Auto-cleanup: Files automatically deleted after 30 minutes
- Input Sanitization: All processing parameters validated server-side
-
Docker not found
# Install Docker curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh -
Port conflicts
# Check what's using the ports sudo netstat -tulpn | grep :3000 sudo netstat -tulpn | grep :3001
-
File upload fails
- Check file size (max 100MB)
- Verify file format is supported
- Ensure sufficient disk space
-
Processing fails
- Check Docker logs:
docker-compose logs backend - Verify FFmpeg is working:
docker exec video-meme-processor_backend_1 ffmpeg -version
- Check Docker logs:
# View all logs
docker-compose logs -f
# View specific service logs
docker-compose logs -f backend
docker-compose logs -f frontend
# Check container status
docker-compose ps
# Restart services
docker-compose restart- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add feature' - Push to branch:
git push origin feature-name - Submit a pull request
This project is licensed under the GPU License - see the LICENSE file for details.
- FFmpeg for powerful video processing capabilities
- Next.js team for the excellent React framework
- Tailwind CSS for the utility-first CSS framework
- All open-source contributors who made this possible
Authored by Mzumara Yamikani @ 2025