A modern, highly customizable smooth zoom script for MPV.
现代化的高度自定义的 MPV 平滑缩放脚本。
- Zoom in (with animation): CTRL + WHEEL_UP
动画缩放放大 - Zoom out (with animation): CTRL + WHEEL_DOWN
动画缩放缩小 - Reset zoom: MBTN_MID
重置缩放(默认鼠标中键) - Drag to pan: CTRL + LEFT
拖动平移
配置文件路径:
~~/script-opts/mpv-zoom.conf
# === Key bindings 键位绑定 ===
zoom_in_animation_key=ctrl+WHEEL_UP,
zoom_out_animation_key=ctrl+WHEEL_DOWN,
zoom_in_key="",
zoom_out_key="",
zoom_reset_key=MBTN_MID,
drag_key=ctrl+MBTN_LEFT,
drag_fullscreen_key="",
# === Zoom scaling 缩放比例 ===
# actual zoom scale = 2 ^ scale
zoom_in_scale=0.1,
zoom_out_scale=-0.1,
# === Animation 动画参数 ===
# default = zoom_scale * 3
zoom_in_animation_duration=0.3,
zoom_out_animation_duration=0.3,
# Zoom animation easing type / 缩放动画缓动类型
# linear, ease-in, ease-out, ease-in-out
zoom_in_animation_type=ease-out,
zoom_out_animation_type=ease-out,
# === Animation join behavior 动画衔接方式 ===
# Available types:
# c = truncation 截断
# l = linear 线性
# s = smooth 平滑
# vk = velocity-keep 保持速度
# cr = curve-remap 曲线重映射
# cs = curve-splicing 曲线拼接
#
# 综合效果排序(推荐程度): cs > vk > cr > l > s > c
animation_join_type=cs,
# === Restrict scope 缩放范围限制 ===
# 0.0–1.0 means ratio of current video width/height
# or specify pixel values
restrict_scope_left=0.3,
restrict_scope_right=0.3,
restrict_scope_top=0.3,
restrict_scope_bottom=0.3,
# === Zoom limits 缩放边界 ===
max_zoom_scale=4,
# Default -2 means 4× smaller than the original
min_zoom_scale=-2,
# === Advanced (not recommended to change) ===
# 以下选项不建议修改
# Smooth join mix ratio 平滑衔接的最大混合比例
join_config_mix_ratio=0.3
# Velocity-keep mode duration ratio
# 速度保持衔接模式的时长混合比例
join_config_ratio=0.25
# Curve splicing mode transition ratio
# 曲线衔接模式的过渡段比例
join_comfig_splicing_ratio=0.3
