Model or dataset
the-database/mpv-AnimeJaNai avatar
the-database/mpv-AnimeJaNai

mpv-AnimeJaNai upscales anime to 4K inside mpv while you watch

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

767 stars22 forksC#NOASSERTION

At a glance

What is it?
mpv-AnimeJaNai is a custom build of the mpv video player that runs Real-ESRGAN Compact ONNX upscaling models in real time, taking 1080p content to 4K through TensorRT on NVIDIA or DirectML on AMD and Intel Arc. It ships three quality profiles keyed to different cards, a manager for custom chains, and an in-place updater that keeps your own settings.
Who is it for?
Adopt mpv-AnimeJaNai if you watch anime on a Windows machine with an NVIDIA card and want 1080p content upscaled to 4K during playback rather than a pre-rendered file, since the engine is built on the fly and the profiles are matched to specific GPUs. Skip it if you need something other than Windows, since the player is currently Windows only, or if your GPU is not an NVIDIA RTX, an AMD card or Intel Arc, because the two acceleration paths are TensorRT and DirectML.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 7 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The upscaling happens during playback, not before it

This project provides a collection of Real-ESRGAN Compact ONNX upscaling models, along with a custom build of the mpv video player. The player, currently Windows only, enables real-time upscaling of 1080p content to 4K by running these models using TensorRT on NVIDIA, or DirectML for AMD or Intel Arc.

The default configuration upscales using the 2x_AnimeJaNai models, and it can be easily customized to utilize any Real-ESRGAN Compact ONNX models.

The real-time framing is the whole design decision. The alternative to this is to pre-upscale a video with a command line tool and then watch the result, which produces a file you keep and a process you wait for. Here the model runs as a filter inside the player, so the output is what you see, and the cost is that the GPU has to keep up with playback in real time.

That is why the profiles are tied to specific cards. The model has to process every frame of a 4K output, and whether that is possible depends on the hardware. The three default profiles make the trade explicit:

| Profile | Description | Keybinding | Minimum recommended GPU for upscaling 1080p to 4k | | Quality | Highest quality model | `Shift+1` | RTX 4090 | | Balanced | High quality model which trades slight quality for major performance gains | `Shift+2` | RTX 3080 | | Performance | Fastest performance model which sacrifices a bit more quality | `Shift+3` | RTX 3060 |

The default is the Balanced profile, recommended for users running an NVIDIA RTX 3080 or higher.

The models themselves are described as a collection of real-time 2x Real-ESRGAN Compact, UltraCompact and SuperUltraCompact models designed specifically for doubling the resolution of HD and SD models. The three size tiers, Compact, UltraCompact and SuperUltraCompact, are what make the quality to performance trade possible, and the profile table is really a table of which tier you run.

First playback pauses while TensorRT builds the engine

The setup is a download and an unzip, and the first run has one delay that is worth understanding before you think something is broken.

Make sure your NVIDIA graphics drivers are up to date, download and extract the latest release archive of mpv-upscale-2x_animejanai, and open the video player at `mpvnet.exe`.

Then, when playing a video for the first time, a TensorRT engine file will be created for the selected ONNX model. Playback will be paused and a command prompt box will open, and you should wait while the engine is created. Engine creation only needs to happen once per model, and playback will resume on its own when finished.

That is a standard TensorRT workflow rather than a project quirk. TensorRT compiles a network into a hardware-specific engine, and that compilation is a one-off cost per model per machine. The consequence for a user is that the first video looks different from later ones, in wall-clock terms rather than in quality, and that switching to a different profile triggers the same pause again because it is a different model.

To confirm what is happening, press `ctrl+J` to view upscaling stats. This shows the current profile, and the currently running upscaling models if any.

The player ships preconfigured to upscale with the 2x_AnimeJaNai V3.1 models, and any of the three profiles can be selected on the fly using the keybinding in the table, so you can compare quality and performance without restarting anything.

The manager holds the custom profiles and the conditional settings

Upscaling can be further customized using the AnimeJaNai Manager, which can be launched by pressing `ctrl+E` from mpvnet.

The Manager allows the setup of up to 9 custom slots, and also the use of custom chains, conditional settings based on video resolution and framerate, downscaling to improve performance, and more. The default upscaling profile can also be set in the Manager.

Two of those features are the ones that turn this from a preset system into a configurable one. Custom chains mean you can run more than one model in sequence, which is how a pipeline that upscales and then applies a different model to the result would be expressed. Conditional settings based on resolution and framerate mean the profile can adapt to the source, so a 4K source is not sent through a 2x model that would only make it bigger and slower.

Downscaling to improve performance is a related idea and it is worth understanding the reasoning. If the display is 1080p and the source is 480p, upscaling to 4K and letting the display scale it back down wastes GPU time. Scaling to the native resolution of the panel instead is both faster and visually identical, and the Manager lets you express that.

The Manager is a separate application, and the README notes that the automatic display refresh rate feature requires all three updated components: Manager, the native mpv player with `display-rate-match`, and `scripts/animejanai_backend.lua`.

Automatic refresh rate matching is experimental and picky

The refresh rate feature is marked experimental and Windows only, and its description is the most detailed in the README, which usually means it has sharp edges.

Enable the option in the Manager's Profiles tab and restart the player. With a compatible AJN player build, it scans local video timestamps before playback and chooses one display refresh for the whole episode, including across seeks.

The selection rules are laid out as a decision tree. Fixed-rate videos prefer an exact or near supported multiple. Mixed-rate videos prefer a common multiple of all measured cadences, and otherwise AJN minimizes estimated timing error weighted by each cadence's duration. Unverified inputs use the highest supported progressive refresh at the current resolution.

What happens during playback is also spelled out. Playback pauses with a notice before a needed switch and resumes after the settling interval, and manual pauses are preserved. Matching consecutive episodes retain their rate, so a binge does not renegotiate the refresh on every episode.

The limitations are listed too. Scanning can add startup time, and the TV may briefly go black during a change. The original refresh is restored at playback end or normal player exit. The feature is off by default, does not interpolate video, and does not change the `video-sync` setting. A display limited to 60 Hz is supported, though arbitrary VFR cannot always have perfectly even presentation on a fixed-refresh display. And Windows driver and TV switching behavior still needs testing on your hardware.

That last sentence is the honest summary: this is a feature whose behaviour depends on your TV and your GPU driver, and the project is not claiming it works everywhere.

Updates apply in place and your settings survive them

The updater is the most carefully documented part of the project, and the reason is that a video player is the kind of software where an update that wipes your configuration is a real annoyance.

mpv-upscale-2x_animejanai checks for updates on startup. When a newer version is available, an on-screen message appears, and you press `Ctrl+U`, or use the AnimeJaNai Install Update menu, to install it. mpv closes, the update is applied in place, and mpv reopens automatically.

What survives is specific. Your profiles in `animejanai.conf`, your mpv settings in `mpv-user.conf`, and any ONNX models you added to `animejanai/onnx/` are never overwritten. Most updates are small because the large GPU runtime is only re-downloaded when it actually changes, and your previous `input.conf` is backed up to `input.conf.bak-<version>` before the shipped keybindings are refreshed.

The naming convention is the trick. Files named `mpv-user.conf` and `input-user.conf` are yours, and the ones without the user suffix are the shipped defaults. The documentation explains the consequence: `mpv-user.conf` is applied last, so it overrides the defaults, and it is never overwritten when you update. Custom keybindings go in `input-user.conf`, with the same syntax as `input.conf`, and they override the shipped bindings and are also preserved across updates.

One upgrade note applies to users coming from a version before the updater existed. Download the latest release once manually, and from then on updates are handled in place.

The update message appears on startup, which means the check happens whether you want it or not, and it is a network call on every launch.

Where the model choices and the hardware limits come from

Two details in the README explain the design of the model set.

The first is that most HD anime are not produced in native 1080p resolution but rather have a production resolution between 720p and 1080p, with a link to the encoding guide. That is the reason the HD models exist as a separate tier: the content usually has more detail than its nominal resolution suggests, and a model trained on 1080p anime would be trained on the wrong statistics.

The second is the hardware split. The project is configured to use TensorRT by default for optimal performance, but TensorRT requires an NVIDIA GPU, so users with AMD or Intel Arc GPUs can use DirectML instead, with the wiki page pointing to detailed instructions for that path.

That split has a practical consequence. The performance table in the README is entirely NVIDIA RTX cards, from an RTX 3060 to an RTX 4090, and the default recommendation is an RTX 3080 or higher. The DirectML path exists and is documented, but it is not the tuned path, and the profile guidance does not cover it.

The primary language is C#, which fits the shape of the project. The repository tree shows a lot of tooling around the player: a BuildMpvUpscale2xAnimeJaNai directory, an AnimeJaNaiUpdater, an AnimeJaNaiBenchmark directory with a benchmark-proxy and a site directory, plus installer, scripts, tools, docs, tests and data directories.

The licence field reads Other, a custom licence GitHub cannot classify, pointing to the LICENSE file, so the terms need reading there before redistribution. There is a Discord server for news, pre-release and experimental models, support and screenshots,

Editorial conclusion

Adopt mpv-AnimeJaNai if you watch anime on a Windows machine with an NVIDIA card and want 1080p content upscaled to 4K during playback rather than a pre-rendered file, since the engine is built on the fly and the profiles are matched to specific GPUs. Skip it if you need something other than Windows, since the player is currently Windows only, or if your GPU is not an NVIDIA RTX, an AMD card or Intel Arc, because the two acceleration paths are TensorRT and DirectML. Verify first which profile your card falls into, since the default is Balanced and the Quality profile wants an RTX 4090, and allow time for the one-off TensorRT engine creation before you judge the result.

Frequently asked questions

How do I install and run mpv-AnimeJaNai?

Update your NVIDIA graphics drivers, download and extract the latest release archive of mpv-upscale-2x_animejanai, and open the player at `mpvnet.exe`. On the first video, a TensorRT engine is created for the selected ONNX model, so playback pauses and a command prompt window opens until it finishes.

Which upscaling profile should I choose for my GPU?

Quality is the highest quality model and recommends an RTX 4090, Balanced trades slight quality for major performance gains and recommends an RTX 3080, and Performance sacrifices a bit more quality and recommends an RTX 3060. The default is Balanced, recommended for an RTX 3080 or higher, and you can switch profiles on the fly with Shift+1, Shift+2 and Shift+3.

Can I use mpv-AnimeJaNai with an AMD or Intel Arc GPU?

Yes, through DirectML instead of TensorRT. The project is configured for TensorRT by default for optimal performance, but TensorRT requires an NVIDIA GPU, and the wiki has a setup page for AMD or Intel Arc users.

Do my settings survive updates in mpv-AnimeJaNai?

Yes. Profiles in `animejanai.conf`, mpv settings in `mpv-user.conf` and any ONNX models you added to `animejanai/onnx/` are never overwritten, and `mpv-user.conf` and `input-user.conf` are applied last so they override the shipped defaults. The previous `input.conf` is backed up before the shipped keybindings are refreshed.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Releases
  5. the-database/mpv-AnimeJaNai on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/the-database-mpv-animejanai.svg)](https://hysenlabs.com/projects/the-database-mpv-animejanai)

Was this useful?