我的mpv配置

689 字
3 分钟
我的mpv配置

以下下是我的mpv配置,参考了mpv-lazy和mpv-config的配置,并添加了一些自己的习惯。

### 行首如果存在注释符号 "#" 则说明该项 “未启用”
### 文档: https://github.com/hooke007/MPV_lazy/blob/main/portable_config/mpv.conf
### 注意:当前预设下,选项 --volume --glsl-shaders 的关联属性已被全局追踪记录,移除缓存文件 saved-props.json 才能使其的更改生效
##################
# 0. 基础与初始化 #
##################
input-conf = "~~/input_uosc.conf"
include = "~~/profiles.conf"
#include = "~~/script-opts.conf"
#use-filedir-conf = yes
#log-file = "~~desktop/mpv-lazy.log"
##################
# 1. 视频输出与硬件 #
##################
vo = gpu-next
gpu-context = waylandvk
gpu-api = vulkan
vulkan-async-transfer = yes
vulkan-async-compute = yes
#d3d11-exclusive-fs = yes
#d3d11-flip = yes
hwdec = vulkan,nvdec,no
hwdec-codecs = h264,hevc,vp8,vp9,av1
#d3d11-adapter = "NVIDIA GeForce RTX 2070 Super"
#vulkan-device = "NVIDIA GeForce RTX 2070 Super"
##################
# 2. 播放行为与窗口 #
##################
title = ${?pause==yes:⏸}${?mute==yes:🔇}${?ontop==yes:📌}${?demuxer-via-network==yes:${media-title}}${?demuxer-via-network==no:${filename}}
idle = yes
input-ime = no
#input-ipc-server = mpvpipe
input-builtin-bindings = no
#pause = yes
hr-seek-framedrop = no
save-position-on-quit = yes
watch-later-options = start,vid,aid,sid
#autocreate-playlist = same
directory-mode = ignore
#directory-filter-types = video,audio
#video-exts = avi,flv,m2ts,mkv,mov,mp4,ts,wmv
#image-exts = avif,bmp,jpeg,jpg,jxl,png,webp
#audio-exts = aiff,ape,flac,mp3,ogg,opus,wav
keep-open = yes
#ontop = yes
#title-bar = no
autofit-smaller = 50%x50%
#autofit-larger = 70%x70%
keepaspect-window = yes
#auto-window-resize = no
hidpi-window-scale = no
##################
# 3. 缓存与性能 #
##################
demuxer-max-bytes = 512MiB
demuxer-max-back-bytes = 256MiB
vd-lavc-dr = yes
#icc-cache = no
icc-cache-dir = "~~/_cache/icc"
#gpu-shader-cache = no
gpu-shader-cache-dir = "~~/_cache/shader"
watch-later-dir = "~~/_cache/watch_later"
##################
# 4. OSD 界面显示 #
##################
#osd-bar=no
border = no
osd-on-seek = msg
#osd-blur = 1
osd-bar-w = 100
osd-bar-h = 1
osd-bar-align-y = -1
osd-font = "Noto Sans Mono Medium"
osd-font-size = 24
#osd-color = "#672168"
#osd-outline-color = "#EEEEEE"
osd-outline-size = 0.8
osd-fractions = yes
osd-playing-msg = "${filename}"
osd-duration = 2000
osd-playing-msg-duration = 3000
osd-status-msg = ${playback-time/full} / ${duration/full} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count}
##################
# 5. 音频设置 #
##################
ao = pipewire
#audio-device = "wasapi/{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"
#audio-exclusive = yes
#audio-spdif = ac3,dts
volume = 80
volume-max = 130
audio-channels = stereo
alang = jpn,eng,chs,sc,zh-cn,chi,zh,zh-tw,cht,zho,ze
audio-file-auto = fuzzy
##################
# 6. 视频画质与同步 #
##################
video-sync = display-resample
#video-sync-max-video-change = 5
interpolation = yes
tscale = oversample
# ===== 色彩管理 =====
icc-profile-auto = no
target-colorspace-hint = yes
#target-prim = display-p3
#target-trc = gamma2.2
# ===== 缩放算法 =====
cscale = spline36
scale = spline36
dscale = mitchell
scale-antiring = 0.5
sigmoid-upscaling = yes
correct-downscaling = no
# ===== 后处理 =====
dither-depth = no
#deband = yes
deinterlace = auto
# ===== HDR 相关 =====
tone-mapping = hable
#gamut-mapping-mode = clip
hdr-peak-percentile = 99.99
##################
# 7. 脚本、滤镜与着色器 #
##################
vf-append = format=gamma=gamma2.2
#load-stats-overlay = no
osc = no
ytdl-raw-options-append = cookies-from-browser=chrome
ytdl-raw-options-append = sub-langs=-danmaku
#load-scripts = no
#glsl-shaders-append = "~~/shaders/AMD_FSR_EASU_rgb_RT.glsl"
##################
# 8. 字幕设置 #
##################
# ===== 基础设置 =====
sub-auto = fuzzy
sub-file-paths = sub;subtitles
sub-codepage = GB18030
slang = chs,sc,zh-cn,chi,zh,zh-tw,cht,zho,ze
subs-fallback = yes
# ===== 字体与渲染 =====
sub-font = "Noto Sans CJK SC Regular"
sub-font-size = 45
#sub-scale-with-window = no
sub-scale-signs = yes
sub-outline-size = 2
sub-outline-color = "#5d93b7"
sub-blur = 0
sub-color = "#ffffffff"
#sub-back-color = "#FFBF00"
#sub-shadow-offset = 2
sub-use-margins = yes
# ===== ASS 样式覆盖 =====
sub-ass-override = no
sub-ass-style-overrides = Fontname="Noto Sans CJK SC Regular",Alignment=2,Fontsize=45,LineSpacing=0.8,Outline=1.2,Shadow=1,PrimaryColor=&H00FFFFFF&,SecondaryColor=&H000000FF&,OutlineColor=&H000D0E73&,BackColor=&H000D0E73&
# ===== 高级选项与图形字幕 =====
sub-ass-force-margins = yes
#sub-ass-video-aspect-override = 16:9
#stretch-image-subs-to-screen = yes
#image-subs-video-resolution = yes
#image-subs-hdr-peak = sdr
# ===== 图形字幕部分 —— IDX SUB SUP =====
stretch-image-subs-to-screen = no
image-subs-video-resolution = no
##################
# 9. 截图设置 #
##################
screenshot-template = '~/Pictures/mpv/%tY-%tm-%td_%tH-%tM-%tS'
screenshot-format = webp
screenshot-png-compression = 8
screenshot-png-filter = 5
screenshot-webp-lossless = yes
screenshot-webp-compression = 6
screenshot-high-bit-depth = yes
screenshot-jpeg-quality = 100
screenshot-jpeg-source-chroma = yes
screenshot-jxl-distance = 0 # 0 代表数学无损
screenshot-jxl-effort = 9 # 1-9,9最高
screenshot-tag-colorspace = yes

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

我的mpv配置
https://zno233.github.io/posts/mpv/mpv配置/
作者
一杯清风不加糖
发布于
2025-11-01
许可协议
CC BY-NC-SA 4.0
Profile Image of the Author
一杯清风不加糖
天上地下,惟我独尊,舍我之外,皆为外物.
公告
欢迎来到我的博客!这是一则示例公告。
音乐
封面

音乐

暂未播放

0:00 0:00
暂无歌词
分类
标签
站点统计
文章
14
分类
7
标签
25
总字数
18,773
运行时长
0
最后活动
0 天前

文章目录