summary refs log tree commit diff
path: root/.config/mpv/config
blob: 41b10cb65a25f4ff3c85ff9d44ba1337f69e0a7b (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
vo = gpu-next
hwdec = auto

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

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

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

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

[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

[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

[compressor]
profile-desc="Apply audio compression"
input-commands-add=load-script '/usr/share/mpv/lua/acompressor.lua'
script-opts-add=acompressor-default_enable=yes

# mpv 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=no
#script-opts-add=uosc-progress=no
script-opts-add=uosc-timeline_size=0
directory-filter-types=image

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

# mpv audio player
[mpa]
profile-desc="mpv audio player"
profile=pseudo-gui
script-opts-add=uosc-volume=none
directory-filter-types=audio

[extension.ogg]
profile=mpa
[extension.flac]
profile=mpa
[extension.wav]
profile=mpa
[extension.mp3]
profile=mpa