動画の連結可否を調べて安全に結合する

Inspect and Safely Concatenate Local Clips

複数の動画を調べ、再圧縮せずに連結できるかを判定します。条件が違う場合は明示した場合だけ変換し、音声のない素材には無音を補います。

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

できること

複数のローカル動画をffprobeで調べ、映像・音声のコーデック、解像度、フレームレート、タイムベース、音声仕様などをJSONに整理します。保守的な条件を満たす場合のみ、H.264と任意のAACをコピー連結できます。

使い方

--inputs に順番どおりの素材、--plan に新しいJSON名を指定します。まず --dry-run で確認し、計画だけを保存する場合はこのフラグを外します。実際の結合には --output と --execute が必要です。不一致を変換する場合だけ --normalize を追加します。

必要な環境

Python 3.10以降と、別途インストールしたFFmpeg・ffprobeが必要です。Pythonの追加パッケージは不要です。再エンコードする場合はlibx264とAACに対応したFFmpegを使用してください。外部サービスへの送信や動画URLの取得は行いません。任意のYouTube URLから動画をダウンロードする機能はありません。

注意点

変換時は解像度とfpsを揃え、音声を48kHzステレオにし、音声なし素材に無音を補います。変換は非可逆です。複数映像・複数音声や字幕などの追加ストリームは対象外です。メタデータ一致だけで不正なタイムスタンプを完全には検出できないため、完成動画のつなぎ目を確認してください。上書きやネット取得は行いません。

English description

Inspect clip streams and create a concat plan and manifest. Copy compatible clips, or explicitly normalize mismatches and synthesize missing audio.

What it does

Inspect codec, profile, geometry, pixel format, frame-rate metadata, time base, audio parameters, stream order and codec extradata hashes. Generate a JSON plan and escaped ffconcat manifest. Default execution allows stream copy only for conservatively compatible H.264 and optional AAC.

How to use

Start with --dry-run. Remove it to save only the plan and manifest. Add --output joined.mp4 --execute to concatenate. Incompatible clips are blocked unless --normalize is explicit. Normalization scales with padding, sets square pixels and fixed fps, and produces H.264 plus 48 kHz stereo AAC, synthesizing silence for audio-less clips.

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

No shell, upload or URL downloading. Output files must be new. Normalization is lossy and needs temporary disk space. Only one video, at most one audio and no extra streams are accepted. Metadata matching is not proof of perfect packet timing; inspect joins. Arbitrary codecs are not accepted for copy mode. It does not download arbitrary YouTube URLs.

インストール方法

  1. ダウンロードしたZIPを展開します(中に video-concat-planner/ フォルダと 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 件

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