WyattBlue/auto-editor
GitHub: WyattBlue/auto-editor
Auto-Editor 是一个通过音频和运动分析自动编辑视频的命令行工具。
Stars: 4339 | Forks: 552

安装说明
更多详情请参阅 [安装说明](https://auto-editor.com/installing)。剪辑
使用 `--margin` 来调整编辑后视频的**节奏**。 `--margin` 会加入一些“静音”片段,使编辑效果更佳。 ``` # 在前后添加0.2秒的填充,使编辑效果更佳。 # `0.2s`是`--margin`的默认值 auto-editor example.mp4 --margin 0.2sec # 在前添加0.3秒填充,后添加1.5秒 auto-editor example.mp4 --margin 0.3s,1.5sec ``` ### 自动剪辑的方法 `--edit` 选项是 Auto-Editor 进行自动化剪辑的方式。 例如,通过设置 `--edit motion` 来编辑掉视频中的静止画面。 ``` # 剪掉总运动量低于2%的部分。 auto-editor example.mp4 --edit motion:threshold=0.02 # 默认使用`--edit audio:threshold=0.04,stream=all`。 auto-editor example.mp4 # 不同音轨可设置不同属性。 auto-editor multi-track.mov --edit "(or audio:stream=0 audio:threshold=10%,stream=1)" ``` 不同的编辑方法可以组合使用。 ``` # 'threshold'始终是edit-method对象的第一个参数 auto-editor example.mp4 --edit "(or audio:0.03 motion:0.06)" ``` 你也可以使用 `dB` 单位,这是视频编辑者熟悉的音量单位(区分大小写): ``` auto-editor example.mp4 --edit audio:-19dB auto-editor example.mp4 --edit audio:-7dB auto-editor example.mp4 --edit motion:-19dB ``` ### 查看 Auto-Editor 剪掉了什么 要导出 Auto-Editor 通常剪掉的内容。请将 `--when-normal` 设置为 `cut`,并将 `--when-silent` 设置为 `nil`(保持原样)。这与通常的默认值相反。 ``` auto-editor example.mp4 --when-normal cut --when-silent nil ```导出到编辑软件
使用以下命令创建一个可以导入到 Adobe Premiere Pro 的 XML 文件: ``` auto-editor example.mp4 --export premiere ``` Auto-Editor 也可以导出到: - 使用 `--export resolve` 导出到 DaVinci Resolve - 使用 `--export final-cut-pro` 导出到 Final Cut Pro - 使用 `--export shotcut` 导出到 ShotCut - 使用 `--export kdenlive` 导出到 Kdenlive - 使用 `--export clip-sequence` 导出为独立的媒体片段 ### 为时间线命名 一些编辑软件支持时间线命名。默认情况下,Auto-Editor 将使用名称 "Auto-Editor Media Group"。对于 `premiere`、`resolve` 和 `final-cut-pro` 导出选项,你可以使用以下语法更改名称。 ``` # 适用于POSIX shell auto-editor example.mp4 --export 'premiere:name="Your name here"' # 适用于Powershell auto-editor example.mp4 --export 'premiere:name=""Your name here""' ``` ### 按片段拆分 如果你想拆分片段,但不希望 Auto-Editor 进行更多编辑。有一个简单的命令。 ``` auto-editor example.mp4 --when-silent nil --when-normal nil --export premiere ```导入时间线文件
Auto-Editor 可以读取 FCP7 XML 文件并将它们渲染为媒体文件: ``` auto-editor myFcp7File.xml -o render.mp4 ``` 可用的导入器: - Auto-Editor 时间线文件 (`.v1`, `.v2`, `.v3`) - FCP7 XML(实验性)手动编辑
使用 `--cut-out` 选项来永久移除某个片段。 ``` # 剪掉前30秒。 auto-editor example.mp4 --cut-out 0,30sec # 剪掉前30帧。 auto-editor example.mp4 --cut-out 0,30 # 始终保留前30秒。 auto-editor example.mp4 --add-in 0,30sec # 剪掉最后10秒。 auto-editor example.mp4 --cut-out -10sec,end # 你可以一次进行多项操作。 auto-editor example.mp4 --cut-out 0,10 15sec,20sec auto-editor example.mp4 --add-in 30sec,40sec 120,150sec ``` 当然,你也可以使用任何 `--edit` 配置。 如果你**不想要任何自动剪辑**,可以使用 `--edit none` 或 `--edit all`。 ``` # 剪掉前5秒,其余部分保持不变。 auto-editor example.mp4 --edit none --cut-out 0,5sec # 保留前5秒,剪掉其他所有内容。 auto-editor example.mp4 --edit all --add-in 0,5sec ```更多选项
列出所有可用选项: ``` auto-editor --help ``` ## 文章 - [如何安装 Auto-Editor](https://auto-editor.com/installing) - [所有选项(及其作用)](https://auto-editor.com/ref/options) - [文档](https://auto-editor.com/docs) - [博客](https://basswood-io.com/blog/) ## 图形界面应用程序 有一个图形界面应用程序 [可用](https://app.auto-editor.com),采用专有许可。此代码仓库中不包含任何 GUI 代码,也不包含专有代码或资源。 ## 版权 此代码仓库中的所有内容均采用 [公共领域](https://github.com/WyattBlue/auto-editor/blob/master/LICENSE) 许可。"Releases" 部分中的二进制文件可能采用各种开源许可。标签:Nim语言, 命令行应用, 多媒体处理, 媒体编辑, 开源, 效率工具, 自动编辑软件, 视频剪辑, 视频处理, 视频编辑, 静默检测, 音频响度分析, 音频处理