π₯ AI Video Enhancer & Upscaler
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.
β¨ Features
AI Upscaling
- Real-ESRGAN for high-quality AI enhancement
- NVIDIA CUDA support
- Apple Silicon (MPS) support
Smart Fallback
- Automatically switches to OpenCV FSRCNN
- Works on CPU-only systems without configuration
1080p β 4K Pipeline
- AI upscale to 1080p
- High-quality Lanczos interpolation for 4K delivery
Aspect Ratio Handling
- Automatic 4:3 β 16:9 correction
- Smart padding (no stretching or cropping)
Audio Preservation
- Extracts original audio
- Losslessβ¦
π₯ AI Video Enhancer & Upscaler
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.
β¨ Features
AI Upscaling
- Real-ESRGAN for high-quality AI enhancement
- NVIDIA CUDA support
- Apple Silicon (MPS) support
Smart Fallback
- Automatically switches to OpenCV FSRCNN
- Works on CPU-only systems without configuration
1080p β 4K Pipeline
- AI upscale to 1080p
- High-quality Lanczos interpolation for 4K delivery
Aspect Ratio Handling
- Automatic 4:3 β 16:9 correction
- Smart padding (no stretching or cropping)
Audio Preservation
- Extracts original audio
- Lossless remux into upscaled video
Local & Offline
- No uploads
- No server-side processing
- No data leaves your machine
π₯ Platform & Hardware Support
Operating Systems
- macOS (Intel & Apple Silicon)
- Linux
- Windows
Acceleration Backends
| Hardware | Backend | Status |
|---|---|---|
| NVIDIA GPU | CUDA | Real-ESRGAN |
| Apple Silicon (M1βM3) | MPS | Real-ESRGAN |
| CPU-only | OpenCV FSRCNN | Fallback |
π Getting Started
Prerequisites
- Python 3.8+
- FFmpeg (must be available in PATH)
Install FFmpeg
macOS
brew install ffmpeg
Linux
sudo apt install ffmpeg
Windows
Download from: https://ffmpeg.org/download.html
Ensure ffmpeg is added to PATH.
π¦ Installation
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 the models/ directory:
FSRCNN_x3.pb
π Usage
Rename your input video to match the default name OR update the INPUT_VIDEO variable in the script.
python upscale_video.py
Output
- AI-enhanced 1080p video
- High-quality 4K video
- Original audio preserved
π Python Dependencies
torchopencv-pythonffmpeg-pythonnumpytqdmrealesrganai-forever Real-ESRGAN
βοΈ Processing Notes
- GPU acceleration is auto-detected at runtime
- FSRCNN fallback is used automatically if GPU is unavailable
- Optimized for long-form and archival video processing
Suitable for
- Old SD footage
- Personal media restoration
- Content remastering
- Offline processing pipelines
π Support & Sponsorship
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
π§βπ» Maintainer
Pratik Patel Independent builder focused on local-first, privacy-respecting tools
GitHub: https://github.com/pratik227
π License
MIT License See the LICENSE file for details.