Show HN: Local-First AI Video Upscaler with CPU Fallback

2026-01-2211:4110github.com

Contribute to pratik227/upscale_video_4k development by creating an account on GitHub.

NameName

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.

  1. Clone the repository

    git clone https://github.com/pratik227/video-enhance.git
    cd video-enhance
  2. Install dependencies

    pip install -r requirements.txt
  3. Download model weights

    AI Upscaling (Recommended)
    Place one of the following files in the project root:

    • RealESRGAN_x4plus.pth
    • RealESRGAN_x4.pth

    CPU Fallback
    Place this file in the models/ 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
  • torch
  • opencv-python
  • ffmpeg-python
  • numpy
  • tqdm
  • realesrgan
  • ai-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.

You can’t perform that action at this time.


Read the original article

HackerNews