summary refs log tree commit diff
path: root/.config/mpv/config
blob: 65fadafcbf2cc043f1b2ee1d51a77d457495644f (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
# MPV Configuration

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

cache=yes
demuxer-max-back-bytes=100M
demuxer-max-bytes=100M
demuxer-readahead-secs=20

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

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

deband=yes

#
# 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

#
# 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-osd-console=yes
keepaspect-window=yes
autofit-larger=x50%
osd-scale-by-window=no

#
# Misc.
#
screenshot-directory=~/pictures/screenshots/mpv
screenshot-template='%tY%tm%td-%tH%tM%tS-%F-%p'
# screenshot-format=png
# screenshot-jpeg-quality=100
ytdl-format=bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4,best
#ytdl-raw-options=prefer-free-formats=true

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

[protocol.http]
profile-desc="Optimized for streaming video"
glsl-shaders-clr
title="${media-title}"
ytdl-format=bestvideo[height<=?1080]+bestaudio/best[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"
glsl-shaders-clr
scale=ewa_lanczossharp
cscale=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

[3d]
profile-desc="Transform 3d video file to 2d"
vf-add='stereo3d:ab2l:ml'

[skip-silence]
profile-desc="Skip over silent parts"
af-add='silenceremove=0:0:0:-1:0.001:-45dB:0:rms'

[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]'

# image viewer settings

[mvi]
profile-desc="mpv image viewer"
profile=gpu-hq
sub-auto=no
audio-file-auto=no
term-status-msg=
title="${?media-title:${media-title}}${!media-title:No file} - mvi"
video-aspect-override=no
loop-file=inf
image-display-duration=inf
input-conf=~/.config/mvi/input.conf

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