-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmpv.conf
More file actions
executable file
·218 lines (188 loc) · 9.41 KB
/
mpv.conf
File metadata and controls
executable file
·218 lines (188 loc) · 9.41 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
################################################################################
# MPV Configuration File
#
# This configuration file is optimized for general use as well as for systems
# with low-end CPUs when playing AV1 videos. Note that the RX580 (Nitro+)
# does not support hardware AV1 decoding, so AV1 files are decoded in software,
# which can overload a weak CPU. To reduce this load, we provide an AV1 profile.
#
# To enable the AV1-optimized settings, launch mpv with:
# mpv --profile=av1 <video_file>
#
# If you want to use full settings (with advanced shaders and interpolation)
# for other videos, simply do not activate the AV1 profile.
################################################################################
#########################
# 1. User Interface (UI) Settings
#########################
no-border # Hide the window title bar
msg-color=yes # Enable colored log messages in the terminal
term-osd-bar=yes # Display an on-screen progress bar in the terminal
no-hidpi-window-scale # Prevent automatic scaling on high-DPI displays
force-window=immediate # Immediately show the window (even before video loads)
geometry=40%:60% # Set initial window size to 40% width and 60% height
autofit-larger=60%x60% # Ensure new windows do not exceed 60% of screen size
osc=no # Disable the On Screen Controller (OSC)
ontop=no # Do not force the window to remain on top
#########################
# 2. General Playback Settings
#########################
--keep-open # Keep the player open even after the playlist ends
--save-position-on-quit # Save playback position on exit
script-opts="osc-title=${filename}" # Display the filename in the OSC title
#########################
# 3. Screenshot Settings
#########################
screenshot-format=jpg # Set screenshot format to JPEG
screenshot-jpeg-quality=100 # Highest JPEG quality (100)
screenshot-high-bit-depth=yes # Enable high-bit-depth screenshots
screenshot-directory="~/Pictures/ScreenShot/mpv" # Directory for saving screenshots
#########################
# 4. GPU API & Decoding Settings
#########################
gpu-api=vulkan # Use the Vulkan API for rendering
# Uncomment the next line to switch to OpenGL if needed:
# gpu-api=opengl
# Note:
# RX580 does not support hardware AV1 decoding.
# For other codecs that support hardware decoding, you may try:
# hwdec=auto
#########################
# 5. Colorspace & Video Output Settings
#########################
target-prim=auto # Automatically select target color primaries
target-trc=auto # Automatically select target transfer characteristics
gamma-auto # Auto-adjust gamma settings
vf=format=colorlevels=full:colormatrix=auto # Force full range color levels and auto color matrix
video-output-levels=full # Use full range for video output
#########################
# 6. Motion Interpolation & Video Sync Settings
#########################
override-display-fps=60 # Override the display FPS to 60
video-sync=display-resample # Use display resampling for video synchronization
interpolation=yes # Enable frame interpolation for smoother playback
tscale=oversample # Use oversampling time scaling (note: this is CPU intensive)
#########################
# 7. Anti-Ringing Settings
#########################
scale-antiring=0.7 # Luma upscale deringing factor
dscale-antiring=0.7 # Luma downscale deringing factor
cscale-antiring=0.7 # Chroma (color) deringing factor
#########################
# 8. Subtitle & Audio Settings
#########################
sub-auto=fuzzy # Enable fuzzy matching for auto-loading subtitles
slang=en,eng,english # Preferred subtitle languages: English variants
alang=fa,en # Preferred audio languages: Persian first, then English
volume-max=150 # Maximum volume (in percent)
volume=75 # Default starting volume (in percent)
title="${filename} - mpv" # Set window title to the filename
#########################
# 9. File Extension Specific Settings
#########################
[extension.mp3]
geometry=250x250 # Set a smaller window for audio files (e.g., MP3)
[extension.webm]
loop-file=inf # Loop webm files indefinitely
[extension.gif]
loop-file=inf # Loop GIF files indefinitely
# For image files, display them indefinitely
image-display-duration=inf
#########################
# 10. Protocol Specific Configuration
#########################
user-agent="Mozilla/5.0" # Spoof user-agent as a web browser
[protocol.http]
hls-bitrate=max # Use maximum quality for HLS streams
cache=yes # Enable caching
no-cache-pause # Do not pause when the cache is low
[protocol.https]
profile=protocol.http # Use HTTP protocol settings for HTTPS
[protocol.ytdl]
profile=protocol.http # Use HTTP settings for youtube-dl/yt-dlp
ytdl-format=auto # Automatically select best video format
script-opts="ytdl-all-subs,ytdl_hook-ytdl_path=yt-dlp" # Enable all subtitles and set yt-dlp path
#########################
# 11. Idle Profile Settings
#########################
[Idle]
profile-cond=p["idle-active"] # Activate when in idle mode
profile-restore=copy-equal # Restore profile settings on exit of idle mode
keepaspect=no # Do not force aspect ratio in idle mode
cursor-autohide=1001 # Auto-hide the mouse cursor after 1 second
#########################
# 12. Upscaling & Shader (Processing) Settings
#########################
fbo-format=rgba16f # Use 16-bit float for framebuffer (if supported by GPU API)
glsl-shaders-clr # Clear any previously loaded GLSL shaders
glsl-shaders="~/.config/mpv/shaders/FSRCNNX_x2_8-0-4-1.glsl" # Luma upscaling shader (FSRCNNX)
scale=ewa_lanczos # Use EWA Lanczos scaling for luma
glsl-shaders-append="~/.config/mpv/shaders/SSimDownscaler.glsl" # Append luma downscaling shader (SSimDownscaler)
dscale=mitchell # Use Mitchell algorithm for luma downscaling
linear-downscaling=no # Disable linear downscaling
glsl-shaders-append="~/.config/mpv/shaders/KrigBilateral.glsl" # Append chroma scaling shader (KrigBilateral)
cscale=mitchell # Use Mitchell algorithm for chroma scaling (ignored with GPU-next)
sigmoid-upscaling=yes # Enable sigmoid upscaling for smoother results
#########################
# 13. Profiles for Specific Resolutions & Frame Rates
#########################
[4k60]
profile-desc=4K at 60fps (3840x2160 @60fps)
profile-cond=((width ==3840 and height ==2160) and p["estimated-vf-fps"]>=31)
deband=no # Disable debanding (assumes wide color gamut)
interpolation=no # Disable interpolation on native 60fps content
glsl-shaders-clr # Clear any extra shaders
[4k30]
profile-desc=4K at 30fps (3840x2160 @24-30fps)
profile-cond=((width ==3840 and height ==2160) and p["estimated-vf-fps"]<31)
deband=no
glsl-shaders-clr
[full-hd60]
profile-desc=Full HD at 60fps (1920x1080, progressive)
profile-cond=((width ==1920 and height ==1080) and not p["video-frame-info/interlaced"] and p["estimated-vf-fps"]>=31)
interpolation=no # Disable interpolation for smooth 60fps playback
[full-hd30]
profile-desc=Full HD at 30fps (1920x1080, progressive)
profile-cond=((width ==1920 and height ==1080) and not p["video-frame-info/interlaced"] and p["estimated-vf-fps"]<31)
# Interpolation may be applied here if desired
[full-hd-interlaced]
profile-desc=Full HD Interlaced (1920x1080 interlaced)
profile-cond=((width ==1920 and height ==1080) and p["video-frame-info/interlaced"] and p["estimated-vf-fps"]<31)
vf=bwdif # Use ffmpeg’s “bwdif” deinterlacer
[hd]
profile-desc=HD (1280x720 @60fps)
profile-cond=(width ==1280 and height ==720)
interpolation=no
[sdtv-ntsc]
profile-desc=SDTV NTSC (e.g., 640x480, 704x480, 720x480 @30fps, interlaced)
profile-cond=((width ==640 and height ==480) or (width ==704 and height ==480) or (width ==720 and height ==480))
vf=bwdif
[sdtv-pal]
profile-desc=SDTV PAL (e.g., 352x576, 480x576, 544x576, 720x576 @30fps, interlaced)
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))
vf=bwdif
#########################
# 14. AV1 Optimized Profile
#########################
# The AV1 profile is designed to reduce CPU load when playing AV1 videos
# (which are decoded in software on the RX580). Advanced features like frame
# interpolation and high-quality shaders are disabled to improve performance.
# To activate these settings, launch mpv with:
# mpv --profile=av1 <video_file>
[av1]
profile-desc=Optimized AV1 Settings (for low-end CPUs)
interpolation=no # Disable frame interpolation to save CPU cycles
tscale=linear # Use linear time scaling instead of oversample (lighter on CPU)
glsl-shaders-clr # Disable all GLSL shaders to reduce processing overhead
scale=bilinear # Use bilinear scaling (less demanding than Lanczos)
dscale=bilinear
cscale=bilinear
# Disable anti-ringing filters for additional performance gain:
scale-antiring=0
dscale-antiring=0
cscale-antiring=0
#########################
# 15. Default Profile
#########################
[default]
# These settings are used if no specific profile is matched.