explaingit

bloc97/anime4k

20,932Jupyter NotebookAudience · vibe coderComplexity · 3/5StaleLicenseSetup · hard

TLDR

Real-time upscaling and denoising for anime video using GPU shaders, making 1080p content look sharp on 4K screens without re-encoding.

Mindmap

mindmap
  root((Anime4K))
    What it does
      Upscales anime video
      Denoise and sharpen
      Real-time processing
    How it works
      GLSL shaders
      Line art CNN
      Artifact reduction
    Where to use
      MPV player
      IINA player
      Plex server
    Platforms
      Windows
      Linux
      Mac
    Community ports
      C++ implementation
      PyTorch version
      WebGPU variant

Things people build with this

USE CASE 1

Watch 1080p anime on a 4K monitor with sharp, upscaled visuals in real time.

USE CASE 2

Integrate anime upscaling into MPV or IINA to improve video quality without re-encoding files.

USE CASE 3

Build custom video processing pipelines using the modular upscaling and denoising components.

USE CASE 4

Deploy anime enhancement on a Plex server to improve streaming quality for all users.

Tech stack

GLSLGPU shadersPyTorchC++RustWebGPU

Getting it running

Difficulty · hard Time to first run · 1day+

Requires GPU with shader support, PyTorch/CUDA setup, and compilation of C++/Rust components; multiple moving parts.

Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

Anime4K is an open-source set of algorithms that upscale anime video in real time, so a 1080p episode can be played on a 4K screen and look better without first having to re-encode the file. The README's argument for doing it this way is that re-encoding anime to 4K takes huge amounts of disk space, can introduce artefacts, and is not reversible, while real-time upscaling preserves the original file and lets each viewer choose how to watch it. Technically it is a collection of fast image-processing shaders, distributed as GLSL code that you load into a video player such as MPV, IINA, or Plex. The README provides per-platform install instructions for Windows, Linux, and Mac. Internally the shaders combine convolutional neural network upscalers tuned for line-art, deblurring shaders, denoising algorithms (a bilateral mode and CNN variants), and corrections for badly resampled anime. The most recent version adds a line-reconstruction step that explicitly corrects the visual distribution shift in 1080p anime caused by low-quality compositing, so that traditional super-resolution algorithms can work across a wider variety of shows. Someone would use Anime4K when watching 1080p anime on a high-resolution display and wanting it sharpened on the fly without storing a separate upscaled copy. The README is explicit about its limits: it is optimised for native 1080p encoded with h.264, h.265, or VC-1, and is not intended for 720p, 480p, or older material, where heavyweight non-real-time approaches like waifu2x or Real-ESRGAN are better. The README also lists downstream projects that wrap it, including Magpie, Anime4KMetal, Anime4KCPP, video2x, and a WebGPU port.

Copy-paste prompts

Prompt 1
How do I install Anime4K shaders in MPV to upscale my anime collection to 4K?
Prompt 2
Show me how to use the Anime4K PyTorch implementation to batch upscale anime episodes.
Prompt 3
What's the difference between the six line art CNN variants in Anime4K, and which should I use?
Prompt 4
How can I integrate Anime4K into my Plex server to automatically upscale anime streams?
Prompt 5
Explain how Anime4K's line reconstruction algorithm handles low-quality anime compositing.
Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.