From b6b10a53fe86297ed0eef555172331b24bedcd08 Mon Sep 17 00:00:00 2001 From: hooke007 Date: Fri, 23 Aug 2024 20:39:30 +0800 Subject: [PATCH] mpv-lazy-20240824 --- portable_config/input_contextmenu_plus.conf | 30 +++++++++++ portable_config/input_uosc.conf | 50 +++++++++---------- portable_config/mpv.conf | 6 +++ portable_config/profiles.conf | 12 +++-- portable_config/script-opts.conf | 10 ++++ .../contextmenu_plus.lua} | 0 .../shaders/Ani4Kv2_ArtCNN_C4F32_i2.glsl | 0 .../shaders/AniSD_ArtCNN_C4F32_i4.glsl | 0 portable_config/shaders/CuNNy_4x16.glsl | 0 9 files changed, 80 insertions(+), 28 deletions(-) create mode 100644 portable_config/input_contextmenu_plus.conf rename portable_config/{shaders/ravu_zoom_r2.glsl => scripts/contextmenu_plus.lua} (100%) create mode 100644 portable_config/shaders/Ani4Kv2_ArtCNN_C4F32_i2.glsl create mode 100644 portable_config/shaders/AniSD_ArtCNN_C4F32_i4.glsl create mode 100644 portable_config/shaders/CuNNy_4x16.glsl diff --git a/portable_config/input_contextmenu_plus.conf b/portable_config/input_contextmenu_plus.conf new file mode 100644 index 00000000..ead2d617 --- /dev/null +++ b/portable_config/input_contextmenu_plus.conf @@ -0,0 +1,30 @@ + +# script-binding uosc/menu #! ※ 显示uosc菜单 +# ignore #! ⇲ 轨道列表(聚合) > #@tracks +# ignore #! ⇲ 播放列表 > #@playlist +# playlist-shuffle #! 导航 > 播放列表乱序重排 +# ignore #! 导航 > ⇲ 版本列表 > #@editions +# ignore #! 导航 > ⇲ 章节列表 > #@chapters +# ignore #! 导航 > ⇲ 视频轨列表 > #@tracks/video +# ignore #! 导航 > ⇲ 音频轨列表 > #@tracks/audio +# ignore #! 导航 > ⇲ 字幕轨列表 > #@tracks/sub +# ignore #! 导航 > ⇲ 次字幕轨列表 > #@tracks/sub-secondary + +# screenshot video #! 截屏 +# screenshot window #! 截屏(窗口) + +# cycle-values hwdec "auto" "auto-copy" "no" #! 视频 > 切换 解码模式 +# cycle deband #! 视频 > 切换 去色带状态 +# cycle deinterlace #! 视频 > 切换 去隔行状态 +# cycle icc-profile-auto #! 视频 > 切换 自动校色 +# cycle correct-pts #! 视频 > 切换 时间码解析模式 + +# script-binding display-stats-toggle #! 工具 > 常驻显示统计信息 +# script-binding console/enable #! 工具 > 显示控制台 +# script-message-to save_global_props clean_data #! 工具 > 清除已记录的属性值 +# cycle border #! 工具 > 切换 窗口边框 +# cycle ontop #! 工具 > 切换 窗口置顶 +# ignore #! 工具 > ⇲ 音频输出设备列表 > #@audio-devices + +# stop #! 停止 +# quit #! 退出mpv diff --git a/portable_config/input_uosc.conf b/portable_config/input_uosc.conf index 89c4e1f5..c3513764 100644 --- a/portable_config/input_uosc.conf +++ b/portable_config/input_uosc.conf @@ -36,24 +36,25 @@ ! vf set vapoursynth="~~/vs/MEMC_MVT_LQ.vpy" #! VF 滤镜 > 预设 补帧 MVTools_快速 @ vf set vapoursynth="~~/vs/MEMC_MVT_STD.vpy" #! VF 滤镜 > 预设 补帧 MVTools_标准 SHARP vf set vapoursynth="~~/vs/MEMC_RIFE_STD.vpy" #! VF 滤镜 > 预设 补帧 RIFE_标准 - $ vf set vapoursynth="~~/vs/MEMC_RIFE_NV.vpy" #! VF 滤镜 > 预设 补帧 RIFE_RTX (vsMega) + $ vf set vapoursynth="~~/vs/MEMC_RIFE_NV.vpy" #! VF 滤镜 > 预设 补帧 RIFE_RTX (DLC-vsNV) # ignore #! VF 滤镜 > --- - % vf set vapoursynth="~~/vs/SR_ESRGAN_DML.vpy" #! VF 滤镜 > 预设 超分 ESRGAN_DX12 (vsLite/Mega) - ^ vf set vapoursynth="~~/vs/SR_ESRGAN_NV.vpy" #! VF 滤镜 > 预设 超分 ESRGAN_RTX (vsMega) + % vf set vapoursynth="~~/vs/SR_ESRGAN_DML.vpy" #! VF 滤镜 > 预设 超分 ESRGAN_DX12 (DLC-vsAMD/vsNV) + ^ vf set vapoursynth="~~/vs/SR_ESRGAN_NV.vpy" #! VF 滤镜 > 预设 超分 ESRGAN_RTX (DLC-vsNV) Ctrl+` change-list glsl-shaders clr "" #! 着色器 > 清空 # ignore #! 着色器 > --- - Ctrl+1 change-list glsl-shaders toggle "~~/shaders/nnedi3_nns128_win8x4.glsl" #! 着色器 > 开关 LUMA: NNEDI3 - Ctrl+2 change-list glsl-shaders toggle "~~/shaders/ravu_zoom_r2.glsl" #! 着色器 > 开关 LUMA: RAVU + Ctrl+1 change-list glsl-shaders toggle "~~/shaders/Ani4Kv2_ArtCNN_C4F32_i2.glsl" #! 着色器 > 开关 LUMA: Ani4Kv2 + Ctrl+2 change-list glsl-shaders toggle "~~/shaders/AniSD_ArtCNN_C4F32_i4.glsl" #! 着色器 > 开关 LUMA: AniSD Ctrl+3 change-list glsl-shaders toggle "~~/shaders/FSRCNNX_x2_16_0_4_1.glsl" #! 着色器 > 开关 LUMA: FSRCNNX + Ctrl+4 change-list glsl-shaders toggle "~~/shaders/nnedi3_nns128_win8x4.glsl" #! 着色器 > 开关 LUMA: NNEDI3 # ignore #! 着色器 > --- - Ctrl+4 change-list glsl-shaders toggle "~~/shaders/CfL_Prediction.glsl" #! 着色器 > 开关 CHROMA: CFL + Ctrl+5 change-list glsl-shaders toggle "~~/shaders/CfL_Prediction.glsl" #! 着色器 > 开关 CHROMA: CFL # ignore #! 着色器 > --- - Ctrl+5 change-list glsl-shaders toggle "~~/shaders/AMD_FSR_EASU_rgb_RT.glsl" #! 着色器 > 开关 MAIN: FSR_EASU RT (*) - Ctrl+6 change-list glsl-shaders toggle "~~/shaders/Anime4K_Restore_CNN_L.glsl" #! 着色器 > 开关 MAIN: A4K_重建 - Ctrl+7 change-list glsl-shaders toggle "~~/shaders/Anime4K_Upscale_GAN_x2_M.glsl" #! 着色器 > 开关 MAIN: A4K_放大 + Ctrl+6 change-list glsl-shaders toggle "~~/shaders/AMD_FSR_EASU_rgb_RT.glsl" #! 着色器 > 开关 MAIN: FSR_EASU RT (*) + Ctrl+7 change-list glsl-shaders toggle "~~/shaders/Anime4K_Restore_CNN_L.glsl" #! 着色器 > 开关 MAIN: A4K_重建 + Ctrl+8 change-list glsl-shaders toggle "~~/shaders/Anime4K_Upscale_GAN_x2_M.glsl" #! 着色器 > 开关 MAIN: A4K_放大 # ignore #! 着色器 > --- - Ctrl+8 change-list glsl-shaders toggle "~~/shaders/adaptive_sharpen_RT.glsl" #! 着色器 > 开关 OUTPUT: 自适应锐化 RT + Ctrl+9 change-list glsl-shaders toggle "~~/shaders/adaptive_sharpen_RT.glsl" #! 着色器 > 开关 OUTPUT: 自适应锐化 RT # ignore #! --- Ctrl+s script-binding uosc/shot #! ※ 截屏 @@ -99,17 +100,18 @@ PAUSE set pause yes PLAYPAUSE cycle pause STOP stop - REWIND seek -30 - FORWARD seek 30 - PREV playlist-prev - NEXT playlist-next + REWIND seek -30 ; script-message-to uosc flash-elements timeline + FORWARD seek 30 ; script-message-to uosc flash-elements timeline + PREV script-binding uosc/prev + NEXT script-binding uosc/next - MBTN_BACK playlist-prev - MBTN_FORWARD playlist-next + MBTN_BACK script-binding uosc/prev + MBTN_FORWARD script-binding uosc/next MBTN_LEFT ignore MBTN_LEFT_DBL cycle fullscreen MBTN_MID script-binding uosc/menu - MBTN_RIGHT context-menu + MBTN_RIGHT script-binding uosc/menu + Ctrl+MBTN_RIGHT context-menu MBTN_RIGHT_DBL ignore #WHEEL_DOWN no-osd add volume -1 ; script-message-to uosc flash-elements volume @@ -119,11 +121,9 @@ ENTER set fullscreen yes Alt+ENTER cycle fullscreen SPACE cycle pause - UP set pause yes ; seek -1 exact - DOWN set pause yes ; seek 1 exact - LEFT seek -5 - RIGHT seek 5 - Ctrl+UP playlist-prev - Ctrl+DOWN playlist-next - Ctrl+Alt+UP script-binding uosc/prev - Ctrl+Alt+DOWN script-binding uosc/next + UP set pause yes ; seek -1 exact ; script-message-to uosc flash-elements timeline + DOWN set pause yes ; seek 1 exact ; script-message-to uosc flash-elements timeline + LEFT seek -5 ; script-message-to uosc flash-elements timeline + RIGHT seek 5 ; script-message-to uosc flash-elements timeline + Ctrl+UP script-binding uosc/prev + Ctrl+DOWN script-binding uosc/next diff --git a/portable_config/mpv.conf b/portable_config/mpv.conf index 82ded6fd..a16ea4af 100644 --- a/portable_config/mpv.conf +++ b/portable_config/mpv.conf @@ -39,6 +39,12 @@ save-position-on-quit = yes watch-later-options = start,vid,aid,sid +#autocreate-playlist = same +#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 diff --git a/portable_config/profiles.conf b/portable_config/profiles.conf index 45618595..90f05a62 100644 --- a/portable_config/profiles.conf +++ b/portable_config/profiles.conf @@ -4,12 +4,18 @@ # 配置预设组 # ############## -[speed_limit] +[speed_limit1] profile-desc = 速度变化下限的控制 profile-cond = p.speed<0.1 speed = 0.1 +[speed_limit2] + profile-desc = 速度变化上限的控制 + profile-cond = p.speed>8 + speed = 8 + + [ontop_playback] profile-desc = 基于播放状态的自动置顶 #profile-cond = not pause # 未自动启用 @@ -19,8 +25,8 @@ ## https://github.com/mpv-player/mpv/issues/11122 [vsync_auto] - profile-desc = 基于帧率或垂直同步率的自动视频同步 - profile-cond = p.container_fps>32 or (p.display_fps/container_fps) > 3.2 + profile-desc = 基于帧率或垂直同步率或速率的自动视频同步 + profile-cond = p.container_fps>32 or (p.display_fps/p.container_fps)>3.2 or p.speed>1 profile-restore = copy interpolation = no video-sync = audio diff --git a/portable_config/script-opts.conf b/portable_config/script-opts.conf index 4b3319c4..06d2b337 100644 --- a/portable_config/script-opts.conf +++ b/portable_config/script-opts.conf @@ -32,6 +32,16 @@ #script-opts-append = ytdl_hook-use_manifests=yes +###################### +# 上下文菜单构建辅助 # +###################### + + script-opts-append = contextmenu_plus-input_conf=~~/input_contextmenu_plus.conf + script-opts-append = contextmenu_plus-uosc_alt=yes +#script-opts-append = contextmenu_plus-max_title_length=80 +#script-opts-append = contextmenu_plus-max_playlist_items=30 + + #################### # 全局属性保存恢复 # #################### diff --git a/portable_config/shaders/ravu_zoom_r2.glsl b/portable_config/scripts/contextmenu_plus.lua similarity index 100% rename from portable_config/shaders/ravu_zoom_r2.glsl rename to portable_config/scripts/contextmenu_plus.lua diff --git a/portable_config/shaders/Ani4Kv2_ArtCNN_C4F32_i2.glsl b/portable_config/shaders/Ani4Kv2_ArtCNN_C4F32_i2.glsl new file mode 100644 index 00000000..e69de29b diff --git a/portable_config/shaders/AniSD_ArtCNN_C4F32_i4.glsl b/portable_config/shaders/AniSD_ArtCNN_C4F32_i4.glsl new file mode 100644 index 00000000..e69de29b diff --git a/portable_config/shaders/CuNNy_4x16.glsl b/portable_config/shaders/CuNNy_4x16.glsl new file mode 100644 index 00000000..e69de29b