無音候補を調べてカット案と対応表を作る
Plan Silence Cuts with Source-to-Output Maps
FFmpegで音の小さい区間を調べ、余白付きのカット案と元動画・出力の時刻対応表を作ります。標準では解析のみで、書き出しは明示指定が必要です。
できること
FFmpegのsilencedetectで最初の音声を解析し、しきい値と最小継続時間に合う静かな区間を候補として出します。候補の両端に指定の余白を残してカット案を作り、残す区間の元動画時刻と出力時刻をJSON・CSVで分けて記録します。
使い方
動画と新しい --report を指定します。まず --dry-run で解析結果だけを確認し、通常実行ではJSONと同名のCSVを保存します。映像の内容を確認してから、新しいMP4名を --export で明示した場合だけカット版を作れます。
必要な環境
Python 3.10以降と、別途インストールしたFFmpeg・ffprobeが必要です。Pythonの追加パッケージは不要です。再エンコードする場合はlibx264とAACに対応したFFmpegを使用してください。外部サービスへの送信や動画URLの取得は行いません。任意のYouTube URLから動画をダウンロードする機能はありません。
注意点
静かでも重要な映像が含まれる場合があります。解析結果は編集判断の代わりではありません。全体が静かな動画や音声なし動画は状態を明記し、書き出しを拒否します。余白が長く実効カットがなくなる場合も書き出しません。書き出しは最初の映像・音声を再圧縮するため、境界にはフレーム単位の誤差があります。元動画や既存の出力は上書きしません。
English description
Detect quiet regions and write proposed cuts plus kept source-to-output maps in JSON and CSV. Analyze by default; export only with an explicit flag.
What it does
Analyze the first audio stream with silencedetect and propose quiet-region removals using a dB threshold, minimum silence duration and preserved boundary padding. Write raw quiet intervals, proposed cuts and a kept source-to-output timeline in JSON, plus the kept timeline CSV.
How to use
Run --dry-run to analyze without writing. Remove it to save a new report JSON and sibling CSV. Review every proposed cut against the visuals. Only an explicit --export new-cut.mp4 creates an edited version. Entirely quiet, no-audio, empty/no-cut and over-200-range timelines are refused for export.
Requirements
Python 3.10 or newer and separately installed FFmpeg/ffprobe. No Python packages or binaries are bundled. FFmpeg must provide libx264 and AAC for reencoded exports.
Caveats
Silent visuals may matter. This is amplitude-based detection, not speech recognition or semantic editing. Export reencodes the first video/audio streams; other streams are omitted. JSON/CSV mappings are proposed continuous timings, not frame-exact guarantees. All output paths must be new. It does not download arbitrary YouTube URLs.
インストール方法
- ダウンロードしたZIPを展開します(中に
video-silence-cut-planner/フォルダとSKILL.mdがあります)。 - フォルダごと、使うエージェントのスキル置き場にコピーします。
- Claude:
~/.claude/skills/(プロジェクト単位なら.claude/skills/) - Hermes Agent:
~/.hermes/skills/ - Codex:
~/.agents/skills//Cursor:~/.cursor/skills/ - Claude アプリ(claude.ai):「カスタマイズ → スキル」からZIPをアップロード
- Claude:
- エージェントを再起動し、スキル一覧に表示されることを確認します。
出品者
動画編集の準備から仕上がりの確認まで、毎日の作業を支援するスキルを制作しています。切り出し・字幕づくり・音声調整・文字起こしを、元の素材を残しながら進められるようにします。
出品スキル 10 件