Anime4K icon indicating copy to clipboard operation
Anime4K copied to clipboard

Can't use CNN Upscaler with video higher than 480p

Open jontomtom opened this issue 3 years ago • 5 comments

Greetings, As stated in the title i can't use CNN Upscaler for most anime videos. 480p does work, but when playing 720p or 1080p the shader doesn't work or shows up when in mpv player control + i then 2.

OS. Windows 10 my version: mpv-x86_64-20201206-git-a9aa5a1.7z | 2020-12-06 GPU GTX 1070 mobile

jontomtom avatar Dec 22 '20 11:12 jontomtom

It may be because you are using 1080p monitor with 1080p content. Because of this line:

//!WHEN OUTPUT.w NATIVE.w / 1.200 > OUTPUT.h NATIVE.h / 1.200 > *

It only upscales when the display resolution is 1.2x the height or (?) width of the content you are trying to watch. On my 1440p monitor, when I try watching in a smaller window with 1080p content, the shaders won't load. You can try editing that line but I'm not sure what the consequences are.

Jules-A avatar Dec 22 '20 12:12 Jules-A

Ok Jules-A. I'm using a 4k monitor and want to watch 1080p video with CNN upscaler. This is more than 1.2x so that's the reason ehy it doesn't work in my situation. That is sad, would be great if it weren't just exactly 1.2x, but even more than that to also let CNN do its work.

Thanks for your answer

jontomtom avatar Dec 22 '20 14:12 jontomtom

If you are using a 4k monitor it should be upscaling, it upscales at 1440p (just not when I make the window smaller). It only won't activate when you are watching on a monitor (actually determined by the size of the player window) that is smaller than content width/height x 1.2, for example, if you are watching 1080p you'll need a monitor (or window size if windowed) larger than 2304 x 1296.

You can try editing those lines in the shader files to 0.8 or something instead, it seems to work but I haven't heard any official reason why the limit is in place.

Since you are using a laptop it may be a glitch that is taking in to account your laptop monitor size instead of a connected 4k monitor?

Jules-A avatar Dec 23 '20 02:12 Jules-A

I will reinstall mpv player, maybe even another version, or try to edit the shader file. It may be a glitch as you said because I indeed am connecting a 4k monitor to my laptop (you're quite the sherlock :-) ). By the way, is there any information on how much CNN upscales? For example I know CNN-UL is higher than CNN-L, but what are they compared to for example the original-Anime4K-x2-shader in terms of upscale.

jontomtom avatar Dec 23 '20 08:12 jontomtom

Pretty sure it just upscales by what it says, so 2x is 2x. UL is just a more intensive algorithm than L as far as I'm aware. All this ML stuff is like magic to me so you'd have to ask the author...

Jules-A avatar Dec 25 '20 15:12 Jules-A