Communitygithub.com

動画編集(everything-claude-code)

撮素材から仕上げまで:FFmpeg、Remotion、ElevenLabs、fal.ai、Descript/CapCut。

動画編集(everything-claude-code) とは?

デモ後に構成とテンポを整える——出荷可能なローンチカット。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/video-editing

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

プレビュー

スキル README より

ドキュメント

ビデオ編集

AIが支援する実際の映像編集。プロンプトからの生成ではありません。既存の映像を高速に編集します。

起動条件

  • ユーザーが映像の編集、カット、構成を望んでいる場合
  • 長時間の録画をショート動画に変換する場合
  • 生のキャプチャからブログ、チュートリアル、デモ動画を作成する場合
  • 既存の映像にオーバーレイ、字幕、音楽、ナレーションを追加する場合
  • 異なるプラットフォーム(YouTube、TikTok、Instagram)向けに映像をリフレーミングする場合
  • ユーザーが「動画を編集して」「この映像をカットして」「ブログを作って」「動画のワークフロー」と言った場合

コアコンセプト

AIによる動画編集は、動画全体をAIに作成させるのではなく、実際の映像を圧縮、構成、拡張するために使用するときに真価を発揮します。価値は生成ではなく、圧縮にあります。

パイプライン

測定可能なリファレンス駆動型の作業では、taste-distillation を taste-application に連鎖させ、その後ここに戻って編集者と最終出力のレビューを行います。スタンドアロンのテイストスキルは既存の映像を使用できます。生成はオプションです。

ライブエディターやDAWの変更を行う前に、バージョン管理されたプロジェクトのチェックポイントを保存し、ファイルが存在することを確認します。変更後にもう一度保存して確認します。APIの読み返しは、保存されたという事実ではなく、現在のメモリ内の状態を証明します。レンダリングされたメディア、編集可能なプロジェクト、クリエイティブ承認は、ハンドオフ時に別々の状態として保持します。

MIDI駆動のオーディオの場合、受信ラックのノートマッピングに対してピッチを確認し、結果を試聴します。クリップの作成自体は成功しても、無音になる可能性があります。再構築されたプロジェクトの場合、ネイティブのロードとセーブで検証し、イベントをタイムライン順に並べ替え、サンプルリンクとミュート状態を確認し、エクスポートされた正確なオーディオに予期しない無音がないかチェックして試聴します。XMLパースだけでは、DAWがすべてのクリップを受け入れ、可聴出力を生成したことを証明できません。 新しいコマンドを呼び出す前に、ブリッジの機能ハンドシェイクを確認します。クリエイティブなタスクの副作用として、アップロードやトレーニングデータのテレメトリを有効にしないでください。同意や機能がない場合は、サポートされているローカル制御パスを使用します。

Screen Studio / 生の映像
  → Claude / Codex
  → FFmpeg
  → Remotion
  → ElevenLabs / fal.ai
  → Descript または CapCut

各レイヤーには特定の役割があります。レイヤーをスキップしないでください。一つのツールですべてを行おうとしないでください。

レイヤー1: キャプチャ(Screen Studio / 生の映像)

ソース素材を収集します:

  • Screen Studio: アプリのデモ、コーディングセッション、ブラウザワークフロー向けの洗練されたスクリーンレコーディング
  • 生のカメラ映像: ブログ映像、インタビュー、イベントの録画
  • VideoDB経由のデスクトップキャプチャ: リアルタイムコンテキスト付きのセッション録画(videodbスキルを参照)

出力: 整理のための生ファイル。

レイヤー2: 整理(Claude / Codex)

Claude CodeまたはCodexを使用して:

  • 文字起こしとラベル付け: 文字起こしを生成し、トピックやテーマを特定する
  • 構成を計画する: 何を残し、何をカットし、どの順序が機能するかを決定する
  • 不要なセクションを特定する: 間、脱線、繰り返しのテイクを見つける
  • 編集決定リストを生成する: カットのタイムスタンプ、保持するセグメント
  • FFmpegとRemotionコードのスキャフォールド: コマンドとコンポジションを生成する
プロンプト例:
「これは4時間の録画の文字起こしです。24分のブログに最適な8つのセグメントを特定してください。各セグメントのFFmpegカットコマンドを教えてください。」

このレイヤーは構造に関するものであり、最終的なクリエイティブな好みに関するものではありません。

レイヤー3: 決定論的カット(FFmpeg)

FFmpegは、分割、トリミング、連結、前処理といった退屈だが重要な作業を処理します。

タイムスタンプによるセグメント抽出

ffmpeg -i raw.mp4 -ss 00:12:30 -to 00:15:45 -c copy segment_01.mp4

編集決定リストからの一括カット

#!/bin/bash
# cuts.txt: start,end,label
while IFS=, read -r start end label; do
  ffmpeg -i raw.mp4 -ss "$start" -to "$end" -c copy "segments/${label}.mp4"
done < cuts.txt

セグメントの連結

# ファイルリストを作成
for f in segments/*.mp4; do echo "file '$f'"; done > concat.txt
ffmpeg -f concat -safe 0 -i concat.txt -c copy assembled.mp4

高速編集のためのプロキシ作成

ffmpeg -i raw.mp4 -vf "scale=960:-2" -c:v libx264 -preset ultrafast -crf 28 proxy.mp4

文字起こし用の音声抽出

ffmpeg -i raw.mp4 -vn -acodec pcm_s16le -ar 16000 audio.wav

オーディオレベルのノーマライズ

ffmpeg -i segment.mp4 -af loudnorm=I=-16:TP=-1.5:LRA=11 -c:v copy normalized.mp4

レイヤー4: プログラマブルコンポジション(Remotion)

Remotionは編集の問題を構成可能なコードに変換します。従来のエディターでは扱いにくいものに使用します:

Remotionを使用するタイミング

  • オーバーレイ: テキスト、画像、ブランディング、ローワーサード
  • データ可視化: チャート、統計、アニメーション化された数字
  • モーショングラフィックス: トランジション、説明アニメーション
  • 構成可能なシーン: 動画全体で再利用可能なテンプレート
  • プロダクトデモ: 注釈付きスクリーンショット、UIハイライト

基本的なRemotionコンポジション

import { AbsoluteFill, Sequence, Video, useCurrentFrame } from "remotion";

export const VlogComposition: React.FC = () => {
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill>
      {/* メイン映像 */}
      <Sequence from={0} durationInFrames={300}>
        <Video src="/segments/intro.mp4" />
      </Sequence>

      {/* タイトルオーバーレイ */}
      <Sequence from={30} durationInFrames={90}>
        <AbsoluteFill style={{
          justifyContent: "center",
          alignItems: "center",
        }}>
          <h1 style={{
            fontSize: 72,
            color: "white",
            textShadow: "2px 2px 8px rgba(0,0,0,0.8)",
          }}>
            AI編集スタック
          </h1>
        </AbsoluteFill>
      </Sequence>

      {/* 次のセグメント */}
      <Sequence from={300} durationInFrames={450}>
        <Video src="/segments/demo.mp4" />
      </Sequence>
    </AbsoluteFill>
  );
};

出力のレンダリング

npx remotion render src/index.ts VlogComposition output.mp4

詳細なパターンとAPIリファレンスについては、Remotionドキュメントを参照してください。

レイヤー5: 生成アセット(ElevenLabs / fal.ai)

必要なものだけを生成します。動画全体を生成しようとしないでください。

ElevenLabsによるナレーション

import os
import requests

resp = requests.post(
    f"https://api.elevenlabs.io/v1/text-to-speech/{voice_id}",
    headers={
        "xi-api-key": os.environ["ELEVENLABS_API_KEY"],
        "Content-Type": "application/json"
    },
    json={
        "text": "ナレーションテキストここに入力",
        "model_id": "eleven_turbo_v2_5",
        "voice_settings": {"stability": 0.5, "similarity_boost": 0.75}
    }
)
with open("voiceover.mp3", "wb") as f:
    f.write(resp.content)

fal.aiによる音楽と効果音

fal-ai-mediaスキルを使用:

  • 背景音楽の生成
  • 効果音(動画から音声へのThinkSoundモデル)
  • トランジションサウンド

fal.aiによる生成ビジュアル

存在しないインサートショット、サムネイル、b-rollに使用:

generate(app_id: "fal-ai/nano-banana-pro", input_data: {
  "prompt": "テックブログ用のプロフェッショナルサムネイル、暗い背景、画面上のコード",
  "image_size": "landscape_16_9"
})

VideoDBによる生成オーディオ

VideoDBが設定されている場合:

voiceover = coll.generate_voice(text="ここにナレーション", voice="alloy")
music = coll.generate_music(prompt="コーディングブログ用のローファイ背景音楽", duration=120)
sfx = coll.generate_sound_effect(prompt="微妙なウーッというトランジション")

レイヤー6: 最終仕上げ(Descript / CapCut)

最終レイヤーは人間です。従来のエディターを以下の用途に使用します:

  • ペーシング: 速すぎたり遅すぎたりするカットを調整
  • キャプション: 自動生成後、手動でクリーンアップ
  • カラーグレーディング: 基本的な補正と雰囲気付け
  • 最終オーディオミックス: ナレーション、音楽、効果音のバランス調整
  • エクスポート: プラットフォーム固有のフォーマットと品質設定

ここにテイストが存在します。AIが反復作業を排除し、最終判断はあなたが行います。

ソーシャルメディアリフレーミング

プラットフォームによって異なるアスペクト比が必要です:

プラットフォームアスペクト比解像度
YouTube16:91920x1080
TikTok / Reels9:161080x1920
Instagram フィード1:11080x1080
X / Twitter16:9 または 1:11280x720 または 720x720

FFmpegでリフレーミング

# 16:9 から 9:16(中央クロップ)
ffmpeg -i input.mp4 -vf "crop=ih*9/16:ih,scale=1080:1920" vertical.mp4

# 16:9 から 1:1(中央クロップ)
ffmpeg -i input.mp4 -vf "crop=ih:ih,scale=1080:1080" square.mp4

VideoDBでリフレーミング

from videodb import ReframeMode

# スマートリフレーム(AIによる被写体追跡)
reframed = video.reframe(start=0, end=60, target="vertical", mode=ReframeMode.smart)

シーン検出と自動カット

FFmpegシーン検出

# シーンチェンジを検出(閾値0.3 = 中程度の感度)
ffmpeg -i input.mp4 -vf "select='gt(scene,0.3)',showinfo" -vsync vfr -f null - 2>&1 | grep showinfo

自動カットのための無音検出

# 無音セグメントを見つける(デッドエアをカットするのに便利)
ffmpeg -i input.mp4 -af silencedetect=noise=-30dB:d=2 -f null - 2>&1 | grep silence

ハイライト抽出

Claudeを使用して文字起こしとシーンタイムスタンプを分析:

「このタイムスタンプ付きの文字起こしとこれらのシーンチェンジポイントを基に、ソーシャルメディア向けの最も魅力的な30秒クリップを5つ特定してください。」

各ツールの最適な用途

ツール強み弱み
Claude / Codex整理、計画、コード生成クリエイティブなテイストレイヤーではない
FFmpeg決定論的カット、バッチ処理、フォーマット変換ビジュアル編集UIがない
Remotionプログラマブルオーバーレイ、構成可能なシーン、再利用可能なテンプレート非開発者にとって学習曲線がある
Screen Studioすぐに使える洗練されたスクリーンレコーディング画面キャプチャのみ
ElevenLabs音声、ナレーション、音楽、効果音ワークフローの中心ではない
Descript / CapCut最終的なペーシング、キャプション、仕上げ手動操作が必要で自動化できない

主要原則

  1. 生成ではなく編集する。 このワークフローは実際の映像をカットするためのものであり、プロンプトから作成するためのものではありません。
  2. スタイルの前に構造。 視覚的なものに触れる前に、レイヤー2でストーリーを確定させます。
  3. FFmpegが基盤です。 地味ですが重要です。長時間の映像が扱いやすくなるところです。
  4. 再利用性にはRemotion。 何度も行うなら、Remotionコンポーネントにします。
  5. 選択的に生成する。 AI生成は存在しないアセットにのみ使用し、すべてに使用しないでください。
  6. テイストは最後のレイヤーです。 AIは反復作業を排除し、最終的なクリエイティブな判断はあなたが行います。

ネイティブFusionプリセット

ITO Production v1 は、抑制されたハイライトブルーム、対向するRGB空間オフセット、および輝度/エッジハローを提供します。ネイティブインポート、保存/再開、および2つのソースのビジュアルレビュー後の短いモーションレンダリングチェックの前に、正確なファイルが渡されます。これらはショット固有のレビューが必要な開始値です。ハローは被写体を検出または追跡しません。

ITO V28 には、保存およびネイティブ検証済みのFusionグラフスニペットと冪等なLuaインストーラーが含まれています。これらは技術的な互換性の例であり、推奨されるプロダクションのデフォルトではありません。文書化されたビジュアルの制限は、使用前にチューニングとテイストのレビューが必要です。以前のインポートとレンダリングチェックの範囲については、バンドルの出典を参照してください。

関連スキル

  • fal-ai-media — AI画像、動画、音声生成
  • videodb — サーバーサイド動画処理、インデックス作成、ストリーミング
  • content-engine — プラットフォームネイティブコンテンツ配信

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

関連スキル