-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmpv.conf
More file actions
250 lines (206 loc) · 13.9 KB
/
mpv.conf
File metadata and controls
250 lines (206 loc) · 13.9 KB
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
243
244
245
246
247
248
249
250
# MPV - mpv.conf
# Configured by Zenos:3 - 2024-12-03 - https://github.com/Zenos43
include="~~/profiles.conf"
# ========== GENERAL ==========
saturation=20
contrast=5
force-seekable=yes # If the player thinks that the media is not seekable, force enable seeking
reset-on-next-file=vid,aid,sid,secondary-sid,vf,af,loop-file,deinterlace,contrast,brightness,gamma,saturation,hue,video-zoom,video-rotate,video-pan-x,video-pan-y,panscan,speed,audio-delay,sub-pos,sub-scale,sub-delay,sub-speed,sub-visibility,secondary-sub-visibility
#reset-on-next-file=pause # After playing the next file in the playlist,
image-display-duration=inf # No autoplay with image
hr-seek=yes # Turn on precise seeks when possible, seeks will not limited by keyframes
hr-seek-framedrop=no # set to no could fixes audio desync
input-default-bindings=no # Disable default mpv key bindings
autocreate-playlist=filter
correct-pts=yes
idle = yes
#input-ipc-server=\\.\pipe\mpvsocket # For IPC on Windows - some how this broke the input config with multi player open
# ========== UI ==========
autofit=85%x85%
window-corners=roundsmall # Make window a little bit round
taskbar-progress=no # Disable playback progress rendering in taskbar
no-hidpi-window-scale
#force-window=immediate
keep-open=yes
# ========== WATCH LATER ==========
save-position-on-quit=yes
watch-later-options=start,vid,aid,sid
resume-playback-check-mtime=yes
#resume-playback=no
write-filename-in-watch-later-config=yes
# ========== DIRECTORY ==========
gpu-shader-cache-dir = "~~/cache/shader"
watch-later-dir = "~~/cache/watch_later"
log-file="~~/mpv-log.txt" # Log file
# ========== TERMINAL ==========
# This option can affect log-file - comment this line below to debug errors
msg-level=all=info,pointer_event=error,input=error,demux=error,autoload=warn,dvdnav=fatal,ad=fatal,ffmpeg=no,ytproxy=debug,stream=no,auto_profiles=info,reload=info,ytdl_preload=info,cplayer=info,vo/gpu-next/libplacebo=fatal,vapoursynth=no,vd=no # Suppress useless warnings
msg-color=yes # Color for console ouput terminal
msg-module=yes
# ========== PLAYBACK ==========
# This is what profile=high-quality do:
# scale=ewa_lanczossharp (This also changes the cscale)
# hdr-peak-percentile=99.995
# hdr-contrast-recovery=0.30
# deband=yes
vo=gpu-next # Video output driver sử dụng libplacebo để render. Hỗ trợ gần như đầy đủ các tính năng giống như --vo=gpu
#hwdec=auto-safe # enable hardware decoding, defaults to 'no' (auto-copy-safe | auto-copy | auto-safe *recommend* | hwdec=videotoolbox | videotoolbox-copy | cuda | cuda-copy | nvdec | nvdec-copy | vdpau-copy | vaapi | vaapi-copy | dxva2 | dxva2-copy | d3d11 | d3d11va | d3d11va-copy | d3d12 | d3d12va | d3d12va-copy )
# hwdec-codecs choose =all but if u got ffmpeg av1 error no HW acceleration then choose nvdec-copy ( nvidia card )
hwdec=auto-safe,auto-copy # Recommended method to do hardware decoding on NVIDIA GPUs
hwdec-codecs = h264,hevc,vp8,vp9,av1,nvdec-copy
profile=Default # Apply "Default" profile in profile.conf
gpu-api=d3d11 # "vulkan" Linux - "d3d11" (Windows)
gpu-context=d3d11
# gpu-api=vulkan # Recommend for Linux
#framedrop=no # framedrop=no cause huge inconsistent A-V sync ( audio desync ) - could usefull for maintain A/V sync on slow systems
deinterlace=auto # global reset of deinterlacing to off
fbo-format=rgba16f
# ========== AUTOSPEEDWIN ==========
# Adjust monitor refresh rate and video speed for almost 1:1 playback ( aim to fix A:V desync ). https://github.com/kevinlekiller/mpv_scripts/tree/master/autospeedwin
script-opts=autospeed-nircmd=true,autospeed-speed=false,autospeed-nircmdc="nircmdc",autospeed-monitor=0,autospeed-dwidth=1920,autospeed-dheight=1080,autospeed-bdepth=32,autospeed-rates="60;61",autospeed-exitrate=61,autospeed-minspeed=0.9,autospeed-maxspeed=1.1,autospeed-osd=true,autospeed-osdtime=10,autospeed-estfps=false,autospeed-spause=4
# ========== ON SCREEN DISPLAY AND ON SCREEN CONTROLLER ==========
no-border
osd-bar=no # Use UOSC instead of default UI
osc=no # Use morden-x UI instead of default
border=no # Turn off title bar and border and use morden X instead
cursor-autohide=100 # The mouse pointer will automatically hide behind the ms
osd-level=1
osd-on-seek=no # https://mpv.io/manual/stable/#options-osd-level
osd-duration=1000 # Appearance time of OSD messages equalsms
osd-fractions=yes # See more accurate statistics per millisecond
# Customize the style of OSD messages
osd-font="Open Sans"
osd-font-size=15
osd-border-size=0.6
osd-shadow-offset=0.75
osd-color="#CCFFFFFF"
osd-border-color="#DD322640"
osd-blur=0.2
osd-bold=yes
osd-bar-align-y=0 # progress bar y alignment (-1 top, 0 centered, 1 bottom)
osd-bar-h=2 # height of osd bar as a fractional percentage of your screen height
osd-bar-w=30 # width of " " "
# ========== LANGUAGE PRIORITY ==========
track-auto-selection=yes
alang=ja,jp,jpn,vi,vie,en,eng # Language priority order of audio
slang=vi,vie # Language priority order of subtitles
# ========== AUDIO ==========
audio-file-auto=fuzzy # external audio doesn't has to match the file name exactly to autoload
audio-pitch-correction=yes # automatically insert scaletempo when playing with higher speed
volume-max=200 # maximum volume in %, everything above 100 results in amplification
volume=40 # default volume, 100 = unchanged
gapless-audio=no # <no|yes|weak default> Try to play a continuous audio file without silence or interruption when the file changes. Default value weak: Initialize audio output when the audio format changes
audio-exclusive=no
#ao = wasapi
#audio-buffer=1 # Use this if u got messages "Audio Device Buffer Underrun Detected" - default 0.2
#audio-delay=+0.084 # Positive values delay the audio, and negative values delay the video. ( +0.084 = 84ms )
#audio-exclusive=yes # This is highly recommended for a multi channel soundbar. You need to activate "exclusive mode" in your sound driver on Windows. If u have this error disable this "ao/wasapi: Error initializing device: AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED (0x88890019)"
#Channels that your device supports
#"auto-safe" only sends channels that your active audio device can handle, which can cause issues for an ARC/eARC setup (uses TV instead of soundbar)
#"auto" sends every channels as they're, which works for an eARC/ARC setup but also can cause issues if your sound device doesn't support certain channel setups
#An alternative is to set up a whitelist for supported channels
#audio-channels=auto
# ========== SUBTITLES ==========
sub-visibility = no
embeddedfonts=yes # use embedded fonts for SSA/ASS subs
demuxer-mkv-subtitle-preroll=yes # https://mpv.io/manual/stable/#options-mkv-subtitle-preroll
demuxer-mkv-subtitle-preroll-secs=2
sub-fix-timing=no # Do not try to fix gaps (which might make it worse in some cases).
sub-auto=fuzzy # Load external subtitles with names similar to the video
# The following options apply to subtitles formats that do not have their own style (eg: SRT, VTT...)
sub-file-paths-append=ass
sub-file-paths-append=srt
sub-file-paths-append=pgs
sub-file-paths-append=vob
sub-file-paths-append=sub
sub-file-paths-append=sup
sub-file-paths-append=subs
sub-file-paths-append=subtitles
# This is my favorite style, you can adjust the style according to your own preferences
sub-font='Netflix Sans Light'
sub-font-size=40
sub-blur=1
sub-ass-use-video-data=none # Same as "sub-ass-vsfilter-blur-compat=no" cuz this got removed
subs-fallback=yes
subs-with-matching-audio=yes
sub-use-margins=yes
sub-ass-force-margins=yes
sub-color='#FFFF00' # Yellow sub color
sub-border-color="#FF000000"
sub-shadow-color="#A0000000"
sub-border-size=2
sub-margin-x=100
sub-margin-y=30
sub-shadow-offset=0
sub-spacing=0.5
sub-bold=yes
sub-gauss=0.05 # Gaussian blur factor. 0 means no blur applied (default)
blend-subtitles=no # Subtitle blending in scenechanges (smoother effect)
sub-filter-regex-append=addic7ed\.com|opensubtitles\.org|^Captioned by
# ========== SCREENSHOT ==========
screenshot-format=png # Format of screenshoot
screenshot-high-bit-depth=no # Bitdepth is the same as video.
screenshot-tag-colorspace=no # Tonemap screenshot
screenshot-png-compression=9 # PNG compression ratio (1-9) - High values give better compression, but in return it takes more processing time
screenshot-dir="~/Pictures/mpv" # Directory containing screenshots
screenshot-template="%{?demuxer-via-network==yes:${media-title}%{?demuxer-via-network==yes:_${filename/no-ext}%{!demuxer-via-network==yes:${filename}-%wH.%wM.%wS.%wT-#%#00n" # Định dạng tên (filename-hour-minute-second-milisecond-number)
# ========== CACHE ==========
cache=yes
#cache-on-disk=yes # Store cache payload on the hard disk instead of in RAM. (This may negatively impact performance unless used for slow input such as network.)
#cache-pause=yes #
#cache-pause-wait=3 # <seconds>
#cache-pause-initial=yes # This can be used to ensure playback starts smoothly after buffering (as controlled by cache-pause-wait)
cache-secs=6000 # Enabling cache is useful when playing back previously over the network
demuxer-max-bytes=4GiB # Limit the data size to allow the demuxer to read first
demuxer-seekable-cache=yes
demuxer-readahead-secs=6000 # Time limit for allowing demuxer to read first
demuxer-max-back-bytes=2GiB # Limit the size of read data the demuxer can store
stream-buffer-size=4MiB # KiB, MiB ( 1-4 MiB is optimal more than that affect seekable )
demuxer-lavf-buffersize=9194304 # Bytes
# ========== NETWORKING ==========
tls-verify=no
network-timeout=100
stream-lavf-o-append=reconnect_on_http_error=4xx,5xx
stream-lavf-o-append=reconnect_delay_max=30
stream-lavf-o-append=reconnect_streamed=yes
#stream-lavf-o-append=reconnect_on_network_error=yes
# ========== YTDL ==========
#ytdl-raw-options=ignore-errors= # Disabled cuz it broke the ytdl-raw-options fetch subtitle
#Speed up video opening, thanks for sharing by MrGTOP https://voz.vn/p/33484033/
script-opts=ytdl_hook-try_ytdl_first=yes,ytdl_hook-exclude="%.webm$|%.ts$|%.mp3$|%.m3u8$|%.m3u$|%.mkv$|%.mp4$|%.VOB$|%.wmv$|%.ogg$|%.mpd$|%.mov$|%.webm$|%.webp$|%.avi$|%.flv$|%.swf$|%.f4v$"
ytdl-raw-options-append=no-check-certificates=
ytdl-raw-options-append=yes-playlist=
ytdl-format=bestvideo+bestaudio/best # Param selects the source of youtube-dl
load-unsafe-playlists=yes
ytdl-raw-options-append=sub-langs=vi.*,en.*,ja,ja-JP,jap,live_chat,compat-options="prefer-vp9-sort"
ytdl-raw-options-append=no-write-comments=
ytdl-raw-options-append=write-sub=
ytdl-raw-options-append=write-auto-sub=
ytdl-raw-options-append=add-metadata=
ytdl-raw-options-append=audio-multistreams=
ytdl-raw-options-append=video-multistreams=
#mark-watched for youtube videos - Source: https://voz.vn/t/tong-hop-nhung-addon-chat-cho-firefox-pc-mobile.682181/post-25727088
ytdl-raw-options-append=cookies-from-browser=firefox:C:\Users\Admin\AppData\Roaming\zen\Profiles\oq4hiik5.Default (beta)
ytdl-raw-options-append=mark-watched=
# ========== DITHER ==========
# Use "fruit" (8-Bit/8-Bit+FRC display), "ordered" (true 10-Bit/12-Bit display) or "error-diffusion" with high-end GPUs
# Don't use error-diffusion - there is no difference in outcome compared to fruit or ordered, but it uses a lot more GPU power
# use dither=ordered on vo=gpu-next It's extremely fast and switch to fruit if you see banding artifacts
# On vo=gpu stick with dither=fruit
#dither=fruit # i-GPU/Low-end
#dither-size-fruit=8 # i-GPU/Low-end
#temporal-dither=yes # This option can lead to flicker on LCD displays, since these have a high reaction time
dither-depth=auto # 6for 6Bit PAL, 8 for 8bit, 10 or 12 for 10bit - Nah just use auto
dither=fruit
dither-size-fruit=6
# ========== DEBANDING ==========
# Example of banding: https://imgur.com/32d77H0
# Debanding is the process of removing said banding.
# 6 minute explanation of what causes banding: https://www.youtube.com/watch?v=h9j89L8eQQk
deband=no # Should only be turned on when the video has banding, enabled by default but disabled for 4K videos, in profile.conf (Toggle Keybind=D)
deband-iterations=2 # https://mpv.io/manual/stable/#options-deband-iterations
deband-threshold=20 # https://mpv.io/manual/stable/#options-deband-threshold
deband-range=16 # https://mpv.io/manual/stable/#options-deband-threshold
deband-grain=5 # https://mpv.io/manual/stable/#options-deband-grain - dynamic grain: set to "0" if using the static grain shader
# ========== MOTION INTERPOLATION ==========
tscale=oversample # ( oversample *recommend* | linear | bicubic | bcspline | catmull_rom | mitchell |spline16 | spline36 | spline64 | ginseng | sinc | robidoux | lanczos | robidouxsharp | box | nearest | triangle | gaussian | bartlett | cosine | hanning | hamming | tukey | quadric | welch | kaiser | blackman | sphinx )