This was vibecoded. Seems to work, but handle with caution.
A Flask web application for video processing with FFmpeg. Allows you to upload videos and apply rotation, cropping, and compression.
- Upload Video: Support for MP4, AVI, MOV, MKV, WebM, FLV, WMV, M4V formats
- Rotate Video: Options for 0°, 90°, 180°, -90° rotation
- Crop Video: Draw a crop area on the video thumbnail preview
- Compress Video: Compress to ~8MB for Discord and other platforms with file size limits
- Backend: Flask (Python)
- Frontend: Bootstrap 5 with custom dark theme
- Video Processing: FFmpeg via typed-ffmpeg
- Dependency Management: Astral.sh UV
- Deployment: Docker
- Python 3.10+
- FFmpeg installed on your system
- UV (Astral.sh's package manager)
-
Clone the repository:
git clone https://github.com/yourusername/ffmpegger.git cd ffmpegger -
Install UV (if not already installed):
# On Windows (PowerShell) irm https://astral.sh/uv/install.ps1 | iex # On macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh
-
Create virtual environment and install dependencies:
uv venv uv pip install -r pyproject.toml
-
Run the application:
# Activate virtual environment # Windows: .venv\Scripts\activate # macOS/Linux: source .venv/bin/activate # Run Flask python app.py
-
Open your browser and navigate to
http://localhost:5000
docker build -t ffmpegger .docker run -p 5000:5000 ffmpeggerversion: '3.8'
services:
ffmpegger:
build: .
ports:
- "5000:5000"
volumes:
- ./uploads:/app/uploads
- ./outputs:/app/outputs- Upload a Video: Drag and drop a video file or click to browse
- Preview: A thumbnail will be generated from the video
- Rotate: Select a rotation angle (0°, 90°, 180°, -90°)
- Crop: Draw a rectangle on the thumbnail to define the crop area
- Compress: Toggle the "Compress to ~8MB" option if needed
- Process: Click "Process Video" to apply the changes
- Download: Download your processed video
GET /- Main pagePOST /upload- Upload a video filePOST /process- Process video with optionsPOST /regenerate-thumbnail- Regenerate thumbnail with rotationGET /download/<filename>- Download processed video
MIT License