Skip to content

Commit

Permalink
mpv-lazy-20240102
Browse files Browse the repository at this point in the history
  • Loading branch information
hooke007 committed Jan 2, 2024
1 parent 054faa9 commit d412383
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 48 deletions.
43 changes: 28 additions & 15 deletions portable_config/input_uosc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,40 @@
} no-osd add speed 0.1 ; script-message-to uosc flash-elements speed #! 播放 > 切换 速度 +0.1
- no-osd add volume -1 ; script-message-to uosc flash-elements volume #! 播放 > 音量 -
= no-osd add volume 1 ; script-message-to uosc flash-elements volume #! 播放 > 音量 +
# #! 播放 > ---
c add audio-delay -0.1 #! 播放 > 音频预载 100ms
v add audio-delay 0.1 #! 播放 > 音频延迟 100ms
z add sub-delay -0.1 #! 播放 > 字幕预载 100ms
x add sub-delay +0.1 #! 播放 > 字幕延迟 100ms
# #! 播放 > ---
Shift+BS set audio-delay 0 ; set sub-delay 0 #! 播放 > 重置 音频与字幕同步

# #! ---
~ vf clr "" #! VF 滤镜 > 清空
! 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/SR_ESRGAN_DML.vpy" #! VF 滤镜 > 预设 超分-ESRGAN_DX12 (vsLite/Mega)
^ vf set vapoursynth="~~/vs/SR_ESRGAN_NV.vpy" #! VF 滤镜 > 预设 超分-ESRGAN_RTX (vsMega)
# #! VF 滤镜 > ---
! 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 滤镜 > ---
% 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)

Ctrl+` change-list glsl-shaders clr "" #! 着色器 > 清空
Ctrl+1 change-list glsl-shaders toggle "~~/shaders/KrigBilateral.glsl" #! 着色器 > 开关 Krig
Ctrl+2 change-list glsl-shaders toggle "~~/shaders/AMD_FSR_EASU_rgb.glsl" #! 着色器 > 开关 FSR_EASU_后 (*)
Ctrl+3 change-list glsl-shaders toggle "~~/shaders/Anime4K_Restore_CNN_L.glsl" #! 着色器 > 开关 A4K_重建_CNN_L
Ctrl+4 change-list glsl-shaders toggle "~~/shaders/Anime4K_Upscale_GAN_x2_M.glsl" #! 着色器 > 开关 A4K_放大_GAN_M
Ctrl+5 change-list glsl-shaders toggle "~~/shaders/adaptive_sharpen.glsl" #! 着色器 > 开关 自适应锐化_后
Ctrl+6 change-list glsl-shaders toggle "~~/shaders/nnedi3_nns128_win8x4.glsl" #! 着色器 > 开关 nneid3_128_8x4
Ctrl+7 change-list glsl-shaders toggle "~~/shaders/FSRCNNX_x2_16_0_4_1.glsl" #! 着色器 > 开关 FSRCNNX_16
Ctrl+` change-list glsl-shaders clr "" #! 着色器 > 清空
# #! 着色器 > ---
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+3 change-list glsl-shaders toggle "~~/shaders/FSRCNNX_x2_16_0_4_1.glsl" #! 着色器 > 开关 LUMA: FSRCNNX
# #! 着色器 > ---
Ctrl+4 change-list glsl-shaders toggle "~~/shaders/CfL_Prediction.glsl" #! 着色器 > 开关 CHROMA: CFL
# #! 着色器 > ---
Ctrl+5 change-list glsl-shaders toggle "~~/shaders/AMD_FSR_EASU_rgb.glsl" #! 着色器 > 开关 MAIN: FSR_EASU (*)
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+8 change-list glsl-shaders toggle "~~/shaders/adaptive_sharpen.glsl" #! 着色器 > 开关 OUTPUT: 自适应锐化

# #! ---
Ctrl+s script-binding uosc/shot #! ※ 截屏

# cycle-values hwdec "auto" "auto-copy" "no" #! 视频 > 切换 解码模式
Expand All @@ -62,9 +73,10 @@
8 add saturation 1 #! 视频 > 均衡器 > 饱和度/纯度 +
9 add hue -1 #! 视频 > 均衡器 > 色相 -
0 add hue 1 #! 视频 > 均衡器 > 色相 +
# #! 视频 > 均衡器 > ---
Ctrl+BS set contrast 0 ; set brightness 0 ; set gamma 0 ; set saturation 0 ; set hue 0 #! 视频 > 均衡器 > 重置 全部

# script-binding uosc/keybinds #! 工具 > ※ 按键绑定列表
Ctrl+i script-binding uosc/keybinds #! 工具 > ※ 按键绑定列表
I script-binding display-stats-toggle #! 工具 > 常驻显示统计信息
` script-binding console/enable #! 工具 > 显示控制台
Ctrl+r script-message-to save_global_props clean_data #! 工具 > 清除已记录的属性值
Expand All @@ -75,6 +87,7 @@
# script-binding uosc/show-in-directory #! 工具 > ※ 打开 当前文件所在路径
# script-binding uosc/open-config-directory #! 工具 > ※ 打开 设置目录

# #! ---
# stop #! 停止
Ctrl+q quit #! 退出mpv

Expand Down
18 changes: 11 additions & 7 deletions portable_config/mpv.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 基础 #
########

#vo = gpu-next
vo = gpu-next
#gpu-context = winvk
#d3d11-exclusive-fs = yes
#d3d11-flip = no
Expand All @@ -33,19 +33,22 @@
input-builtin-bindings = no
#pause = yes

#target-colorspace-hint = yes

hr-seek-framedrop = no
save-position-on-quit = yes
watch-later-options = start,vid,aid,sid

keep-open = yes
#ontop = yes
#border = no
#title-bar = no
autofit-smaller = 50%x50%
keepaspect-window = no
#auto-window-resize = no
hidpi-window-scale = no

demuxer-max-bytes = 1024MiB
demuxer-max-back-bytes = 512MiB
#icc-cache = no
icc-cache-dir = "~~/_cache/icc"
#gpu-shader-cache = no
Expand Down Expand Up @@ -83,7 +86,7 @@
volume = 100 # 注意:此参数当前在 script-opts.conf 文件中存在关联处理(参见 “保存全局属性并恢复” 部分)
volume-max = 130
audio-channels = stereo
alang = chs,sc,zh,chi,zho
#alang = chs,sc,zh-cn,chi,zh,zh-tw,cht,zho,ze
audio-file-auto = fuzzy


Expand All @@ -99,7 +102,7 @@
video-sync = display-resample
video-sync-max-video-change = 5
interpolation = yes
#tscale = mitchell
#tscale = sphinx

cscale = bilinear
scale = spline36
Expand All @@ -112,7 +115,8 @@
#deband = yes

#tone-mapping = hable
gamut-mapping-mode = clip
#gamut-mapping-mode = clip
hdr-peak-percentile = 99.99


####################
Expand All @@ -133,9 +137,9 @@

sub-auto = fuzzy
sub-file-paths = sub;subtitles
slang = chs,sc,zh,chi,zho
slang = chs,sc,zh-cn,chi,zh,zh-tw,cht,zho,ze
subs-fallback = yes
#blend-subtitles = video
#blend-subtitles = yes

sub-font = "LXGW WenKai Mono"
sub-font-size = 44
Expand Down
16 changes: 4 additions & 12 deletions portable_config/profiles.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

[ontop_playback]
profile-desc = 基于播放状态的自动置顶
#profile-cond = not pause
#profile-cond = not pause # 未自动启用
profile-restore = copy
ontop = yes


## https://github.com/mpv-player/mpv/issues/11122
[vsync_auto]
profile-desc = 基于刷新率或帧率的同步模式
profile-cond = p.display_fps>122 or p.container_fps>32
profile-desc = 基于帧率或垂直同步率的自动视频同步
profile-cond = p.container_fps>32 or (p.display_fps/container_fps) > 3.2
profile-restore = copy
interpolation = no
video-sync = audio
Expand All @@ -35,7 +35,7 @@

[save_props_auto]
profile-desc = 基于进度或时长或视频轨类型的自动保存属性
profile-cond = p.eof_reached or p.time_remaining<=300 or p.duration<=300 or not vid or p["current-tracks/video/albumart"] or p["current-tracks/video/image"]
profile-cond = p.percent_pos>=90 or p.duration<=300 or not vid or p["current-tracks/video/albumart"] or p["current-tracks/video/image"]
profile-restore = copy
save-position-on-quit = no

Expand All @@ -52,11 +52,3 @@
#sub-shadow-offset = 0


[HDR_DolbyVision]
profile-desc = hdr杜比视界
profile-cond = filename:match("%.DoVi")
profile-restore = copy
vo = gpu-next
hdr-compute-peak = no
tone-mapping = st2094-40

29 changes: 15 additions & 14 deletions portable_config/script-opts.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
##########

script-opts-append = console-scale=1.5
#script-opts-append = console-font=Ubuntu Mono
#script-opts-append = console-font=LXGW WenKai Mono
#script-opts-append = console-font_size=24


Expand All @@ -31,12 +31,10 @@
#script-opts-append = ytdl_hook-exclude="%.avi$|%.flv$|%.m3u$|%.m3u8$|%.m4v$|%.mkv$|%.mp4$|%.ts$|%.VOB$|%.webm$|%.wmv$"
#script-opts-append = ytdl_hook-use_manifests=yes

#script-opts-append = ytdl_hook-ytdl_path=youtube-dl


######################
# 保存全局属性并恢复 #
######################
####################
# 全局属性保存恢复 #
####################

#script-opts-append = save_global_props-save_mode=0
script-opts-append = save_global_props-props=volume,glsl-shaders
Expand All @@ -47,15 +45,16 @@
# 新缩略图引擎 #
################

#script-opts-append = thumbfast-max_height=400
#script-opts-append = thumbfast-max_width=400
#script-opts-append = thumbfast-max_height=270
#script-opts-append = thumbfast-max_width=270

#script-opts-append = thumbfast-precise=1
#script-opts-append = thumbfast-quality=2
#script-opts-append = thumbfast-sw_threads=1
#script-opts-append = thumbfast-hwdec=no
#script-opts-append = thumbfast-network=yes
#script-opts-append = thumbfast-hwdec=no

#script-opts-append = thumbfast-sw_threads=1
script-opts-append = thumbfast-min_duration=30
#script-opts-append = thumbfast-precise=1
#script-opts-append = thumbfast-quality=2


##################
Expand All @@ -69,8 +68,7 @@
#script-opts-append = uosc-autoload=yes
#script-opts-append = uosc-autoload_types=video,audio

#script-opts-append = uosc-ui_scale=2
#script-opts-append = uosc-click_threshold=1000
#script-opts-append = uosc-scale=2

script-opts-append = uosc-video_types=avi,flv,m2ts,m4v,mkv,mov,mp4,mpeg,mpg,ogv,rm,rmvb,ts,vob,webm,wmv
script-opts-append = uosc-audio_types=aac,ac3,ape,dsf,dts,flac,m4a,mka,mp3,ogg,opus,wav,wma,wv
Expand All @@ -79,4 +77,7 @@

#script-opts-append = uosc-default_directory=D:\Videos

script-opts-append = uosc-languages=slang

script-opts-append = uosc-idlemsg=mpv-lazy
#script-opts-append = uosc-custom_font=LXGW WenKai Mono
File renamed without changes.
Empty file.
Empty file.
File renamed without changes.

0 comments on commit d412383

Please sign in to comment.