Skip to content
op200 edited this page Jan 26, 2025 · 3 revisions

入门:

可以直接下在编译好的exe,双击执行,或者用命令行传参执行

# 运行exe,键入 'help'
Easy Rip command>help
# 这样可以输出帮助文档

# 直接用命令行传参
>easyrip help
# 这样可以输出帮助文档并在输出后进入 'Easy Rip command>' 状态

也可以用 python import py 文件,直接调用里面的函数,这里就不演示 py 代码了

压制语法:

每次执行一次参数设定,都会往队列里塞入,最后统一按次序执行

看一段演示命令:

# 设定参数
Easy Rip command>-i "C:\你的视频.mp4" -o 这是输出的文件名前缀 -preset x264sub -sub "E:\字幕文件夹\你的字幕.ass" -crf 11.4 -deblock -5,1.4
Easy Rip command>run exit

# 相当于
>easyrip -i "C:\你的视频.mp4" -o 这是输出的文件名前缀 -preset x264sub -sub "E:\字幕文件夹\你的字幕.ass" -crf 11.4 -deblock -5,1.4 -run exit

这个代码的意思是: -i 输入视频 -o 设置输出的文件名前缀 -preset 预设为 x264sub,它是一个 x264 压制内嵌视频的预设,具体有哪些预设可以在 help 中看到 -sub 用来压内嵌的字幕 -crf 覆写预设中 x264 的 crf 参数为 11.4 -deblock 覆写预设中 x264 的 deblock 参数为 -5,1.4 -run exit 依次执行队列中所有的压制,exit 意为在压完后退出程序

再来看一段:

# 使用 x265-快速 预设,启用内嵌模式,重混为 mp4 封装,封装帧率改为 24000/1001 fps
Easy Rip command>-i "C:\你的视频1.mkv" -o "video 1" -preset x265fast -sub "E:\字幕文件夹\你的字幕.ass" -muxer mp4 -r 24000/1001

# 使用 x265-较慢 预设,复制音频轨,重混为 mkv 封装,封装帧率改为 666 fps
Easy Rip command>-i "C:\你的视频2.avi" -o "video 2"  -preset x265slow -c:a copy -muxer mkv -r 666

# 使用文件对话框选择输入的文件,使用 x265-满参 预设,覆写预设中的 x265 的 limit-tu 参数为 2,使用 libopus 将音频轨压为 opus 格式,音频码率为 160kbps
Easy Rip command>-i fd -preset x265full -limit-tu 2 -c:a libopus -b:a 160k

# 查看即将压制的队列
Easy Rip command>list

# 删除队列中的第四个压制
Easy Rip command>list del 4

# 运行队列中所有的压制
Easy Rip command>run

# 可以使用 -pipe 传入滤镜脚本,vpy 中使用 globals().get('input') 获取传入的路径名
Easy Rip command>-i fd -preset x265full -pipe "Z:\你的滤镜脚本.vpy"

# 可以直接把 vpy 作为输入
Easy Rip command>-i "V:\这是个vpy脚本.vpy" -preset x265full -o vpy输出视频文件名

# 支持相对路径和设置输出路径
Easy Rip command>-i "相对路径下的视频.mkv" -preset x265full -o 输出文件名 -o:dir "C:\输出目录"

# 支持调用 FFmpeg 的硬解 和 FFmpeg 内置的去隔行滤镜
Easy Rip command>-i video.mp4 -preset x265full -o 输出文件名 -hwaccel vulkan -deinterlacing 1

# 清空队列
Easy Rip command>list clear

# 退出程序
Easy Rip command>exit

当然,支持自定义语句,可以用命令行调任何东西:

# 例如像这样把视频用 FFmpeg 解码推给 VVenC
Easy Rip command>-i testVideo.mkv -o testVideoOutput -preset custom -custom:format 'ffmpeg -i "{input}" -map {ffmap} -f yuv4mpegpipe - | vvenc -i - --y4m --preset {vvenc-preset} -o "{output}"' -custom:suffix 266 -ffmap 0:v:0 -vvenc-preset slower
Clone this wiki locally