AI 工具 · 中文译文
Auto-Editor 官方实用操作指南
帮助你上手 auto-editor 的简短实用示例。
实用食谱
帮助你上手 auto-editor 的简短实用示例。每个示例都是一条可以复制、粘贴并调整的命令。将 video.mp4 替换成你自己的文件。
最简单的剪辑
自动剪掉安静的“空白时段”。开始只需要这一条命令:
auto-editor video.mp4
结果写入 video_ALTERED.mp4。想自行指定文件名,使用 -o:
auto-editor video.mp4 -o trimmed.mp4
用叠化过渡让切换更平滑
将每个保留片段与下一段混合衔接,而不是直接跳切,并在开头淡入、结尾淡出:
auto-editor video.mp4 --transition dissolve:0.5sec
默认情况下,删掉不足一秒素材的切点仍采用硬切,避免剪除短暂静音时产生不连贯感。用 :0 让每个切点都采用叠化:
auto-editor video.mp4 --transition dissolve:0.5sec:0
导出到编辑器时也会保留过渡效果——参见 Transitions。
录制并剪辑麦克风音频
用 :mic 代替输入文件,从麦克风采集音频。录完后按 Ctrl-C;auto-editor 随后会删除安静片段,并写入 mic_ALTERED.wav:
auto-editor :mic
所有常规剪辑和输出选项均适用。例如:
auto-editor :mic --edit audio:threshold=6% -o trimmed.m4a
用 --sample-rate 在剪辑前对录音重新采样:
auto-editor :mic --sample-rate 44.1kHz
时间线和编辑器导出会将麦克风采集内容作为无损 FLAC 音频流保存在 *_RECORDING.mka 中。用 -c:a 选择 Matroska 支持的其他编码:
auto-editor :mic --export resolve -c:a opus -o interview.fcpxml
macOS、Windows 和 Linux 都支持实时麦克风采集。时间线和编辑器导出会将原始采集内容保存在同目录下的 *_RECORDING.mka 文件中,让导出的项目仍能引用它。
渲染之前先查看
先了解将剪掉多少内容,暂不生成文件:
auto-editor video.mp4 --preview
让节奏更自然
默认情况下,auto-editor 会在每个保留片段前后留下 0.2 秒余量,使切换不会太突兀。增加余量可以让语句更舒展,也可以为前后设置不同的余量:
# 0.5 seconds of padding on both sides
auto-editor video.mp4 --margin 0.5sec
# 0.3s before, 1.5s after
auto-editor video.mp4 --margin 0.3sec,1.5sec
更激进地剪,或少剪一些
--edit 决定什么声音算“足够响”,从而予以保留。提高阈值会剪掉更多,降低阈值则保留更多。可以使用百分比或 dB 值:
# Keep only louder audio (cuts more)
auto-editor video.mp4 --edit audio:threshold=6%
# The same idea in decibels
auto-editor video.mp4 --edit audio:-18dB
要分析一个声道,而不是取所有声道中最响的采样值,请使用它的声道布局名称:
auto-editor video.mp4 --edit audio:channel=left
声道名称会按布局识别,包括 left、right、center、lfe、back-left 等。单声道同时作为 left、right 和 center。使用 stream=all 时,只要至少一个音频流包含所请求的声道,不包含该声道的音频流就会被跳过。
根据运动而不是声音剪辑
适合屏幕录制或无声素材——去掉静止部分:
auto-editor video.mp4 --edit motion:threshold=2%
加速静音而不是剪掉
保留每个时刻,但快进安静的部分:
auto-editor video.mp4 -w:0 speed:8
音量、缩放、叠加等内容参见 Actions Cookbook。
剪去开头或结尾
# Drop the first and last 30 seconds, on top of the automatic edit
auto-editor video.mp4 --cut-out start,30sec -30sec,end
更多信息参见 Range Syntax。
按说话内容剪辑
先转写语音,再按文字剪辑。首先生成字幕,然后利用字幕剪辑:
auto-editor whisper video.mp4 ggml-medium.en.bin --format srt -o video.srt
auto-editor video.mp4 --edit subtitle
Auto-Editor 能识别 video.srt 与 video.mp4 的关联。更多详情参见 whisper 命令。
交给你的视频编辑器
不直接渲染,而是导出可以在编辑器中打开的项目:
auto-editor video.mp4 --export premiere
auto-editor 还可以导出到 resolve、final-cut-pro、shotcut 和 kdenlive。要将每个保留片段输出为独立文件,使用 clip-sequence:
auto-editor video.mp4 --export clip-sequence
直接从 URL 剪辑
如果安装了 yt-dlp,可以将链接作为输入:
auto-editor "https://www.youtube.com/watch?v=kcs82HnguGc"