A local-first, privacy-friendly AI video upscaling tool built in Python.
Upscale videos to 1080p and 4K using Real-ESRGAN (AI) with automatic fallback to FSRCNN (CPU).
No cloud. No uploads. Fully offline.
- Real-ESRGAN for high-quality AI enhancement
- NVIDIA CUDA support
- Apple Silicon (MPS) support
- Automatically switches to OpenCV FSRCNN
- Works on CPU-only systems without configuration
- AI upscale to 1080p
- High-quality Lanczos interpolation for 4K delivery
- Automatic 4:3 β 16:9 correction
- Smart padding (no stretching or cropping)
- Extracts original audio
- Lossless remux into upscaled video
- No uploads
- No server-side processing
- No data leaves your machine
- macOS (Intel & Apple Silicon)
- Linux
- Windows
| Hardware | Backend | Status |
|---|---|---|
| NVIDIA GPU | CUDA | Real-ESRGAN |
| Apple Silicon (M1βM3) | MPS | Real-ESRGAN |
| CPU-only | OpenCV FSRCNN | Fallback |
- Python 3.8+
- FFmpeg (must be available in PATH)
Download from: https://ffmpeg.org/download.html
Ensure ffmpeg is added to PATH.
-
Clone the repository
git clone https://github.com/pratik227/video-enhance.git cd video-enhance -
Install dependencies
pip install -r requirements.txt
-
Download model weights
AI Upscaling (Recommended)
Place one of the following files in the project root:RealESRGAN_x4plus.pthRealESRGAN_x4.pth
CPU Fallback
Place this file in themodels/directory:
Rename your input video to match the default name OR update the INPUT_VIDEO variable in the script.
- AI-enhanced 1080p video
- High-quality 4K video
- Original audio preserved
torchopencv-pythonffmpeg-pythonnumpytqdmrealesrganai-forever Real-ESRGAN
- GPU acceleration is auto-detected at runtime
- FSRCNN fallback is used automatically if GPU is unavailable
- Optimized for long-form and archival video processing
- Old SD footage
- Personal media restoration
- Content remastering
- Offline processing pipelines
If this project helps you, consider supporting its development.
π GitHub Sponsors
https://github.com/sponsors/pratik227
β Buy Me a Coffee
https://buymeacoffee.com/pratik227
β Free Support
- Star the repository
- Share on X / Reddit / Hacker News
- Recommend it to others
Pratik Patel
Independent builder focused on local-first, privacy-respecting tools
GitHub: https://github.com/pratik227
MIT License
See the LICENSE file for details.