Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPV cannot load shader files on Linux when using recommand Keybinding setup #253

Closed
Charlotto opened this issue Nov 20, 2024 · 4 comments
Closed

Comments

@Charlotto
Copy link

Charlotto commented Nov 20, 2024

Describe the bug

when using recommand keybingding setup (described in file: GLSL_Introduction.md), MPV cannot get shader file paths properly:

  • MPV error message:
    [file] Cannot open file '/home/myuser/.config/mpv/shaders/Anime4K_Clamp_Highlights.glsl;~~/shaders/Anime4K_Restore_CNN_VL.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl;~~/shaders/Anime4K_AutoDownscalePre_x2.glsl;~~/shaders/Anime4K_AutoDownscalePre_x4.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl': No such file or directory

  • Part of keybinding setup:
    CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl;~~/shaders/Anime4K_Restore_CNN_VL.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl;~~/shaders/Anime4K_AutoDownscalePre_x2.glsl;~~/shaders/Anime4K_AutoDownscalePre_x4.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A (HQ)"

To Reproduce
Steps to reproduce the behavior:

  1. follow GLSL_instructions.md, copy glsl shaders to ~/.config/mpv/shaders; create 'input.conf' at '~/.config/mpv'.
  2. paste optimized keybindings in input.conf, just follow the 'GLSL_Instructions.md'
  3. open random anime video file on terminal, start apply Anime4K by using customed keybinding Ctrl+1;
  4. See error on terminal. (the error message should be like the screenshot.)

Screenshots

mpv_errorMsg

Desktop (please complete the following information):

  • OS: Arch linux X86_64
  • Version: v4.0.1 stable
  • GPU/Version: AMD Lucienne, integrated on amd Ryzen 5 5500U
  • Media Player and Version (If applicable) : mpv v0.39.0
  • Browser (If applicable): ms edge(chrome)
@yooooooLeon
Copy link

yooooooLeon commented Nov 20, 2024 via email

@Charlotto
Copy link
Author

This problem can be fix using new keybinding setup :

CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Restore_CNN_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x2.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x4.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A (HQ)"
CTRL+2 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x2.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x4.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B (HQ)"
CTRL+3 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x2.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x4.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C (HQ)"
CTRL+4 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Restore_CNN_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Restore_CNN_M.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x2.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x4.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A+A (HQ)"
CTRL+5 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Restore_CNN_Soft_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x2.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x4.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Restore_CNN_Soft_M.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode B+B (HQ)"
CTRL+6 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_Denoise_CNN_x2_VL.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x2.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_AutoDownscalePre_x4.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Restore_CNN_M.glsl"; no-osd change-list glsl-shaders add "~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode C+A (HQ)"

CTRL+0 no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared"

Looking for better solutions😄😄😄

@barraIhsan
Copy link

use : for the separator not ; (windows)
e.g.

- CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl;~~/shaders/Anime4K_Restore_CNN_VL.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl;~~/shaders/Anime4K_AutoDownscalePre_x2.glsl;~~/shaders/Anime4K_AutoDownscalePre_x4.glsl;~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A (HQ)"
+ CTRL+1 no-osd change-list glsl-shaders set "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl"; show-text "Anime4K: Mode A (HQ)"

@Charlotto
Copy link
Author

new key-binding setup updated, thanks @barraIhsan !

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants