iwalton3 / default-shader-pack

Preconfigured set of MPV shaders and configurations for MPV Shim media clients.
Other
86 stars 5 forks source link

how to use pack.json profiles? #3

Open Alistair1231 opened 3 years ago

Alistair1231 commented 3 years ago

The only way I know how to use shaders is the way described by Anime4k

iwalton3 commented 3 years ago

They are used with MPV Shim: https://github.com/jellyfin/jellyfin-mpv-shim#shader-packs-1

notEvil commented 2 years ago

Check out https://gitlab.com/-/snippets/2292495 It generates cmdline arguments for mpv. For instance "--profile=Generic (FSRCNNX)" gives

--deband --deband-grain=0 --deband-range=12 --deband-threshold=32 --hwdec=auto-copy --profile=gpu-hq --gpu-api=opengl --fbo-format=rgba16f --dither-depth=auto --dither=fruit --scale=ewa_lanczos --dscale=mitchell --linear-downscaling=no --cscale=mitchell --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/noise_static_luma.hook --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/noise_static_chroma.hook --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/FSRCNNX_x2_8-0-4-1.glsl --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/SSimDownscaler.glsl --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/KrigBilateral.glsl
Nazeeb01 commented 1 month ago

Check out https://gitlab.com/-/snippets/2292495 It generates cmdline arguments for mpv. For instance "--profile=Generic (FSRCNNX)" gives

--deband --deband-grain=0 --deband-range=12 --deband-threshold=32 --hwdec=auto-copy --profile=gpu-hq --gpu-api=opengl --fbo-format=rgba16f --dither-depth=auto --dither=fruit --scale=ewa_lanczos --dscale=mitchell --linear-downscaling=no --cscale=mitchell --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/noise_static_luma.hook --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/noise_static_chroma.hook --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/FSRCNNX_x2_8-0-4-1.glsl --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/SSimDownscaler.glsl --glsl-shader=/usr/share/mpv-shim-default-shaders/shaders/KrigBilateral.glsl

Hi im trying to add this to my mpv anime4k setup but im not sure what to do. do i just download that file and place it in?

notEvil commented 1 month ago

Hi,

its a Python script which generates either arguments you then pass to mpv directly, or configuration lines you then add to your mpv.conf manually. So python /path/to/snippet.py --help will show you its arguments. Provide --path=/path/to/default-shader-pack if your path is different from the default I chose and --config if you want config lines instead of arguments. Without --profile it will show available profile names and with --profile={name} it will eventually print the final result.

Nazeeb01 commented 1 month ago

@notEvil hi, thanks for the reply.

sorry I don't really understand?

do I open cmd or open the snippet in vscode?

I moved all the shaders into C:\Users\Me\AppData\Roaming\mpv\shaders

Was this correct?

notEvil commented 1 month ago

In that case https://docs.python.org/3/tutorial/interpreter.html might be helpful. It describes how to execute Python scripts from the command line (cmd or Powershell in your case). You don't have to open the snippet in an editor, just pass its path as first argument to Python (instead of /path/to/snippet.py). And your path is fine, thats what you will use instead of /path/to/default-shader-pack

Nazeeb01 commented 1 month ago

nevermind. figured it out. thanks for the help @notEvil