auto-editor について
auto-editorは、録画の自動短縮や手動編集を行うメディア制作者向けのコマンドライン編集スキルです。音声、動き、黒画面、字幕から区間を判定し、カットなどの処理を適用します。
主な機能
- 01区間判定による自動カット
- 02音声・動き・字幕の検出
- 03ラベル別の処理設定
- 04範囲を指定した手動編集
- 05テンポとレンダリングの調整
活用シーン
- 01録音から無音部分を除去
- 02動きや字幕を基準に映像を編集
- 03検出区間ごとに速度を変更
- 04レンダリング前にカット内容を確認
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ wyattblue/ auto-editor --skill auto-editorインストール後、Claude Code で/auto-editorを入力して読み込まれたか確認します。
詳細
auto-editor を使った編集
auto-editor はメディアファイルを解析し、各タイムベース区間にアクティブ (例:音が大きい)または非アクティブ(例:無音)のマークを付けてから、 それぞれにアクションを適用します。デフォルトでは、アクティブな区間はそのまま 維持し、非アクティブな区間はカットします。
auto-editor path/to/video.mp4 # writes video_ALTERED.mp4
auto-editor video.mp4 -o out.mp4 # choose the output name
インストール済みの auto-editor、またはこのリポジトリ内の ./auto-editor を実行します。auto-editor info FILE はストリーム、コーデック、長さを表示します。--preview はカットされる
内容を出力し、レンダリングせずに終了します。長時間のレンダリングを始める前に
確認するために使ってください。
マイクで録音して編集する
macOS、Windows、Linux では、入力に :mic を指定します。Ctrl-C でキャプチャを
正常に停止すると、auto-editor が通常どおり録音を解析して編集します。
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 スキルを使用してください。
1. 「アクティブ」とみなす条件を選ぶ — --edit METHOD
audio:threshold=0.04,stream=all がデフォルトです。しきい値には 0~1 の割合
または dB 値を指定できます(大文字と小文字を区別します)。
| 方法 | 次の場合にアクティブとしてマーク | 主な引数(デフォルト) |
|---|---|---|
audio | 最も大きいサンプル ≥ しきい値 | threshold=0.04、stream=all |
motion | フレーム間の変化 ≥ しきい値 | threshold=0.02、stream=0、width=400、blur=9 |
blackdetect | フレームの大部分が黒 | threshold=0.98、pixel-black=0.10(黒をカットするには not で囲みます) |
subtitle/regex | 字幕の行が pattern に一致 | pattern(必須)、ignore-case=#f |
word | 字幕に単語全体が含まれる | value(必須)、ignore-case=#t |
1 / 0 | すべての/どの時点もアクティブ(すべて維持/すべてカット) | エイリアスは none / all。手動範囲のベースとして使用 |
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)"
ブール演算子 or、and、xor、not を使ってストリームや方法を組み合わせます。
演算子内では、方法に明示的な引数を関数形式で指定してください(単独の
audio ではなく audio:0.04)。方法だけを指定すると、Bad kind エラーになります。
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 parts
ラベル — 無音と大音量だけではありません(--edit:N、--when:N)
すべての時点には整数のラベル(0~255)が付けられ、各ラベルにはアクションが あります。組み込みのラベルは 2 つあります。
| ラベル | 意味 | メンバーシップの設定方法 | アクションの設定方法(デフォルト) |
|---|---|---|---|
0 | 無音/非アクティブ | (--edit に一致しないものすべて) | --when-inactive = -w:0 = --when:0(cut) |
1 | 通常/アクティブ | --edit EXPR(つまり --edit:1 EXPR) | --when-active = -w:1 = --when:1(nil) |
つまり、単独の --edit audio は --edit:1 audio の省略形です。一致した時点には
ラベル 1 が付き、それ以外は 0 のままです。-w:0/-w:1 は単に
--when:0/--when:1 の省略形です。
--edit:N EXPR(N = 2~255)でカスタムクラスを追加し、それぞれに
--when:N ACTION で独自のアクションを指定します(デフォルトの nil = 維持)。
クラスが重複する場合は、より大きなラベルが優先されます。
# 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
# 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 は拒否されます。ラベル 0 は暗黙の無音クラスです。無音の時点に
アクションを適用するには、--when:0 を使用してください。(上記の
--edit 1 / --edit 0 の値はこれとは無関係です。これらは、ラベル 1 の式を
常に真/常に偽の定数に設定します。)
2. ペースを設定する — --margin と --smooth
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 = off
3. 手動編集 — 範囲の構文
--cut、--keep、--set-speed、--set-action は START,STOP 形式の範囲を
指定します。開始位置は範囲に含まれ、終了位置は含まれません。デフォルトの単位は
タイムベースです。秒を指定するには sec(s/second)を追加します。
変数は start/end で、負の値は末尾から数えます。範囲は自動編集と組み合わせる
ことも、手動編集だけを行うために --edit 0/--edit 1 を使うこともできます。
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
4. 編集を反転する — カットされる箇所を確認
auto-editor video.mp4 --when-active cut --when-inactive nil # keep the silence, cut the loud parts
5. レンダリングとファイルサイズ
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 または -crf を設定してください。auto-editor cache は解析キャッシュを
一覧表示し、cache clear でクリアします。
さらに詳しく
- クリエイティブなエフェクト(速度/ズーム/オーバーレイ/アニメーション)→ auto-editor-effects スキル
- Premiere/Resolve/Final Cut、クリップシーケンス、または
.v1/.v2/.v3タイムラインへのエクスポート → auto-editor-export スキル - 音声を文字起こしして、話された言葉に基づいてカット → auto-editor-transcribe スキル
- オプションの全一覧:
auto-editor --helpまたは https://auto-editor.com/ref/options.md