the-database/mpv-AnimeJaNai

Real-time anime upscaling to 4K in mpv with lightweight super-resolution models

What it solves

This project addresses the loss of image clarity and scaling artifacts found in anime videos that were scaled up to 1080p during distribution. It provides a way to upscale anime content in real-time to 4K resolution, making the video appear as if it were originally mastered in 4K.

How it works

It combines a custom build of the mpv video player with a collection of Real-ESRGAN Compact ONNX upscaling models. The system uses TensorRT (for NVIDIA GPUs) or DirectML (for AMD and Intel Arc GPUs) to run these models during playback. Users can choose between different quality profiles (Quality, Balanced, and Performance) based on their hardware capabilities.

Who it’s for

Anime enthusiasts who want to improve the visual quality of their local video files using high-end GPUs (specifically NVIDIA RTX 3060 or higher for 1080p to 4K upscaling).

Highlights

  • Real-time 4K upscaling: Upscales 1080p anime to 4K on the fly during playback.
  • Optimized for Anime: Uses specialized 2x_AnimeJaNai models trained specifically to handle oversharpening, ringing, and aliasing in anime.
  • Hardware Flexibility: Supports NVIDIA GPUs via TensorRT and AMD/Intel Arc GPUs via DirectML.
  • Customizable Profiles: Includes an AnimeJaNai Manager for setting up custom upscaling chains and conditional settings based on resolution and framerate.

Related

  • Project
  • Project
  • Project
  • Project
  • Project