View Single Post
Old 24th October 2020, 17:59   #49  |  Link
butterw2
Registered User
 
Join Date: Jun 2020
Posts: 303
# Mpv shader basics

Tests performed with a portable version of mpv-x64 on Win10:

https://mpv.io/installation/
this default mpv version doesn't come with a GUI like mpc-hc/be: it's exe (+command-line) + On-Screen-Controller + Hotkeys.

Install directory (ensure it has write permission).
create ./portable_config for configuration files:
- mpv.conf (config file, not provided by default, but you do really need one !!!)
- input.conf (custom hotkeys will override defaults)

you can put shaders directly in the install dir or you can use a subfolder. No user shaders are provided by default.

There are 3 ways to select/control shaders in mpv:
- default configuration (mpv.conf)
- launch command-line (can add shaders or override default configuration)
- hotkeys


Example ./portable_config/mpv.conf (vo=gpu d3d11 with dxva2-copy on Win10):
Code:
#-- Shaders --------
glsl-shader="noChroma.hook"
glsl-shader="./shaders/CrossHatch.hk"
# glsl-shader="./shaders/freichen.hk"
# glsl-shader="./shaders/cs_wkgroups.hk.glsl" 
--gpu-shader-cache-dir="C:\Temp" # ! set the shader cache to a directory with write access

#-- Video ------
hwdec=dxva2-copy #hwdec=d3d11va-copy
hwdec-codecs=all
gpu-api=d3d11
gpu-context=d3d11
vo=gpu
#profile=fast
audio-device=auto

#-- Scalers -- Luma/Rgb scale (dscale), Chroma (cscale)
dscale = mitchell #cscale= bilinear
scale = catmull_rom

##-- Screenshots --------
screenshot-format=png
screenshot-jpeg-quality=96

## --Window settings--------
# Start in fullscreen mode by default. #fs=yes
# force starting with centered window #geometry=50%:50%
# geometry=720x720 #fixed window size 
# don't allow a new window to have a size larger than 90% of the screen size # autofit-larger=90%x90%
# mpv doesn't have an enforceable option to start at 100% scale: 
autofit-larger=1280

keep-open=yes # Do not close the window on exit.

Last edited by butterw2; 13th January 2024 at 19:28. Reason: +gpu-shader-cache-dir
butterw2 is offline   Reply With Quote