カット表から動画クリップを書き出す

Export Video Clips from a Cut List

ローカル動画とJSON・CSVのカット表からクリップを一括出力。再エンコードと簡易コピーを選び、元動画の時刻を記録します。

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

できること

ローカルの動画と、開始秒・終了秒・タイトルを並べたJSONまたはCSVから、複数のMP4クリップを作ります。標準は再エンコードで、フレームの境界に沿って切り出します。各クリップの元動画での時刻、実際の出力時間、実行したコマンドをJSONに記録し、一覧のタイムラインも残せます。同じタイトルには連番が付き、名前の衝突を避けます。

使い方

Claude、Codex、Hermes Agent、Cursorにローカル動画とカット表を渡してください。まずドライランで計画を確認し、問題なければまだ存在しない出力フォルダーを指定して実行します。カット表は同梱のひな形を編集できます。開始・終了は元動画を基準とした秒数です。

必要な環境

Python 3.10以降と、別途用意したFFmpeg・ffprobeが必要です。Pythonの追加パッケージは不要です。実行ファイルはPATHまたは環境変数で指定します。

注意点

負の時刻、終了より後の開始、動画の長さを超える指定を拒否します。元動画や既存の出力は上書きしません。キーフレームコピーは境界が不正確になるため警告付きです。映像は最初の動画トラック、音声は最初の音声トラックのみで、字幕やチャプターは引き継ぎません。任意のYouTube URLからダウンロードする機能はなく、所有または利用許可のあるローカル素材だけを使います。

English description

Export local video clips from JSON or CSV cuts, with validated times, accurate reencoding or explicit keyframe-copy mode, and source timeline manifests.

What it does

Export one MP4 per JSON or CSV cut, with decimal-second start/end times and titles. Reencoding is the default. Each clip has a manifest with requested source times, actual output duration and command; a timeline manifest collects the batch. Numbered filenames keep repeated titles distinct.

How to use

Give your agent a local video and the included cut-list template. Run a dry run, review the commands, then export into a new output directory. Choose keyframe-copy only when imprecise boundaries are acceptable.

Requirements

Python 3.10+ and separately installed FFmpeg and ffprobe, available on PATH or through FFMPEG and FFPROBE. No Python packages are required.

Caveats

Existing directories and files are never overwritten. Times must satisfy 0 <= start < end <= duration. Reencoding has frame/audio granularity; copying may include leading frames or shifted timestamps. Only the first video and first optional audio are mapped; subtitles, global container tags and chapters are not retained. Uses authorized local files only and does not download arbitrary YouTube URLs.

インストール方法

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

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