From 34e000e01af1d58e5f22758bc973c8100770b4b3 Mon Sep 17 00:00:00 2001 From: gaitas13 <91051922+gaitas13@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:49:45 +0200 Subject: [PATCH] changed cscale and better comments and organization for mpv.conf --- .config/mpv/mpv.conf | 134 ++++++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 65 deletions(-) diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index 3e0af28..c62787b 100755 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -1,23 +1,21 @@ #VIDEO -#Mitchell-Netravali. The B and C parameters can be set with --scale-param1 and -#--scale-param2. This filter is very good at downscaling (see --dscale). -#catmull_rom uses less resources than lanczos +#catmull_rom uses less resources than lanczos and ewa_lanczossharp. #spline36 is kinda bad, for upscaling you should use bicubic catrom for preserving spatial proerties -#or a lanczos scaler (like ewa_lanczos or ewa_lanczossharp) for sharpness +#or a lanczos scaler (like ewa_lanczos or ewa_lanczossharp) for sharpness. +#mitchell = bicubic b 1/3 c 1/3, can be tuned with scale-param1 and scale-param2 #catmull_rom = bicubic b 0 c 0.5 -#mitchell = bicubic b 1/3 c 1/3 #hermite = bicubic b 0 c 0 scale=catmull_rom -#--dscale= -#Like --scale, but apply these filters on downscaling instead. -#If this option is unset, the filter implied by --scale will be applied. +#dscale, like scale, but for downscaling, +#it defaults to scale if unset -#due to how negative lobes work, mitchell and hermite perform much better for downscaling (less ringing and aliasing) +#Due to not having a negative lobe, mitchell and hermite are +#much better for downscaling (less ringing and aliasing). #hermite is sharper than mitchell #https://github.com/mpv-player/mpv/pull/12384#issuecomment-1716775594 #https://github.com/mpv-player/mpv/pull/12384#issuecomment-1716855374 @@ -25,29 +23,25 @@ scale=catmull_rom dscale=hermite -#catmull_rom, sinc(blackman), ewa_hanning -#For a traditional scaler, is better to use sinc, but it has random performance spikes and -#more resource usage than catmull_rom +#'catmull_rom', 'sinc(blackman)', 'lanczos', 'ewa_hanning', 'ewa_lanczossharp' +#For a traditional scaler, is better to use sinc, but it has more resource usage than catmull_rom. cscale=sinc cscale-window=blackman #for sinc cscale-radius=3 #for sinc +#https://github.com/mpv-player/mpv/issues/12163 #you can also use 'FastBilateral', 'JointBilateral', 'MemeBilateral' or KrigBilateral -#(less to more quality and performance) meme shaders for better chroma -#FastBilateral and JointBilateral may have staircase artifacts -#MemeBilateral is JointBilateral with + CfL (Chroma from Luma prediction), so you can also use FastBilateral and CfL together for better performance -glsl-shader="~~/shaders/FastBilateral.glsl" -#glsl-shader="~~/shaders/CfL_Prediction.glsl" +#meme shaders if you trust them. +#Fast and Joint may have staircase artifacts. +#Meme is Joint with + CfL (Chroma from Luma prediction), so you can instead use Fast and CfL +#together for better performance. +#glsl-shader="~~/shaders/FastBilateral.glsl" +#glsl-shader="~~/shaders/CfL_Prediction.glsl" #CfL has big accuracy issues -#there are memes about bilinear cscale being the true way the encoder and encoding software -#intended the chroma to be watched, if you believe them or not is up to you -#cscale=bilinear +#There are memes about bilinear cscale being the true way the encoder and encoding software +#intended the chroma to be watched, if you believe them or not is up to you. -#you can use sphinx (smoother) or oversample (less blurry), not a fan of them -#tscale=sphinx -#tscale-blur=0.6991556596428412 #magic haasn number for sphinx - # AUDIO @@ -55,47 +49,45 @@ glsl-shader="~~/shaders/FastBilateral.glsl" #audio-device=alsa/default -#Audio output drivers are interfaces to different audio output facilities. +#Audio output drivers ao=pipewire,coreauido,pulse,wasapi, -#Load external audio with (almost) the same name as the video -audio-file-auto=fuzzy - volume=100 volume-max=200 -# Do not filter audio to keep pitch when changing playback speed. +# enabling it will keep the pitch when changing speed #audio-pitch-correction=no -# Output 5.1 audio natively, and upmix/downmix audio with a different format. -#audio-channels=5.1 -# Output 2.0 audio natively, and upmix/downmix audio with a different format. +# the audio will upmix and downmix to channel config, for example +# 'stereo' for 2.0 and 5.1 for 5.1, 'auto' will try to avoid up/downmixing +# default is 'auto-safe'. audio-channels=stereo -# Disable any automatic remix, _if_ the audio output accepts the audio format. -# of the currently played file. See caveats mentioned in the manpage. -# (The default is "auto-safe", see manpage.) -#audio-channels=auto + #raw bitperfect audio, but you can only hear mpv audio-exclusive=no + + # OTHER +#Load external audio with (almost) the same name as the video. +audio-file-auto=fuzzy + sub-auto=fuzzy #user-agent="Mozilla/5.0" - -# Display English subtitles if available. +#Tries to load subtitles in these languages, if one is not available +#it falls back to the next one. slang=en -# Play Finnish audio if available, fall back to English otherwise. -#alang=fi,en +#same for audio +#alang=ja,en -# Change subtitle encoding. For Arabic subtitles use 'cp1256'. -# If the file seems to be valid UTF-8, prefer UTF-8. -# (You can add '+' in front of the codepage to force it.) -#sub-codepage=cp1256 +#Changes subtitle encoding, if the file is valid utf8 it prefers it, +#add '+' in front of codepage '+utf8' to force it. +#sub-codepage=utf8 # You can also include other configuration files. #include=/path/to/the/file/you/want/to/include @@ -124,13 +116,16 @@ screenshot-png-filter=0 # HDR TONE MAPPING -dither=fruit +#https://github.com/mpv-player/mpv/pull/6564#issuecomment-473522461 +#https://doodad.dev/dither-me-this/ dither-depth=8 +dither=fruit #dither-size-fruit=8 -#common primaries for modern displays are 'bt.709' (sRGB), 'bt.2020', 'apple' (Apple RGB), 'adobe' (Adobe RGB), 'dci-p3' + +#common primaries for modern displays are 'bt.709' (sRGB), 'bt.2020', 'apple' (Apple RGB), 'adobe' (Adobe RGB) and 'dci-p3' target-prim=bt.709 # transfer characteristics (gamma), you can leave it on 'auto', you can also use 'bt.1886', 'srgb', 'linear', 'pq' or another option @@ -143,22 +138,21 @@ hdr-compute-peak=yes allow-delayed-peak-detect=yes #better performance -tone-mapping=bt.2390 -#tone-mapping-param=1.5 +#You can use 'spline' (probably better), 'bt.2390', 'bt.2446a' or leave it on 'auto'. +tone-mapping=spline +#tone-mapping-param=1.5 #For bt.2390, mpv default 1.0 and some like 1.5, for spline default is 0.3 hdr-peak-percentile=100 #better leave it at 100 #tone-mapping-mode=hybrid #deprecated https://github.com/mpv-player/mpv/commit/b4c98cb04c87999eccd061cc59e6f5f8fa706220 -gamut-mapping-mode=darken +gamut-mapping-mode=perceptual icc-intent=0 #blend-subtitles=yes -#tone-mapping=bt.2446a - @@ -171,37 +165,47 @@ deband=no # HARDWARE DECODING +#gpu has better performance but gpu-next has better hdr. +#vo=gpu +vo=gpu-next + +#on windows be careful of using dxva2, d3d11va is better. +hwdec=auto-safe +#hwdec=auto-copy-safe #enables copyback + +#hwdec=vulkan + #vulkan uses more resources,but has better hdr compatibility -#if you use d3d11va-copy without opengl or vulkan, it may lead to video/audio desync #gpu-api=opengl # Uncomment this if you notice stuttering with vulkan, opengl may cause screen tearing depending of your config #gpu-api=vulkan # Comment this if you notice stuttering and uncomment the above line + +vulkan-device='Intel(R) UHD Graphics 620' +#vulkan-device='NVIDIA GeForce MX110' + #gpu-context=winvk vulkan-async-compute=yes vulkan-async-transfer=yes vulkan-queue-count=1 -vulkan-device='Intel(R) UHD Graphics 620' -#vulkan-device='NVIDIA GeForce MX110' + #opengl-waitvsync=yes -vd-lavc-dr=yes #i think this solves screen tearing when using gpu-api=opengl +vd-lavc-dr=yes spirv-compiler=auto -hwdec=auto-safe -#hwdec=auto-copy-safe -#hwdec=vaapi -#hwdec=vulkan -#hwdec=d3d11va-copy #windows only, auto-copy uses dxva2-copy instead of d3d11va-copy, but d3d11va-copy is better and has better color -#hwdec=vaapi-copy +# TEMPORAL INTERPOLATION (BETWEEN FRAMES) #interpolation=yes #interpolation-threshold=-1 -#video-sync=display-resample +#video-sync=display-resample #can help with interpolation + +#for tscale you can use 'sphinx' (smoother) or 'oversample' (less blurry) +#tscale=sphinx +#tscale-blur=0.6991556596428412 #magic haasn number for sphinx + video-sync=audio #fix desync on d3d11va-copy when not using gpu-api = opengl or vulkan -#gpu has better performance but gpu-next has better hdr -#vo=gpu -vo=gpu-next +