From 35b6041c21ada257af5799ff4e9562f84f3c753e Mon Sep 17 00:00:00 2001 From: hooke007 Date: Sun, 29 Jan 2023 19:54:30 +0000 Subject: [PATCH] fix --- installer/mpv-BenchMark.conf | 77 ++++++++++--------- portable_config/scripts/input_plus.lua | 9 ++- .../scripts/uosc/elements/Controls.lua | 1 + 3 files changed, 45 insertions(+), 42 deletions(-) diff --git a/installer/mpv-BenchMark.conf b/installer/mpv-BenchMark.conf index a580048a..24cb1b1c 100644 --- a/installer/mpv-BenchMark.conf +++ b/installer/mpv-BenchMark.conf @@ -1,58 +1,59 @@ ##⇘⇘部分参数锁死勿修改 - log-file = "~~desktop/mpv-BenchMark.log" - # 在桌面生成完全的日志 - osd-msg1 = "FPS: ${estimated-display-fps}" - # OSD显示当前每秒的极限输出帧数 + log-file = "~~desktop/mpv-BenchMark.log" + # 在桌面生成完全的日志 + osd-msg1 = "FPS: ${estimated-display-fps}" + # OSD显示当前每秒的极限输出帧数 - opengl-swapinterval = 0 # {锁☒} - opengl-dwmflush = no # {锁☒} - vulkan-swap-mode = immediate # 使用 --gpu-context=winvk 时若帧数等同刷新率,尝试改为 mailbox - d3d11-sync-interval = 0 # {锁☒} - d3d11-flip = no # {锁☒} 翻转的交换效果可能钳制极限帧率 FPS_max=前后缓冲区的数量x刷新率 + opengl-swapinterval = 0 # {锁☒} + opengl-dwmflush = no # {锁☒} + vulkan-swap-mode = immediate # 使用 --gpu-context=winvk 时若帧数等同刷新率,尝试改为 mailbox + d3d11-sync-interval = 0 # {锁☒} + d3d11-flip = no # {锁☒} 翻转的交换效果可能钳制极限帧率 FPS_max=前后缓冲区的数量x刷新率 - hidpi-window-scale = no # {锁☒} 先禁用DPI缩放再指定的倍率才准确 - window-scale = 1.5 # 手动指定源缩放倍率(受 --auto-fit= 限制) - sub = no # {锁☒} - audio = no # {锁☒} - keep-open = always # {锁☒} - video-sync = display-desync # {锁☒} - interpolation = no # {锁☒} + hidpi-window-scale = no # {锁☒} 先禁用DPI缩放再指定的倍率才准确 + window-scale = 1.5 # 手动指定源缩放倍率(受 --auto-fit= 限制) + sub = no # {锁☒} + audio = no # {锁☒} + keep-open = always # {锁☒} + override-display-fps = 24 # 尽可能匹配源帧率 + video-sync = display-desync # {锁☒} + interpolation = no # {锁☒} - profile = API_1 # 选择要“激活”的profile - profile = Rendering_1 + profile = API_1 # 选择要“激活”的profile + profile = Rendering_1 [API_1] - vo = gpu # 更改此项测试不同vo的效率 - gpu-context = d3d11 # 测试不同输出后端 - hwdec = d3d11va # 更改此项测试不同解码的效率 + vo = gpu # 更改此项测试不同vo的效率 + gpu-context = d3d11 # 测试不同输出后端 + hwdec = d3d11va # 更改此项测试不同解码的效率 [API_2] - vo = gpu-next - gpu-context = winvk - hwdec = no + vo = gpu-next + gpu-context = winvk + hwdec = no [Rendering_1] - scale = sinc # 更改下三项目测试内置算法的效率 - cscale = sinc - dscale = sinc - vf = "" - # 更改此项测试视频滤镜的效率 - glsl-shaders = "" - # 更改此项测试着色器的效率 - # 因为这个文件位置不同于 mpv.conf ,所以原来的"~~/"不再指向 \portable_config\ 文件夹 https://mpv.io/manual/master/#paths - # 如果不知道这种模式下的相对路径是什么格式,建议简单粗暴的直接写绝对路径 :-) + scale = sinc # 更改下三项目测试内置算法的效率 + cscale = sinc + dscale = sinc + vf = "" + # 更改此项测试视频滤镜的效率 + glsl-shaders = "" + # 更改此项测试着色器的效率 + # 因为这个文件位置不同于 mpv.conf ,所以原来的"~~/"不再指向 \portable_config\ 文件夹 https://mpv.io/manual/master/#paths + # 如果不知道这种模式下的相对路径是什么格式,建议简单粗暴的直接写绝对路径 :-) [Rendering_2] - scale = lanczos - cscale = lanczos - dscale = lanczos - vf = "" - glsl-shaders = "" + scale = lanczos + cscale = lanczos + dscale = lanczos + vf = "" + glsl-shaders = "" diff --git a/portable_config/scripts/input_plus.lua b/portable_config/scripts/input_plus.lua index eef05147..e8bce553 100644 --- a/portable_config/scripts/input_plus.lua +++ b/portable_config/scripts/input_plus.lua @@ -157,17 +157,17 @@ function info_get() local osd_dims = mp.get_property_native("osd-dimensions") local w_s, h_s = osd_dims["w"] - osd_dims["ml"] - osd_dims["mr"], osd_dims["h"] - osd_dims["mt"] - osd_dims["mb"] local cur_name = mp.get_property_osd("media-title") or mp.get_property_osd("filename") - local vid_params = mp.get_property_native("video-dec-params") or "..." + local vid_params = mp.get_property_native("video-params") or "..." local w_raw, h_raw, pix_fmt, color_lv = vid_params["w"] or 0, vid_params["h"] or 0, vid_params["hw-pixelformat"] or vid_params["pixelformat"] or "...", vid_params["colorlevels"] or "..." local fps_o, fps_t = string.format("%0.3f", mp.get_property_number("container-fps", 0)), string.format("%0.3f", mp.get_property_number("estimated-vf-fps", 0)) local bitrateV, bitrateA = mp.get_property_number("video-bitrate", 0) / 1000, mp.get_property_number("audio-bitrate", 0) / 1000 local txt = ( - style_generic.."设置目录: ".."{\\1c&H0099FF}"..conf_dir:gsub("\\", "/").."\n".. + style_generic.."设置目录: ".."{\\fs18\\1c&H0099FF}"..conf_dir:gsub("\\", "/").."\n".. style_generic.."输出尺寸: ".."{\\1c&H0099FF}".."["..w_s.."] x ["..h_s.."]".."\n".. style_generic.."解码模式: ".."{\\1c&H0099FF}"..mp.get_property_native("hwdec-current", "...").."\n".. style_generic.."显示同步: ".."{\\1c&H0099FF}"..mp.get_property_native("video-sync", "...").."\n".. style_generic.."丢帧暂计: ".."{\\1c&H0099FF}"..mp.get_property_number("frame-drop-count", 0).."\n".. - style_generic.."当前文件: ".."{\\1c&H0099FF}"..cur_name:gsub("\\n", " "):gsub("\\$", ""):gsub("{","\\{").."\n".. + style_generic.."当前文件: ".."{\\fs18\\1c&H0099FF}"..cur_name:gsub("\\n", " "):gsub("\\$", ""):gsub("{","\\{").."\n".. style_generic.."视频 ┓".."\n".. style_generic.."- 输出: ".."{\\1c&H03A89E}"..mp.get_property_native("current-vo", "...").."\n".. style_generic.."- 编码: ".."{\\1c&H03A89E}"..mp.get_property_native("video-codec", "...").."\n".. @@ -181,7 +181,8 @@ function info_get() style_generic.."- 设备: ".."{\\1c&H9EA803}"..mp.get_property_native("audio-device", "...").."\n".. style_generic.."- 编码: ".."{\\1c&H9EA803}"..mp.get_property_native("audio-codec", "...").."\n".. style_generic.."- 码率: ".."{\\1c&H9EA803}"..bitrateA.." kbps(当前)".."\n".. - style_generic.."着色器列: ".."{\\fs18\\1c&HFF8821}"..mp.get_property_osd("glsl-shaders"):gsub(":\\", "/"):gsub(":/", "/"):gsub("\\", "/"):gsub(";", " "):gsub(",", " "):gsub(":", " ") + style_generic.."着色器列: ".."{\\fs18\\1c&HFF8821}"..mp.get_property_osd("glsl-shaders"):gsub(":\\", "/"):gsub(":/", "/"):gsub("\\", "/"):gsub(";", " "):gsub(",", " "):gsub(":", " ").."\n".. + style_generic.."视频滤镜: ".."{\\fs18\\1c&HFF8821}"..mp.get_property_osd("vf"):gsub("%(empty%)", ""):gsub(" %[", "%["):gsub("%]\n", "%] "):gsub(" %(disabled%)", "(禁用)") ) return tostring(txt) end diff --git a/portable_config/scripts/uosc/elements/Controls.lua b/portable_config/scripts/uosc/elements/Controls.lua index 478871f7..f6df06fe 100644 --- a/portable_config/scripts/uosc/elements/Controls.lua +++ b/portable_config/scripts/uosc/elements/Controls.lua @@ -24,6 +24,7 @@ function Controls:init() menu = 'command:menu:script-binding uosc/menu-blurred?菜单', ['script-stats'] = 'command:info_outline:script-binding stats/display-stats-toggle?统计数据', ['play_pause'] = 'cycle:not_started:pause:no=play_circle/yes=pause_circle?播放/暂停', + ['pause_play'] = 'cycle:not_started:pause:no=pause_circle/yes=play_circle?播放/暂停', subtitles = 'command:subtitles:script-binding uosc/subtitles#sub>0?字幕轨', audio = 'command:graphic_eq:script-binding uosc/audio#audio>1?音频轨', ['audio-device'] = 'command:speaker:script-binding uosc/audio-device?音频设备',