Skip to content

Instantly share code, notes, and snippets.

@JySzE
Last active May 2, 2024 18:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JySzE/db4149cad726b3b6955dca8d47a19721 to your computer and use it in GitHub Desktop.
Save JySzE/db4149cad726b3b6955dca8d47a19721 to your computer and use it in GitHub Desktop.
JySzE MPV Config
# Version 2.4
# 05/02/2024
# Adjust as needed.
input-ar-delay = 500
input-ar-rate = 20
keep-open = yes
keep-open-pause = no
osd-duration = 1500
osd-playing-msg = ${filename}
script-opts = osc-timems=yes
autofit-larger = 100%x95%
#######################################################################################################################################
# Specifically made for windows.
vo = gpu-next
gpu-context = d3d11
gpu-api = d3d11
hwdec = d3d11va-copy
d3d11-flip = no
# For multi GPU users. (Dont use iGPU if dGPU is found). No harm to desktop users.
# If AMD is not found it looks for NVIDIA, if NVIDIA is not found it defaults to INTEL.
# AMD iGPUs exist so we check AMD first and overwrite this param if both AMD iGPU and a NVIDIA dGPU exist resulting in NVIDIA being used.
# You can safely ignore errors in console.
d3d11-adapter=AMD
d3d11-adapter=NVIDIA
#######################################################################################################################################
scale = ewa_lanczossharp
scale-antiring = 0.4
cscale = ewa_lanczossharp
dscale = ewa_robidoux # Polar Catmull-Rom (0.0, 0.5)
dscale-param1 = 0.0
dscale-param2 = 0.5
dscale-antiring = 0.5
correct-downscaling = yes
sigmoid-upscaling = yes
dither-depth = 8 # Set to your displays bitdepth.
dither = fruit # Change to "ordered" if 10 or 12 bit display.
deband = no
#######################################################################################################################################
# Adjust as needed.
screenshot-format = png
screenshot-sw = no
screenshot-high-bit-depth = no
screenshot-tag-colorspace = no
screenshot-png-compression = 4
screenshot-directory = ~~desktop/
screenshot-template = '%f_M%wM_S%wS_MS.%wT_F%{estimated-frame-number}'
#######################################################################################################################################
# Adjust as needed.
sub-auto = fuzzy
sub-font="Gandhi Sans"
sub-font-size=52
sub-color=0.95/0.95/0.95/1
sub-blur=0.2
sub-border-size=3
sub-border-color=0.05/0.05/0.05/1
sub-spacing=0
sub-shadow-offset=0
sub-shadow-color=0/0/0/0.25
sub-use-margins=no
sub-margin-y=50
sub-margin-x=100
sub-scale-with-window=no
sub-ass-override=no
demuxer-mkv-subtitle-preroll=yes
sub-fix-timing=yes
#######################################################################################################################################
# Auto Profiles.
[SDR]
profile-desc = "SDR"
profile-cond=p["video-params/gamma"]~="pq" and p["video-params/primaries"]~="bt.2020" and p["video-params/colormatrix"]~="dolbyvision"
gamut-mapping-mode = saturation # Do not change.
libplacebo-opts = gamut_expansion=yes # Do not change.
[HDR WEBDL & Blu-ray / DV Blu-ray]
profile-desc = "HDR WEBDL & Blu-ray / DV Blu-ray"
profile-cond=p["video-params/gamma"]=="pq" and p["video-params/primaries"]=="bt.2020" and p["video-params/colorlevels"]~="full"
tone-mapping = spline # Change to your preferred if necessary.
target-prim = bt.709
target-trc = bt.1886
hdr-compute-peak = yes
gamut-mapping-mode = perceptual # Change to your preferred if necessary.
target-peak = 120 # Adjust this as you see fit.
[DV WEBDL]
profile-desc = "DV WEBDL"
profile-cond=p["video-params/pixelformat"]=="p010" and p["video-params/colorlevels"]=="full" and p["video-params/colormatrix"]=="dolbyvision"
tone-mapping = bt.2446a # Change to your preferred if necessary.
target-prim = bt.709
target-trc = bt.1886
hdr-compute-peak = yes
gamut-mapping-mode = perceptual # Change to your preferred if necessary.
target-peak = 120 # Adjust this as you see fit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment