-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathmpv.conf
239 lines (188 loc) · 9.35 KB
/
mpv.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# MPV - mpv.conf
# classicjazz - 2024-12-05
# Details about configuring MPV for high quality video are covered here: https://freetime.mikeconnelly.com/archives/5371
# The latest version of this file is located here: https://github.com/classicjazz/mpv-config
# All MPV options are covered here: https://github.com/mpv-player/mpv/blob/master/DOCS/man/options.rst
# All of my upscaling calculations assume a native 4K resolution display
# This configuration file uses the vo=gpu-next (which now works on MacOS)
# https://github.com/mpv-player/mpv/wiki/GPU-Next-vs-GPU
# This config file assumes that you are using a version of MPV that supports Conditional Profiles (i.e. auto-profiles.lau is no longer required). Tested on a Mac Studio with mpv v0.39, libplacebo v7.349.0, FFmpeg 7.1, and MoltenVK v1.2.11 on MacOS Sequoia 15.2.
###########
# General #
###########
# Default profile
# Selected API: select either Vulkan (preferred) or OpenGL
vo=gpu-next
gpu-api=vulkan
hwdec=auto # enable best HW decoder; turn off for software decoding
# Additional Vulkan settings
# vulkan-async-compute=yes
# vulkan-async-transfer=yes
# vulkan-queue-count=1
# vd-lavc-dr=yes
# Additional OpenGL settings
# gpu-api=opengl
reset-on-next-file=audio-delay,mute,pause,speed,sub-delay,video-aspect-override,video-pan-x,video-pan-y,video-rotate,video-zoom,volume
framedrop=no
######
# UI #
######
border=no # hide the window title bar
msg-color=yes # color log messages on terminal
term-osd-bar=yes # display a progress bar on the terminal
force-window=immediate
cursor-autohide=1000 # autohide the curser after 1s
geometry=3840x2160 # force 4k resolution output on Macs, rather than using MacOS upscaling
no-hidpi-window-scale # used on 5K iMac to prevent scaling by OSX
# fullscreen=yes # start in fullscreen mode by default
macos-title-bar-appearance=vibrantDark
macos-title-bar-material=popover
macos-fs-animation-duration=0
sub-font="SFProRounded-Medium"
sub-font-size=32
sub-border-size=1
############
# Playback #
############
deinterlace=no # global reset of deinterlacing to off
##############
# Colorspace #
##############
target-prim=auto
# target-prim=bt.709 # target Rec.709 for SDR TVs
# target-prim=bt.2020 # target Rec.2020 (wide color gamut) for HDR TVs
target-trc=auto
vf=format=colorlevels=full:colormatrix=auto
video-output-levels=full
##########
# Dither #
##########
dither-depth=auto
temporal-dither=yes
dither=fruit
#############
# Debanding #
#############
deband=yes # enabled by default
deband-iterations=4 # deband steps
deband-threshold=35 # deband strength
deband-range=16 # deband range
deband-grain=5 # dynamic grain: set to "0" if using the static grain shader
#########################
# Motion Interpolation #
#########################
display-fps-override=60
video-sync=display-resample
interpolation=yes
tscale=oversample # smoothmotion
################
# Anti-Ringing #
################
scale-antiring=0.6 # luma upscale deringing using libplacebo
# dscale-antiring=0.7 # luma downscale deringing; currently does nothing with vo=gpu-next
# cscale-antiring=0.7 # chroma upscale deringing; currently does nothing with vo=gpu-next
#############################################################
# Upscaling & Processing Based on Source Video's Resolution #
#############################################################
# Chroma subsampling (4:2:0) means that chroma information is encoded at lower resolution than luma
#
# MPV uses the following order of operations:
#
# 1. Apply all luma shaders
# 2. Apply all chroma shaders
# 3. Scale chroma to the size of luma
# 4. Convert both to RGB
# 5. Apply the main scaler to the final output resolution in RGB colorspace
#
# For an overview of MPV's video output, see https://github.com/mpv-player/mpv/wiki/Video-output---shader-stage-diagram
# For a detailed analysis of upscaler/downscaler quality, see https://artoriuz.github.io/blog/mpv_upscaling.html
# If your computer is not powerful enough to run ArtCNN, then you can change the comments, below, for Ravu
############
# Profiles #
############
[4k60] # 2160p @ 60fps (3840x2160 UHDTV)
profile-desc=4k60
profile-cond=((width ==3840 and height ==2160) and p["estimated-vf-fps"]>=31)
# no deinterlacer required because presume progressive
interpolation=no # no motion interpolation is required
deband=no # turn off debanding because presume wide color gamut
interpolation=no # turn off interpolation because presume 60fps
# UHD videos are already 4K so no luma upscaling is needed
glsl-shader="~/.config/mpv/shaders/CfL_Prediction.glsl" # UHD videos are YUV420 so chroma upscaling is needed
# glsl-shader="~/.config/mpv/shaders/CfL_Prediction_Lite.glsl" # less resource-intensive chroma upscaling
[4k30] # 2160p @ 24-30fps (3840x2160 UHDTV)
profile-cond=((width ==3840 and height ==2160) and p["estimated-vf-fps"]<31)
# no deinterlacer required because presume progressive
# apply motion interpolation
deband=no # turn off debanding because presume wide color gamut
# UHD videos are already 4K so no luma upscaling is needed
glsl-shader="~/.config/mpv/shaders/CfL_Prediction.glsl" # UHD videos are YUV420 so chroma upscaling is needed
# glsl-shader="~/.config/mpv/shaders/CfL_Prediction_Lite.glsl" # less resource-intensive chroma upscaling
[full-hd60] # 1080p @ 60fps (progressive ATSC)
profile-desc=full-hd60
profile-cond=((width ==1920 and height ==1080) and not p["video-frame-info/interlaced"] and p["estimated-vf-fps"]>=31)
# no deinterlacer required because presume progressive
interpolation=no # no motion interpolation is required
# apply debanding
glsl-shader="~/.config/mpv/shaders/ArtCNN_C4F16.glsl" # luma upscaling (doubler)
# glsl-shader="~/.config/mpv/shaders/ravu-lite-ar-r4.hook" # less resource-intensive luma upscaling (doubler)
glsl-shader="~/.config/mpv/shaders/CfL_Prediction.glsl" # HD videos are YUV420 so chroma upscaling is needed
# glsl-shader="~/.config/mpv/shaders/CfL_Prediction_Lite.glsl" # less resource-intensive chroma upscaling
[full-hd30] # 1080p @ 24-30fps (NextGen TV/ATSC 3.0, progressive Blu-ray)
profile-desc=full-hd30
profile-cond=((width ==1920 and height ==1080) and not p["video-frame-info/interlaced"] and p["estimated-vf-fps"]<31)
# no deinterlacer required because presume progressive
# apply motion interpolation
# apply debanding
glsl-shader="~/.config/mpv/shaders/ArtCNN_C4F16.glsl" # luma upscaling (doubler)
# glsl-shader="~/.config/mpv/shaders/ravu-lite-ar-r4.hook" # less resource-intensive luma upscaling (doubler)
glsl-shader="~/.config/mpv/shaders/CfL_Prediction.glsl" # HD videos are YUV420 so chroma upscaling is needed
# glsl-shader="~/.config/mpv/shaders/CfL_Prediction_Lite.glsl" # less resource-intensive chroma upscaling
[full-hd-interlaced] # 1080i @ 24-30fps (HDTV, interlaced Blu-rays)
profile-desc=full-hd-interlaced
profile-cond=((width ==1920 and height ==1080) and p["video-frame-info/interlaced"] and p["estimated-vf-fps"]<31)
deinterlace=yes # MPV now uses BWDIF by default
# apply motion interpolation
# apply debanding
glsl-shader="~/.config/mpv/shaders/ArtCNN_C4F16.glsl" # luma upscaling (doubler)
# glsl-shader="~/.config/mpv/shaders/ravu-lite-ar-r4.hook" # less resource-intensive luma upscaling (doubler)
glsl-shader="~/.config/mpv/shaders/CfL_Prediction.glsl" # HD videos are YUV420 so chroma upscaling is needed
# glsl-shader="~/.config/mpv/shaders/CfL_Prediction_Lite.glsl" # less resource-intensive chroma upscaling
[hd] # 720p @ 60 fps (HDTV, Blu-ray - progressive)
profile-desc=hd
profile-cond=(width ==1280 and height ==720)
# no deinterlacer is required
interpolation=no # no motion interpolation is required
# apply debanding
glsl-shader="~/.config/mpv/shaders/ravu-zoom-ar-r3.hook" # luma upscaling (fractional)
glsl-shader="~/.config/mpv/shaders/CfL_Prediction.glsl" # HD videos are YUV420 so chroma upscaling is needed
# glsl-shader="~/.config/mpv/shaders/CfL_Prediction_Lite.glsl" # less resource-intensive chroma upscaling
[sdtv-ntsc] # 640x480, 704x480, 720x480 @ 30fps (NTSC DVD - interlaced)
profile-desc=sdtv-ntsc
profile-cond=((width ==640 and height ==480) or (width ==704 and height ==480) or (width ==720 and height ==480))
deinterlace=yes # MPV now uses BWDIF by default
# apply motion interpolation
# apply debanding
glsl-shader="~/.config/mpv/shaders/ravu-zoom-ar-r3.hook" # luma upscaling (fractional)
glsl-shader="~/.config/mpv/shaders/CfL_Prediction.glsl" # SD videos are YUV420 so chroma upscaling is needed
# glsl-shader="~/.config/mpv/shaders/CfL_Prediction_Lite.glsl" # less resource-intensive chroma upscaling
[sdtv-pal] # 352x576, 480x576, 544x576, 720x576 @ 30fps (PAL broadcast or DVD - interlaced)
profile-desc=sdtv-pal
profile-cond=((width ==352 and height ==576) or (width ==480 and height ==576) or (width ==544 and height ==576) or (width ==720 and height ==576))
deinterlace=yes # MPV now uses BWDIF by default
# apply motion interpolation
# apply debanding
glsl-shader="~/.config/mpv/shaders/ravu-zoom-ar-r3.hook" # luma upscaling (fractional)
glsl-shader="~/.config/mpv/shaders/CfL_Prediction.glsl" # SD videos are YUV420 so chroma upscaling is needed
# glsl-shader="~/.config/mpv/shaders/CfL_Prediction_Lite.glsl" # less resource-intensive chroma upscaling
###################################
# Protocol Specific Configuration #
###################################
[protocol.http]
hls-bitrate=max # use max quality for HLS streams
cache=yes
no-cache-pause # don't pause when the cache runs low
[protocol.https]
profile=protocol.http
[protocol.ytdl]
profile=protocol.http