summary refs log tree commit diff
path: root/.config/mpv/config
blob: 8e43c38914df75c49d4bb234f9397667c520c446 (plain) (blame)
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
240
241
242
# MPV Configuration

input-ipc-server=/run/user/1000/mpv
script-opts=ytdl_hook-ytdl_path=/usr/bin/yt-dlp,ytdl_hook-all_formats=yes

autocreate-playlist=same
cache=yes

#
# Video
#
vo=gpu-next
# hwdec=auto-copy
hwdec=vaapi
gpu-context=waylandvk
gpu-api=vulkan
# framedrop=decoder+vo
video-sync=display-resample
# interpolation
window-maximized=no # prevent wayland problems with buffer resize

# colour shit
tone-mapping=auto
# tone-mapping=bt.2446a
# icc-profile=~~/B140QAN02_0.icm
# tone-mapping=mobius
# inverse-tone-mapping
# target-peak=500

#
# Audio
#
alang=jpn,ja,eng,en,ger,de
volume-max=120
audio-channels=auto-safe

#
# Subtitles
#
slang=eng,en,ger,de,jpn,ja

# sub-font=Rosario
sub-font=Luciole
# sub-scale-by-window=no
sub-blur=0.2
sub-border-color=0.0/0.0/0.0/1.0
sub-border-size=3.0
sub-color=1.0/1.0/1.0
sub-margin-x=100
sub-margin-y=10
sub-shadow-color=0.0/0.0/0.0/0.25
sub-shadow-offset=0

sub-fix-timing=yes
# sub-ass-vsfilter-blur-compat=no
# sub-ass-force-style=Kerning=yes

# Some settings fixing VOB/PGS subtitles
# (creating blur & changing yellow subs to gray)
sub-gauss=0.6
sub-gray=yes

# Forces showing subtitles while seeking through the video
demuxer-mkv-subtitle-preroll=yes

# Allows to put subtitles into letterbox
stretch-image-subs-to-screen=yes

#
# OSD
#
osc=no # we use uosc
osd-bar=no # we use uosc
border=no # needed for uosc decorations

osd-font=Iosevka Etoile
cursor-autohide=100
cursor-autohide-fs-only
keep-open=yes
stop-screensaver=yes
load-stats-overlay=yes
load-console=yes
keepaspect-window=yes
autofit-larger=x50%
# osd-scale-by-window=no
# hidpi-window-scale=yes
deband=no

#
# Screenshots
#
screenshot-directory=~/pictures/screenshots/mpv
screenshot-template='%tY%tm%td-%tH%tM%tS-%F-%p'
screenshot-format=png
screenshot-png-compression=9

#
# Named filter chains
# (don't forget to invert with "!" to disable by default)
#
vf-add=@deband:!gradfun
vf-add=@no-3d:!stereo3d:ab2l:ml
af-add=@skip-silence:!silenceremove=0:0:0:-1:0.001:-45dB:0:rms

#
# PROFILES
#
[fullscreen]
vo=dmabuf-wayland

[protocol.http]
profile-desc="Optimized for streaming video"
glsl-shaders-clr
title="${media-title}"
# ytdl-format=bv[height<=?1080]+ba / b[height<=?1080]
ytdl-format=(bv[vcodec~='^av01']/bv)[height<=?1080]+ba / b[height<=?1080]
demuxer-seekable-cache=yes
cache-pause=no
hls-bitrate=max

[protocol.https]
profile=protocol.http

# [url.ytcookies]
# profile=protocol.http
# profile-cond=not not string.match(get('path'), 'youtube.com')
# # ytdl-raw-options=cookies=~/Downloads/cookies.balena_google_drive.txt

[gpuhq]
profile-desc="Optimized for HQ rendering"
profile-cond=height <= 1440
profile=gpu-hq

[scale]
profile-desc="Use fancy scaling algorithms"
profile-cond=height <= 1440
glsl-shaders-clr
scale=ewa_lanczossharp
dscale=ewa_lanczossharp
correct-downscaling=yes
sigmoid-upscaling=yes

# [interpolate]
# profile-desc="Increase framecount by interpolating (with vapoursynth)"
# profile=gpu-hq
# vf-toggle=@vsfmt:format=yuv420p
# vf-toggle=@vsscale:scale=w=-1:h=540
# vf-toggle=@vs:vapoursynth=~~/vapoursynth/interpolate.vpy:4:4
# sws-scaler=spline

[reset]
profile-desc="Reset everything to vanilla mpv"
profile=default
load-scripts=no
osc=yes
osd-bar=yes

[webcam]
profile-desc="Optimized for showing real-time webcam feed"
profile-cond=(not not string.match(get('path'), '/dev/video*'))
load-scripts=no
osc=no
profile=low-latency
untimed
video-sync=display-resample
no-demuxer-thread
opengl-glfinish=yes
opengl-swapinterval=0
vf-add=hflip

[webcam/local]
profile-cond=(not not string.match(get('path'), '/dev/video0'))
profile=webcam
demuxer-lavf-o=input_format=mjpeg

[downmix]
ad-lavc-downmix=no
# == pan ==
# <output channel layout> | <output channel definition>
# FL = front left
# FC = front center
# BL = back left
# SL = side left
# LFE = low frequency
#
# == dynaudnorm ==
# g (gausssize): 3-301 (must be odd; default: 31), window size (in frames) of smoothing filter around current frame
#   larger: stronger smoothing -> less gain variation
# f (framelen): 10-8000 ms (default: 500), length of the section of audio used to detect peaks
# r (targetrms): 0.0-1.0 (default: 0.0 disabled), use RMS (root mean square) of signal instead of peak - better approx. of "perceived loudness"
#   adjusts frames to a constant RMS value
# p (peak): (default: 0.95 leaves 5% headroom), target peak value
#af-add='lavfi=[pan=2.1| FL < FC+0.8FL+0.1*BL+0.1*SL | FR < FC+0.8*FR+0.1*BR+0.1*SR | LFE < LFE,dynaudnorm=g=41:f=700:r=0.9]'
#af-add='lavfi=[pan=5.1| FL < 0.8*FL | FR < 0.8*FR | LFE < LFE | FC < FC | BL < BL | BR < BR,dynaudnorm=g=41:f=700:r=0.9]'
af-add='lavfi=[pan=5.1| FL = 0.5*FL | FR = 0.5*FR | LFE = LFE | FC = FC | BL = 0.3*BL | BR = 0.3*BR]'

[fastforward]
profile-restore=copy-equal
profile=fast
scale=bilinear
dscale=bilinear
cscale=bilinear
vd-lavc-skiploopfilter=all
vd-lavc-skipframe=all

[bigcache]
demuxer-readahead-secs=20
demuxer-max-bytes=512M
demuxer-max-back-bytes=512M

# image viewer settings

[mvi]
profile-desc="mpv image viewer"
profile-restore=copy-equal
profile=gpu-hq
profile=scale
sub-auto=no
audio-file-auto=no
term-status-msg=
title="${?media-title:${media-title}}${!media-title:No file}"
video-aspect-override=no
loop-file=inf
image-display-duration=inf
input-conf=~~/mvi/input.conf
input-commands-add=load-script '~~/mvi/scripts/ruler.lua'
input-commands-add=load-script '~~/mvi/scripts/detect-image.lua'
input-commands-add=load-script '~~/mvi/scripts/freeze-window.lua'
input-commands-add=load-script '~~/mvi/scripts/image-positioning.lua'
input-commands-add=load-script '~~/mvi/scripts/minimap.lua'
input-commands-add=load-script '~~/mvi/scripts/ruler.lua'
script-opts-add=uosc-volume=none
script-opts-add=uosc-controls=never
script-opts-add=uosc-progress=never
script-opts-add=uosc-timeline_size=0

[extension.jpg]
profile=mvi
[extension.png]
profile=mvi
[extension.gif]
profile=mvi