動画の音声トラックを差し替え・追加

Replace or Add a Local Video Soundtrack

ローカル動画の音声を確認して差し替え・追加。映像コピーを基本に、短い音声の無音補完やループ、音量を選べます。

ClaudeHermes AgentCodexCursorMIT(改変・再配布・商用利用可)Python

できること

動画内の音声トラックを一覧にし、手元の音源で全音声を置き換える、指定した音声だけを差し替える、別トラックとして追加する操作を選べます。音声がない動画にも対応します。映像はMP4と互換性のある形式ならコピーし、音声はAACで書き出します。短い音源は無音で補うかループするか、そのまま短く残すかを選択できます。

使い方

Claude、Codex、Hermes Agent、Cursorに動画とローカル音源を渡します。まず音声一覧で番号を確認し、差し替えか追加か、長さの方針と音量を指定します。ドライランでコマンドを見た後、新規フォルダーに出力します。複数音声がある音源では、使う音声番号も選べます。

必要な環境

Python 3.10以降、FFmpeg、ffprobeが必要です。Pythonの追加パッケージは使いません。映像コピーに非対応の形式では、明示的に再エンコードを選択できます。

注意点

追加はミックスではなく別の音声トラックです。映像全体の長さは維持し、音量は新しい音源にだけ適用します。既存音声もAACへ再エンコードします。元動画の全体タグとチャプターを残すか捨てるかを選べますが、音声の個別タグはリセットします。元ファイルや既存出力は上書きしません。著作権のある音楽の取得や任意のYouTube URLのダウンロードは行わず、利用許可のあるローカル素材だけを扱います。

English description

Inspect video audio streams, replace all or one, or append a local soundtrack. Copy compatible video; choose padding, looping or short-audio truncation and gain.

What it does

Inspect audio streams; replace every original audio track, replace a chosen audio ordinal, or append a local soundtrack as a separate track. Works with silent video and multi-audio inputs. Compatible video is copied by default; all output audio is encoded as AAC. Choose silence padding, looping, or leaving a short audio track short, plus linear gain on the new soundtrack.

How to use

Inspect the video first. Choose the operation, zero-based audio ordinals and duration policy. Review the dry-run command and export to a new directory. A JSON manifest records the policy, output audio order and measured streams.

Requirements

Python 3.10+ with FFmpeg and ffprobe separately installed. No additional Python packages. An explicit H.264 reencode option handles video outside the conservative MP4 copy allowlist.

Caveats

Add means another audio track, not an audio mix. Full video duration is retained. Existing audio is reencoded; gain affects the new soundtrack only. Global metadata/chapters can be preserved or dropped; audio stream tags are reset. This is not a privacy sanitizer. No copyrighted-music downloads, arbitrary YouTube URL downloads, uploads, or overwriting existing output.

インストール方法

  1. ダウンロードしたZIPを展開します(中に video-audio-track-replacer/ フォルダと SKILL.md があります)。
  2. フォルダごと、使うエージェントのスキル置き場にコピーします。
    • Claude:~/.claude/skills/(プロジェクト単位なら .claude/skills/)
    • Hermes Agent:~/.hermes/skills/
    • Codex:~/.agents/skills//Cursor:~/.cursor/skills/
    • Claude アプリ(claude.ai):「カスタマイズ → スキル」からZIPをアップロード
  3. エージェントを再起動し、スキル一覧に表示されることを確認します。

Windows・Mac 別、エージェント別のインストール手順

出品者

動画編集が仕事

動画編集の準備から仕上がりの確認まで、毎日の作業を支援するスキルを制作しています。切り出し・字幕づくり・音声調整・文字起こしを、元の素材を残しながら進められるようにします。

出品スキル 10 件

出品者のプロフィールとスキル一覧