Skip to content
cccskills
FreePublished on GitHub

youtube-clipper

YouTube/マルチプラットフォーム動画からAIでハイライトを抽出し、 バイリンガル字幕付きクリップを自動生成するスキル。「動画からクリップを切り出して」「ハイライトを抽出」「字幕付きクリップ」等で発動。

The English summary is being prepared. Showing the original description.

Works withYouTubeGemini

Run score Not tested

See how to install

Files included (12)

  • SKILL.md5.0 KB
  • agents/openai.yaml157 B
  • scripts/chapter_analyzer.py4.7 KB
  • scripts/clip_extractor.py7.7 KB
  • scripts/clipper.py12.9 KB
  • scripts/downloader.py5.8 KB
  • scripts/main.py450 B
  • scripts/pysrt.py3.1 KB
  • scripts/subtitle_translator.py5.0 KB
  • scripts/transcriber.py5.4 KB
  • SKILL.en.md4.3 KB
  • SKILL.es.md4.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

/youtube-clipper - 動画ハイライト抽出 & クリップ生成

エントリーポイント

python skills/youtube-clipper/scripts/main.py --url "https://..."

概要

YouTube/Vimeo/X等の動画から、AIで意味的にハイライトを分析し、 バイリンガル字幕付きのクリップを自動生成します。

クイックスタート

# YouTube動画からクリップ抽出
python skills/youtube-clipper/scripts/clipper.py \
  --url "https://www.youtube.com/watch?v=xxxxx"

# ローカル動画にも対応
python skills/youtube-clipper/scripts/clipper.py \
  --file /path/to/local.mp4

# 自動選択モード(スコア0.8以上のチャプターを自動抽出)
python skills/youtube-clipper/scripts/clipper.py \
  --url "https://..." --auto-select "score>0.8"

ワークフロー

入力(URL or ローカルファイル)
  ↓
Step 1: 動画DL + 字幕取得(字幕なし → Gemini音声認識)
  ↓
Step 2: AIチャプター分析(セマンティック分割 + 要約 + スコア)
  ↓
Step 3: ユーザーがハイライト選択(番号/自然言語/スコアフィルタ)
  ↓
Step 4: クリップ抽出 + 字幕翻訳 + 焼き込み
  ↓
出力: clips/ + chapters.json + SNSサマリー

パラメータ

パラメータデフォルト説明
--url-YouTube/Vimeo/X等のURL
--file-ローカル動画ファイル
--outputoutput/clips/出力ディレクトリ
--resolution1080動画品質(720/1080/best)
--target-langja翻訳先言語
--burn-subtitlesfalse字幕焼き込み
--auto-select-自動選択条件(score>0.8, all)
--chapters-onlyfalseチャプター分析のみ(クリップ抽出しない)

出力構造

output/clips/YYYYMMDD_HHMMSS_{video_id}/
├── metadata.json
├── chapters.json
├── subtitles/
│   ├── original.srt
│   └── translated_ja.srt
├── clips/
│   ├── clip_01/
│   │   ├── clip_01.mp4
│   │   ├── clip_01_subtitled.mp4
│   │   ├── original.srt
│   │   ├── translated_ja.srt
│   │   ├── bilingual.srt
│   │   └── summary.json
│   └── ...
└── remotion_input.json

対応プラットフォーム

YouTube, Vimeo, X/Twitter, ニコニコ動画, Dailymotion等(yt-dlp対応範囲)

字幕なし動画

字幕が利用できない場合、FFmpegで音声を抽出し、 Gemini 3.0 Flash Previewで文字起こし + タイムスタンプ生成を行います。

コスト目安

処理コスト
動画DL$0
Gemini文字起こし(10分動画)~$0.02
チャプター分析~$0.01
字幕翻訳~$0.005
合計~$0.035/動画

トラブルシューティング

YouTubeダウンロードが失敗する

ヘッドレスサーバーからはYouTubeのbot検出で弾かれることがあります。 cookieファイルを設定してください:

# 方法1: cookieファイルを指定
export YTDLP_COOKIES=/path/to/cookies.txt    # Mac/Linux/WSL

# 方法2: ブラウザからcookieを取得(ローカルPC向け)
export YTDLP_COOKIES_FROM_BROWSER=chrome    # Mac/Linux/WSL

cookieファイルの取得方法:

  1. ブラウザ拡張「Get cookies.txt LOCALLY」等でYouTubeのcookieをエクスポート
  2. Netscape形式のcookies.txtをサーバーにアップロード
  3. 環境変数 YTDLP_COOKIES にパスを指定

yt-dlpが見つからない

uv add yt-dlp

FFmpegが見つからない

sudo apt-get install -y ffmpeg    # Ubuntu/Debian
# macOS: brew install ffmpeg
# Windows: winget install ffmpeg

deno(JSランタイム)が必要と言われる

yt-dlpのYouTube抽出にdeno JSランタイムが必要な場合があります。

⚠️ セキュリティ注意: curl ... | sh はリモートスクリプトを無検証で実行します。 可能なら次の代替を優先してください:

# パイプ実行に同意した上で
curl -fsSL https://deno.land/install.sh | sh    # Mac/Linux/WSL
export PATH="$HOME/.deno/bin:$PATH"    # Mac/Linux/WSL

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

A/Bテストや実験の設計・実装を支援するスキル。 「A/Bテストを設計して」「スプリットテストしたい」「仮説を立ててテストしたい」「バリアントを比較」等のリクエストで発動。 トラッキング実装は analytics-tracking を参照。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

マルチエージェントシステムのアーキテクチャ設計ツールキット。 「エージェントを設計して」「マルチエージェント構成」「エージェントのアーキテクチャ」「オーケストレーション設計」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

ai-agent-campのローカル環境セットアップを確認するスキル。 「セットアップ確認」「環境チェック」「初期設定できてる?」「インストール確認」「依存関係チェック」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

ai-agent-campのスラッシュコマンドをCodexでルーティングするスキル。 「/start-0-1を実行」「スラッシュコマンドを使いたい」「コマンドルーティング」「Cursorのコマンドを使いたい」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

ai-agent-campの環境変数・認証情報を安全に管理するスキル。 「APIキーを設定」「.envを管理」「環境変数の設定」「credential managerを使いたい」「秘密情報の管理」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

ai-agent-campリポジトリの案内・オリエンテーションスキル。 「リポジトリ案内」「次のレッスンは?」「どこから始める」「ツールの違い」「aiagent概要」等のリクエストで発動。

The English summary is being prepared. Showing the original description.

minicoohei/ai-agent-camp346Updated Oct 7, 2026

See all skills by minicoohei

Report a problem with this skill