Important
此教程已过时,限定仅适用于 Python 3.8-3.11 & VapourSynth R57-R65
Note
最新的vs由于更改了安装方式不够“真”便携
推荐从此处下载 快速部署包(且附带pip) 解压到mpv目录即可 https://github.com/hooke007/dotfiles/releases/tag/mpv_addones
编译或下载主要文件
--[[ | |
SOURCE_ https://github.com/wiiaboo/mpv-scripts/blob/master/audio-balance.lua | |
COMMIT_ 20220811 03cfc0e39682a73d9d24a6e01a3c02716a019d1d | |
声道平衡 | |
立体声使用的是仅削弱单边的逻辑,但多声道仍沿用了原设计(存在问题)中的混合思路 | |
示例在 input.conf 中写入 : | |
Ctrl+A script-binding audio_balance/bal2l # 平衡偏左(步进1%,按住可持续触发) |
--[[ | |
依赖的前置脚本: https://github.com/hooke007/MPV_lazy/tree/main/portable_config/scripts/uosc | |
用于: | |
实时简易快速切换 --cscale --scale --dscale --tscale 的各值 | |
快速预览各用户着色器(仅解析 `~~/shaders/` 目录) | |
input.conf 示例: |
--[[ | |
-- 旧实现和 https://github.com/mpv-player/mpv/issues/11541 的问题一致 | |
function check_achannels() | |
local channel_count = mp.get_property_number("audio-params/channel-count") | |
if channel_count and channel_count > 2 then | |
mp.commandv("af", "pre", "@vocal:loudnorm") | |
else | |
mp.commandv("af", "remove", "@vocal") | |
end |
###匹配版本 https://github.com/mpv-player/mpv/blob/828dd65ef84b4d8e95e70752b9eb0833909d1d23/TOOLS/lua/autoload.lua | |
###不支持参数后注释,须另起一行 | |
##是否禁用所有自动加载相关功能,默认:no | |
#disabled=yes | |
##是否自动加载当前目录(不含子目录)所有图片(视频、音频)到播放列表,默认:yes | |
images=no | |
#videos=no | |
audio=no |
-- 能用但没必要 | |
-- 快捷键需要重映射 | |
-- 脚本选项可能需要重映射(或者选择修改脚本) | |
require("mp.options") | |
local opts = { | |
UI = "", | |
} |
### 使用nnedi3算法进行两倍放大 | |
### 追求速度应使用着色器版本,例如 ../shaders/nnedi3-nns128-win8x4.glsl | |
### 依赖列表: | |
### https://github.com/EleonoreMizo/fmtconv/releases/tag/r30 | |
### https://github.com/dubhater/vapoursynth-nnedi3/releases/tag/v12 | |
### https://github.com/sekrit-twc/znedi3/releases/tag/r2.1 | |
### https://github.com/HomeOfVapourSynthEvolution/VapourSynth-NNEDI3CL/releases/tag/r8 | |
import vapoursynth as vs | |
from vapoursynth import core |
### waifu2x算法放大两倍 | |
### 依赖: https://github.com/nlzy/vapoursynth-waifu2x-ncnn-vulkan/releases/tag/r5 (模型文件在r0.1) | |
import vapoursynth as vs | |
from vapoursynth import core | |
input = video_in | |
colorlv = input.get_frame(0).props._ColorRange | |
fmt_fin = input.format.id |
Important
此教程已过时,限定仅适用于 Python 3.8-3.11 & VapourSynth R57-R65
Note
最新的vs由于更改了安装方式不够“真”便携
推荐从此处下载 快速部署包(且附带pip) 解压到mpv目录即可 https://github.com/hooke007/dotfiles/releases/tag/mpv_addones
编译或下载主要文件
### Real-CUGAN 放大 | |
### 依赖: https://github.com/Kiyamou/VapourSynth-RealCUGAN-ncnn-Vulkan/releases/tag/r2 | |
import vapoursynth as vs | |
from vapoursynth import core | |
input = video_in | |
colorlv = input.get_frame(0).props._ColorRange | |
denoise_lv = -1 |
// 使用单个快捷键依次执行指令 | |
// input.conf | |
// KEY script-message cycle-cmd "CMD1" "CMD2" | |
// Created by https://github.com/avih | |
var registry = {}; | |
mp.register_script_message("cycle-cmd", function() { | |
var key = JSON.stringify(arguments); | |
if (!(registry[key] >= 0)) |