⏩ ArtCNN (GLSL Shader) Model Usage - Sirosky/Upscale-Hub GitHub Wiki

Installation and Setup

Prerequisites

  • A video player that supports GLSL shaders. The shaders have only been tested with mpv video player.

Basics

  • If you're using a fresh install of mpv create mpv.conf and input.conf files in the base directory (or find pre-made configs online-- there's TONs of them).

explorer_SOyWGAttQG

  • In mpv.conf, have the following settings:
vo=gpu-next
gpu-api=vulkan

Activating the Shader

  • In input.conf, add the following:
Ctrl+1      change-list glsl-shaders toggle "~~/shaders/ArtCNN_Shader_Name.glsl"
Ctrl+0      no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared"

This assumes that your shaders are saved into a shaders folder in your mpv directory. The setting will allow you to toggle the shader on and off with Ctrl + 1. Ctrl + 0 can be used to clear all shaders.

Auto Profiles (recommended)

So what happens if you'd like to use different shaders on different types of videos? For example, Ani4K v2 is intended for modern HD/FHD content, whereas AniSD is intended for SD content. You could activate the appropriate shader manually every time you open a video... OR you could just have mpv pick the shader to use automatically using the auto profile feature.

To use auto profiles, add something like the below into mpv.conf.

[hd] # 720p/1080p
profile-desc=hd
profile-cond=((width ==1920 and height ==1080) or (height ==720))
glsl-shader="~~/shaders/Ani4Kv2_ArtCNN_C4F32_i2.glsl"

[sdtv-ntsc] # SD sources
profile-desc=sd
profile-cond=((height ==480) or (height ==540) or (height ==576))
glsl-shader="~~/shaders/AniSD_ArtCNN_C4F32_i4.glsl"

In this example, if the source is HD or FHD, mpv will automatically activate Ani4K v2. If the source is SD, mpv will activate AniSD.

Confirming the Shader is Active

During playback of a video, press Tab. This should bring up a bunch of information. Then, press 2. This should bring up a screen with the active changes being applied to each frame. If the shader was successfully activated, you should see a large number of ArtCNN-related entries on the screen. Press Tab again to dismiss the screen.

mpvnet_OAV4YPsWS5