bloc97 / Anime4K

A High-Quality Real Time Upscaler for Anime Video
https://bloc97.github.io/Anime4K/
MIT License
18.46k stars 1.35k forks source link

Anime4K loads in, but shaders dont seem to apply[Linux 64-bit, Nvidia] #163

Closed WasteOfO2 closed 2 years ago

WasteOfO2 commented 2 years ago

Describe the bug Upon following the installation guide mentioned in the wiki, I expected the video to improve it's quality, however, SHIFT+I doesn't show anything.

I have to also mention the fact that I have also replaced the ";" with ":"

Although, mpv does seem to recognize that I do have Anime4K, as the keybinds clearly work.

To Reproduce Follow the instructions mentioned in wiki

Expected behavior Expected the shaders to apply

Screenshots Herein lie code blocks and screenshots

mpv.conf

sub-auto=fuzzy
profile=gpu-hq
glsl-shaders="~~/shaders/Anime4K_Denoise_Bilateral_Mode.glsl:~~/shaders/Anime4K_Deblur_DoG.glsl:~~/shaders/Anime4K_DarkLines_HQ.glsl:~~/shaders/Anime4K_ThinLines_HQ.glsl:~~/shaders/Anime4K_Upscale_CNN_M_x2_Deblur.glsl"

input.conf (This is extracted directly from the one in the wiki, with adjustments made for UNIX-based systems)

CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode A (Fast)"
CTRL+2 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode B (Fast)"
CTRL+3 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode C (Fast)"
CTRL+4 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_Restore_CNN_S.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode A+A (Fast)"
CTRL+5 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_Soft_S.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode B+B (Fast)"
CTRL+6 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_M.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Restore_CNN_S.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_S.glsl"; show-text "Anime4K: Mode C+A (Fast)"
CTRL+0 no-osd change-list glsl-shaders clr""; show-text "GLSL shaders cleared""

GLSL files in the shaders directory image

Output of Shift+I 2 on mpv image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

hooke007 commented 2 years ago

If your current VO doesn't support to show this page, then try another one (which supports it). Also, since you are using linux, I think it would not hard for to read the message from log.

WasteOfO2 commented 2 years ago

If your current VO doesn't support to show this page, then try another one (which supports it). Also, since you are using linux, I think it would not hard for to read the message from log.

Thank you for your response

I am not sure what you mean by trying another VO

The logs dont show anything peculiar, it does seem to read the config where the shaders' location is directed, but none of them actually end up loading

I will be attaching the log here if anyone reading this issue can support what I have mentioned

https://pastebin.com/2GaduWs8

hooke007 commented 2 years ago

Your log shows that you didn't play any file.

WasteOfO2 commented 2 years ago

Your log shows that you didn't play any file.

cmon mate i am not that dumb

hooke007 commented 2 years ago

At least I cannot found these intial message (like below) about gpu-context....

[   0.033][v][vo/gpu/d3d11] Initializing GPU context 'd3d11'
[   0.219][v][vo/gpu/d3d11] Using Direct3D 11 feature level 12_1
[   0.219][v][vo/gpu/d3d11] Device Name: NVIDIA GeForce RTX 2070 Super
[   0.219][v][vo/gpu/d3d11] Device ID: 10de:1e91 (rev a1)
[   0.219][v][vo/gpu/d3d11] Subsystem ID: 1d05:108a
[   0.219][v][vo/gpu/d3d11] LUID: 0000000026bf470f
[   0.219][v][vo/gpu/d3d11] Initializing SPIR-V compiler 'shaderc'
[   0.219][v][vo/gpu/d3d11] Using Direct3D 11.1 runtime

BTW, you were using the deprecated directory "lua-settings", though it does nothing with this issue.

WasteOfO2 commented 2 years ago

At least I cannot found these intial message (like below) about gpu-context....

[   0.033][v][vo/gpu/d3d11] Initializing GPU context 'd3d11'
[   0.219][v][vo/gpu/d3d11] Using Direct3D 11 feature level 12_1
[   0.219][v][vo/gpu/d3d11] Device Name: NVIDIA GeForce RTX 2070 Super
[   0.219][v][vo/gpu/d3d11] Device ID: 10de:1e91 (rev a1)
[   0.219][v][vo/gpu/d3d11] Subsystem ID: 1d05:108a
[   0.219][v][vo/gpu/d3d11] LUID: 0000000026bf470f
[   0.219][v][vo/gpu/d3d11] Initializing SPIR-V compiler 'shaderc'
[   0.219][v][vo/gpu/d3d11] Using Direct3D 11.1 runtime

BTW, you were using the deprecated directory "lua-settings", though it does nothing with this issue.

I assume you are using windows, going off of the Direct3D stuff

although, i dont see many things that can vary really

None of the tutorials were linux based , so i am not even sure what is going wrong

I will try and dig into this further, thanks for the help so far, appreciate it :D

WasteOfO2 commented 2 years ago

Update:

uh oh, GPU 0 is not my nvidia gpu apparently...?

0.292][v][vo/gpu/x11] X11 opening display: :0
[   0.310][d][vo/gpu/x11] X11 running at 1600x900 (":0" => local display)
[   0.310][d][vo/gpu/x11] Detected wm supports NetWM.
[   0.310][d][vo/gpu/x11] Detected wm supports FULLSCREEN state.
[   0.310][d][vo/gpu/x11] Detected wm supports ABOVE state.
[   0.310][d][vo/gpu/x11] Detected wm supports BELOW state.
[   0.310][v][vo/gpu/x11] Display 0 (HDMI-0): [0, 0, 1600, 900] @ 59.978156 FPS
[   0.310][v][vo/gpu/x11] Current display FPS: 59.978156
[   0.312][v][vo/gpu/vulkan/libplacebo] Probing for vulkan devices:
[   0.313][v][vo/gpu/vulkan/libplacebo]     GPU 0: llvmpipe (LLVM 13.0.0, 256 bits) (software)
[   0.314][d][vo/gpu/vulkan/libplacebo]       -> excluding due to params->allow_software
[   0.314][f][vo/gpu/vulkan/libplacebo] Found no suitable device, giving up.
[   0.314][f][vo/gpu/vulkan/libplacebo] Failed initializing vulkan device

Notice the GPU 0 value being llvmpipe, not my Nvidia GTX 1650 GPU

TL;DR. Nvidia on Linux issue

WasteOfO2 commented 2 years ago

System reboot fixed it :man_facepalming:

The program now runs properly.

Apparently I had updated my GPU drivers without actually rebooting the system, causing the driver module to be unloaded but not actually being rebuilt. Realised that i havent power cycled my pc in 14 days