auto-editor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEditing with auto-editor
使用auto-editor编辑
auto-editor analyzes a media file, marks every timebase section as active
(e.g. loud) or inactive (e.g. silent), then applies an action to each. The
defaults: keep active sections unchanged, cut inactive ones.
bash
auto-editor path/to/video.mp4 # writes video_ALTERED.mp4
auto-editor video.mp4 -o out.mp4 # choose the output nameRun the installed , or from this repo. shows streams/codecs/duration; prints what would be cut
and exits without rendering — use it to sanity-check before a long render.
auto-editor./auto-editorauto-editor info FILE--previewauto-editor分析媒体文件,将每个时基段标记为活跃(如响亮)或非活跃(如静音),然后对每个段应用操作。默认设置:保持活跃段不变,剪切非活跃段。
bash
auto-editor path/to/video.mp4 # writes video_ALTERED.mp4
auto-editor video.mp4 -o out.mp4 # choose the output name运行已安装的,或从本仓库运行。显示流/编解码器/时长;打印将被剪切的内容并退出而不渲染——在长时间渲染前用它进行合理性检查。
auto-editor./auto-editorauto-editor info FILE--previewRecord and edit a microphone
录制并编辑麦克风
Use as the input on macOS, Windows, or Linux. Stop capture gracefully
with Ctrl-C; auto-editor then analyzes and edits the recording normally.
:micbash
auto-editor :mic # → mic_ALTERED.wav
auto-editor :mic --sample-rate 44.1kHz -o trimmed.m4a
auto-editor :mic --edit audio:threshold=6%All normal edit, action, and rendering options apply. Editor and timeline
exports preserve the source capture separately; use the auto-editor-export
skill for recording-codec and naming details.
在macOS、Windows或Linux上使用作为输入。用Ctrl-C优雅地停止捕获;auto-editor随后正常分析和编辑录音。
:micbash
auto-editor :mic # → mic_ALTERED.wav
auto-editor :mic --sample-rate 44.1kHz -o trimmed.m4a
auto-editor :mic --edit audio:threshold=6%所有常规编辑、操作和渲染选项均适用。编辑器和时间线导出会单独保留源捕获;有关录制编解码器和命名详情,请使用auto-editor-export skill。
1. Choose what counts as "active" — --edit METHOD
--edit METHOD1. 选择什么算作“活跃”——--edit METHOD
--edit METHODaudio:threshold=0.04,stream=alldB| Method | Marks active when… | Key args (defaults) |
|---|---|---|
| loudest sample ≥ threshold | |
| frame-to-frame change ≥ threshold | |
| frame is mostly black | |
| a subtitle line matches | |
| a whole word appears in subtitles | |
| every / no moment is active (keep-all / cut-all) | aliases |
bash
auto-editor video.mp4 --edit audio:threshold=0.04
auto-editor video.mp4 --edit audio:-19dB # dB form
auto-editor video.mp4 --edit motion:threshold=0.02
auto-editor video.mp4 --edit blackdetect # cut to remove black: --edit "(not blackdetect:0.98)"Combine streams/methods with boolean operators , , , . Inside
an operator, give the method an explicit arg in call form (, not bare
) — a bare method there errors with :
orandxornotaudio:0.04audioBad kindbash
auto-editor multi.mov --edit "(or audio:stream=0 audio:threshold=10%,stream=1)"
auto-editor video.mp4 --edit "(or audio:0.03 motion:0.06)" # threshold is always positional arg 1
auto-editor video.mp4 --edit "(not audio:0.04)" # invert: keep the quiet partsaudio:threshold=0.04,stream=alldB| 方法 | 当…时标记为活跃 | 关键参数(默认值) |
|---|---|---|
| 最大声样本 ≥ threshold | |
| 帧间变化 ≥ threshold | |
| 帧大部分为黑色 | |
| 字幕行匹配 | |
| 字幕中出现完整单词 | |
| 每个 / 没有时刻是活跃的(全部保留/全部剪切) | 别名 |
bash
auto-editor video.mp4 --edit audio:threshold=0.04
auto-editor video.mp4 --edit audio:-19dB # dB form
auto-editor video.mp4 --edit motion:threshold=0.02
auto-editor video.mp4 --edit blackdetect # cut to remove black: --edit "(not blackdetect:0.98)"使用布尔运算符、、、组合流/方法。在运算符内部,以调用形式给方法显式参数(,而不是裸)——裸方法会报错:
orandxornotaudio:0.04audioBad kindbash
auto-editor multi.mov --edit "(or audio:stream=0 audio:threshold=10%,stream=1)"
auto-editor video.mp4 --edit "(or audio:0.03 motion:0.06)" # threshold is always positional arg 1
auto-editor video.mp4 --edit "(not audio:0.04)" # invert: keep the quiet partsLabels — more than just silent vs. loud (--edit:N
, --when:N
)
--edit:N--when:N标签——不仅仅是静音与响亮(--edit:N
, --when:N
)
--edit:N--when:NEvery moment is tagged with an integer label (0–255), and each label has an
action. Two labels are built in:
| Label | Meaning | Set the membership with | Set the action with (default) |
|---|---|---|---|
| silent / inactive | (whatever | |
| normal / active | | |
So plain is shorthand for : matched moments become
label 1, the rest stay 0. / are just /.
--edit audio--edit:1 audio-w:0-w:1--when:0--when:1Add custom classes with (N = 2–255) and give each its own
action with (default = keep). Where classes overlap, the
higher label wins:
--edit:N EXPR--when:N ACTIONnilbash
undefined每个时刻都标有一个整数标签(0–255),每个标签有一个动作。内置两个标签:
| 标签 | 含义 | 用…设置成员资格 | 用…设置动作(默认) |
|---|---|---|---|
| 静音/非活跃 | ( | |
| 正常/活跃 | | |
所以普通是的简写:匹配的时刻变为标签1,其余保持0。/就是/。
--edit audio--edit:1 audio-w:0-w:1--when:0--when:1使用(N = 2–255)添加自定义类,并用(默认=保留)为每个类指定动作。当类重叠时,较高的标签胜出:
--edit:N EXPR--when:N ACTIONnilbash
undefinedCut silence (0) and keep speech (1) as usual, but also zoom wherever there's motion (2)
Cut silence (0) and keep speech (1) as usual, but also zoom wherever there's motion (2)
auto-editor video.mp4 --edit:2 motion:0.02 --when:2 zoom:2
auto-editor video.mp4 -e:2 motion:0.1 -w:2 speed:2 # -e/-w short forms
auto-editor video.mp4 --edit:2 motion:0.02 --when:2 zoom:2
auto-editor video.mp4 -e:2 motion:0.1 -w:2 speed:2 # -e/-w short forms
Three tiers: cut silence, keep quiet speech at 1x, speed up the loud parts
Three tiers: cut silence, keep quiet speech at 1x, speed up the loud parts
auto-editor talk.mp4 --edit audio:-30dB --edit:2 audio:-12dB --when:2 speed:1.5
`--edit:0` is rejected — label 0 is the implicit silent class; use `--when:0` to
act on silent moments. (The `--edit 1` / `--edit 0` *values* above are unrelated:
they set label 1's expression to the all-true / all-false constant.)auto-editor talk.mp4 --edit audio:-30dB --edit:2 audio:-12dB --when:2 speed:1.5
`--edit:0`被拒绝——标签0是隐式的静音类;使用`--when:0`对静音时刻执行操作。(上面的`--edit 1`/`--edit 0` *值*与此无关:它们将标签1的表达式设置为全真/全假常量。)2. Set the pace — --margin
and --smooth
--margin--smooth2. 设置节奏——--margin
和--smooth
--margin--smoothbash
auto-editor video.mp4 --margin 0.2sec # default: pad each kept section by 0.2s both sides
auto-editor video.mp4 --margin 0.3s,1.5sec # 0.3s before, 1.5s after (avoids clipped words)
auto-editor video.mp4 --smooth 0.2s,0.1s # min-cut 0.2s, min-clip 0.1s (default); --smooth 0 = offbash
auto-editor video.mp4 --margin 0.2sec # default: pad each kept section by 0.2s both sides
auto-editor video.mp4 --margin 0.3s,1.5sec # 0.3s before, 1.5s after (avoids clipped words)
auto-editor video.mp4 --smooth 0.2s,0.1s # min-cut 0.2s, min-clip 0.1s (default); --smooth 0 = off3. Manual edits — range syntax
3. 手动编辑——范围语法
--cut--keep--set-speed--set-actionSTART,STOPsecssecondstartend--edit 0--edit 1bash
auto-editor video.mp4 --cut 0,30 -10sec,end # drop first 30 frames and last 10s
auto-editor video.mp4 --keep 0,30sec # force-keep first 30s regardless of loudness
auto-editor video.mp4 --set-speed 2,0,30 # SPEED,START,STOP: 2x over frames 0–29
auto-editor video.mp4 --edit 1 --cut 0,5sec # no auto cuts, just drop first 5s
auto-editor video.mp4 --edit 0 --keep 0,5sec # keep only the first 5s--cut--keep--set-speed--set-actionSTART,STOPsecssecondstartend--edit 0--edit 1bash
auto-editor video.mp4 --cut 0,30 -10sec,end # drop first 30 frames and last 10s
auto-editor video.mp4 --keep 0,30sec # force-keep first 30s regardless of loudness
auto-editor video.mp4 --set-speed 2,0,30 # SPEED,START,STOP: 2x over frames 0–29
auto-editor video.mp4 --edit 1 --cut 0,5sec # no auto cuts, just drop first 5s
auto-editor video.mp4 --edit 0 --keep 0,5sec # keep only the first 5s4. Reverse the edit — see what gets cut
4. 反转编辑——查看将被剪切的内容
bash
auto-editor video.mp4 --when-active cut --when-inactive nil # keep the silence, cut the loud partsbash
auto-editor video.mp4 --when-active cut --when-inactive nil # keep the silence, cut the loud parts5. Render & file size
5. 渲染与文件大小
bash
auto-editor video.mp4 -c:v hevc -b:v 0 # variable bitrate
auto-editor video.mp4 -b:v 230k # target a bitrate to shrink the file
auto-editor video.mp4 -crf 23 -preset medium # quality-based encoding
auto-editor video.mp4 --scale 0.5 # halve the resolution
auto-editor video.mp4 -anorm ebu # EBU R128 loudness normalize (or peak:-3)Larger-than-expected files are usually a too-high auto bitrate — set or . lists/s the analysis cache.
-b:v-crfauto-editor cachecache clearbash
auto-editor video.mp4 -c:v hevc -b:v 0 # variable bitrate
auto-editor video.mp4 -b:v 230k # target a bitrate to shrink the file
auto-editor video.mp4 -crf 23 -preset medium # quality-based encoding
auto-editor video.mp4 --scale 0.5 # halve the resolution
auto-editor video.mp4 -anorm ebu # EBU R128 loudness normalize (or peak:-3)文件比预期大通常是因为自动比特率过高——设置或。列出/清除分析缓存。
-b:v-crfauto-editor cachecache clearGoing further
进一步了解
- Creative effects (speed/zoom/overlays/animations) → auto-editor-effects skill
- Export to Premiere/Resolve/Final Cut, clip-sequence, or timelines → auto-editor-export skill
.v1/.v2/.v3 - Transcribe audio and cut by spoken words → auto-editor-transcribe skill
- Full option list: or https://auto-editor.com/ref/options.md
auto-editor --help
- 创意效果(速度/缩放/叠加/动画)→ auto-editor-effects skill
- 导出到Premiere/Resolve/Final Cut、剪辑序列或时间线 → auto-editor-export skill
.v1/.v2/.v3 - 转录音频并按语音内容剪切 → auto-editor-transcribe skill
- 完整选项列表:或https://auto-editor.com/ref/options.md
auto-editor --help