Communitygithub.com

VideoDB スキル(JantonioFC/skillsbank)

映像と音声の知覚、インデックス作成、編集を行います。ファイル/URL/ライブストリームを取り込み、視覚・音声インデックスを構築し、タイムスタンプ付きで検索、タイムライン編集、オーバーレイ/字幕の追加、メディア生成、リアルタイムアラートを作成します。

skillsbank) とは?

このスキルは、VideoDB プラットフォーム上で動作する包括的な映像・音声処理エージェントです。ファイル、URL、YouTube、デスクトップキャプチャ、RTSP ライブストリームなど多様なソースからメディアを取り込み、視覚的なシーンインデックス、音声文字起こしインデックス、キーワードインデックスを自動構築します。ユーザーは自然言語でビデオ内の特定の瞬間を検索し、タイムスタンプ付きの再生可能な証拠リンクやクリップを取得できます。さらに、字幕の生成・翻訳・焼き込み、テキスト/画像オーバーレイ、BGM追加、ナレーション合成、タイムライン編集によるプログラム的な動画構成をサポートします。ライブストリーム入力時にはリアルタイムの視覚・音声理解を行い、イベント/アラートを発行して監視ワークフローに活用できます。デスクトップセッションのキャプチャ機能も備え、画面・マイク・システム音声を記録し、セッションサマリーや検索可能なエピソード記憶を生成します。SDK は Python で提供され、`videodb` パッケージを pip インストールするだけで利用開始でき、API キーは環境変数または `.env` ファイルで設定します。すべての主要な処理(トリミング、結合、オーバーレイ、トランスコード、リフレーム)はサーバーサイドで実行されるため、ffmpeg などのローカルツールは原則不要です。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/JantonioFC/skillsbank/tree/HEAD/plugins/antigravity-awesome-skills-claude/skills/videodb

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

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

ドキュメント

VideoDB スキル

知覚+記憶+アクション:動画、ライブストリーム、デスクトップセッション向け

以下のようなタスクでこのスキルを使用します。

使用タイミング

  • ファイル、URL、デスクトップセッション、またはライブストリームからの動画・音声の知覚、インデックス作成、検索、タイムライン編集が必要な場合
  • タイムスタンプ、検索可能な証拠、字幕、クリップ、オーバーレイ、リアルタイム監視アラートを扱うタスク
  • 取り込み、理解、検索、メディアアクションを統合した単一のワークフローが必要な場合

1) デスクトップ知覚

  • デスクトップセッションの開始/停止を管理し、画面、マイク、システム音声をキャプチャ
  • ライブコンテキストをストリーミングし、エピソード的なセッション記憶を保存
  • 発言内容や画面の出来事に基づくリアルタイムアラート/トリガーを実行
  • セッションサマリー、検索可能なタイムライン、再生可能な証拠リンクを生成

2) ビデオ取り込み+ストリーム

  • ファイルまたはURLを取り込み、再生可能なWebストリームリンクを返却
  • トランスコード/正規化:コーデック、ビットレート、fps、解像度、アスペクト比

3) インデックス+検索(タイムスタンプ+証拠)

  • 視覚、音声、キーワードの各インデックスを構築
  • 検索し、タイムスタンプと再生可能な証拠付きで該当箇所を返却
  • 検索結果から自動的にクリップを作成

4) タイムライン編集+生成

  • 字幕:生成、翻訳、焼き込み
  • オーバーレイ:テキスト/画像/ブランド、モーションキャプション
  • オーディオ:BGM、ナレーション、吹き替え
  • タイムライン操作によるプログラム的な合成とエクスポート

5) ライブストリーム(RTSP)+監視

  • RTSP/ライブフィードに接続
  • リアルタイムの視覚・音声理解を実行し、監視ワークフロー向けにイベント/アラートを発行

一般的な入力

  • ローカルファイルパス、公開URL、またはRTSP URL
  • デスクトップキャプチャ要求:開始 / 停止 / セッション要約
  • 目的の操作:理解のためのコンテキスト取得、トランスコード仕様、インデックス仕様、検索クエリ、クリップ範囲、タイムライン編集、アラートルール

一般的な出力

  • ストリームURL
  • タイムスタンプと証拠リンクを含む検索結果
  • 生成されたアセット:字幕、音声、画像、クリップ
  • ライブストリーム向けイベント/アラートペイロード
  • デスクトップセッションサマリーと記憶エントリ

正規プロンプト(例)

  • 「デスクトップキャプチャを開始し、パスワードフィールドが表示されたらアラートを出して。」
  • 「セッションを録画し、終了時に実行可能なサマリーを生成して。」
  • 「このファイルを取り込み、再生可能なストリームリンクを返して。」
  • 「このフォルダをインデックスし、人物が写っているすべてのシーンを見つけて、タイムスタンプを返して。」
  • 「字幕を生成し、焼き込んで、軽めのBGMを追加して。」
  • 「このRTSP URLに接続し、人物がゾーンに入ったらアラートを出して。」

Pythonコードの実行

VideoDBコードを実行する前に、プロジェクトディレクトリに移動し、環境変数を読み込みます。

from dotenv import load_dotenv
load_dotenv(".env")

import videodb
conn = videodb.connect()

これにより、VIDEO_DB_API_KEY が以下の場所から読み込まれます。

  1. 環境変数(すでにエクスポートされている場合)
  2. カレントディレクトリのプロジェクト .env ファイル

キーが不足している場合、videodb.connect() は自動的に AuthenticationError を発生させます。

短いインラインコマンドで十分な場合は、スクリプトファイルを作成しないでください。

インラインPython(python -c "...")を記述する場合は、常に適切にフォーマットされたコードを使用し、セミコロンで文を区切って読みやすく保ってください。約3文より長い場合は、代わりにヒアドキュメントを使用します。

python << 'EOF'
from dotenv import load_dotenv
load_dotenv(".env")

import videodb
conn = videodb.connect()
coll = conn.get_collection()
print(f"Videos: {len(coll.get_videos())}")
EOF

セットアップ

ユーザーが「videodbをセットアップして」などと依頼した場合:

1. SDKのインストール

pip install "videodb[capture]" python-dotenv

Linuxで videodb[capture] が失敗した場合は、capture拡張なしでインストールします。

pip install videodb python-dotenv

2. APIキーの設定

ユーザーは 以下のいずれかの方法 で VIDEO_DB_API_KEY を設定する必要があります。

  • ターミナルでエクスポート(Claude起動前):export VIDEO_DB_API_KEY=your-key
  • プロジェクト .env ファイル:VIDEO_DB_API_KEY=your-key をプロジェクトの .env ファイルに保存

無料のAPIキーは https://console.videodb.io で取得できます(アップロード50回無料、クレジットカード不要)。

APIキーの読み取り、書き込み、直接処理は絶対に行わないでください。 常にユーザー自身に設定させてください。

クイックリファレンス

メディアのアップロード

# URL
video = coll.upload(url="https://example.com/video.mp4")

# YouTube
video = coll.upload(url="https://www.youtube.com/watch?v=VIDEO_ID")

# ローカルファイル
video = coll.upload(file_path="/path/to/video.mp4")

文字起こし+字幕

# force=True は動画がすでにインデックスされている場合のエラーをスキップします
video.index_spoken_words(force=True)
text = video.get_transcript_text()
stream_url = video.add_subtitle()

動画内の検索

from videodb.exceptions import InvalidRequestError

video.index_spoken_words(force=True)

# search() は結果が見つからない場合、InvalidRequestError を発生させます。
# 常に try/except でラップし、「結果なし」を空として扱います。
try:
    results = video.search("product demo")
    shots = results.get_shots()
    stream_url = results.compile()
except InvalidRequestError as e:
    if "No results found" in str(e):
        shots = []
    else:
        raise

シーン検索

import re
from videodb import SearchType, IndexType, SceneExtractionType
from videodb.exceptions import InvalidRequestError

# index_scenes() には force パラメータがありません。シーンインデックスが既に存在するとエラーが発生します。
# エラーから既存のインデックスIDを抽出します。
try:
    scene_index_id = video.index_scenes(
        extraction_type=SceneExtractionType.shot_based,
        prompt="このシーンの視覚的な内容を説明してください。",
    )
except Exception as e:
    match = re.search(r"id\s+([a-f0-9]+)", str(e))
    if match:
        scene_index_id = match.group(1)
    else:
        raise

# score_threshold を使用して低関連ノイズをフィルタリングします(推奨: 0.3以上)
try:
    results = video.search(
        query="ホワイトボードに書いている人",
        search_type=SearchType.semantic,
        index_type=IndexType.scene,
        scene_index_id=scene_index_id,
        score_threshold=0.3,
    )
    shots = results.get_shots()
    stream_url = results.compile()
except InvalidRequestError as e:
    if "No results found" in str(e):
        shots = []
    else:
        raise

タイムライン編集

重要: タイムラインを構築する前に、必ずタイムスタンプを検証してください。

  • start は 0 以上である必要があります(負の値は黙って受け入れられますが、壊れた出力を生成します)
  • start は end より小さい必要があります
  • end は video.length 以下である必要があります
from videodb.timeline import Timeline
from videodb.asset import VideoAsset, TextAsset, TextStyle

timeline = Timeline(conn)
timeline.add_inline(VideoAsset(asset_id=video.id, start=10, end=30))
timeline.add_overlay(0, TextAsset(text="終", duration=3, style=TextStyle(fontsize=36)))
stream_url = timeline.generate_stream()

ビデオのトランスコード(解像度/品質変更)

from videodb import TranscodeMode, VideoConfig, AudioConfig

# サーバーサイドで解像度、品質、アスペクト比を変更
job_id = conn.transcode(
    source="https://example.com/video.mp4",
    callback_url="https://example.com/webhook",
    mode=TranscodeMode.economy,
    video_config=VideoConfig(resolution=720, quality=23, aspect_ratio="16:9"),
    audio_config=AudioConfig(mute=False),
)

アスペクト比のリフレーム(ソーシャルプラットフォーム向け)

警告: reframe() は遅いサーバーサイド操作です。長い動画の場合は数分かかり、タイムアウトする可能性があります。ベストプラクティス:

  • 可能な限り start/end を使用して短いセグメントに制限する
  • フルレングスの動画の場合は、callback_url を使用して非同期処理を行う
  • まず Timeline で動画をトリミングし、その短い結果をリフレームする
from videodb import ReframeMode

# 常に短いセグメントのリフレームを優先:
reframed = video.reframe(start=0, end=60, target="vertical", mode=ReframeMode.smart)

# フルレングス動画の非同期リフレーム(Noneを返し、結果はWebhook経由):
video.reframe(target="vertical", callback_url="https://example.com/webhook")

# プリセット: "vertical" (9:16), "square" (1:1), "landscape" (16:9)
reframed = video.reframe(start=0, end=60, target="square")

# カスタムサイズ
reframed = video.reframe(start=0, end=60, target={"width": 1280, "height": 720})

生成メディア

image = coll.generate_image(
    prompt="山の上の夕日",
    aspect_ratio="16:9",
)

エラーハンドリング

from videodb.exceptions import AuthenticationError, InvalidRequestError

try:
    conn = videodb.connect()
except AuthenticationError:
    print("VIDEO_DB_API_KEY を確認してください")

try:
    video = coll.upload(url="https://example.com/video.mp4")
except InvalidRequestError as e:
    print(f"アップロード失敗: {e}")

よくある落とし穴

シナリオエラーメッセージ解決策
既にインデックスされた動画を再インデックスSpoken word index for video already existsvideo.index_spoken_words(force=True) を使用して既存の場合はスキップ
シーンインデックスが既に存在Scene index with id XXXX already existsエラーから re.search(r"id\s+([a-f0-9]+)", str(e)) で既存の scene_index_id を抽出
検索で一致なしInvalidRequestError: No results found例外をキャッチし、空の結果として扱う(shots = [])
リフレームがタイムアウト長い動画で無期限にブロックstart/end でセグメントを制限するか、callback_url を渡して非同期処理
タイムラインに負のタイムスタンプ壊れたストリームを黙って生成VideoAsset 作成前に常に start >= 0 を検証
generate_video() / create_collection() が失敗Operation not allowed または maximum limitプラン制限のある機能 — ユーザーにプラン制限を通知

追加ドキュメント

リファレンスドキュメントは、この SKILL.md ファイルと同じディレクトリの reference/ にあります。必要に応じて Glob ツールを使用して場所を特定してください。

画面録画(デスクトップキャプチャ)

録画セッション中に WebSocket イベントをキャプチャするには ws_listener.py を使用します。デスクトップキャプチャは macOS のみ 対応です。

クイックスタート

  1. リスナー起動: python scripts/ws_listener.py &
  2. WebSocket ID取得: cat /tmp/videodb_ws_id
  3. キャプチャコード実行(完全なワークフローは reference/capture.md を参照)
  4. イベント出力先: /tmp/videodb_events.jsonl

イベントのクエリ

import json
events = [json.loads(l) for l in open("/tmp/videodb_events.jsonl")]

# すべての文字起こしを取得
transcripts = [e["data"]["text"] for e in events if e.get("channel") == "transcript"]

# 過去5分間の視覚的な説明を取得
import time
cutoff = time.time() - 300
recent_visual = [e for e in events 
                 if e.get("channel") == "visual_index" and e["unix_ts"] > cutoff]

ユーティリティスクリプト

完全なキャプチャワークフローについては、reference/capture.md を参照してください。

VideoDB がその操作をサポートしている場合は、ffmpeg、moviepy、その他のローカルエンコードツールを使用しないでください。 以下はすべて VideoDB によってサーバーサイドで処理されます。トリミング、クリップの結合、音声や音楽のオーバーレイ、字幕の追加、テキスト/画像オーバーレイ、トランスコード、解像度変更、アスペクト比変換、プラットフォーム要件に合わせたリサイズ、文字起こし、メディア生成。ローカルツールにフォールバックするのは、reference/editor.md の制限事項に記載されている操作(トランジション、速度変更、クロップ/ズーム、カラーグレーディング、音量ミキシング)のみです。

何を使うべきか

問題VideoDBの解決策
プラットフォームが動画のアスペクト比や解像度を拒否video.reframe() または conn.transcode() で VideoConfig を使用
Twitter/Instagram/TikTok 用に動画をリサイズvideo.reframe(target="vertical") または target="square"
解像度を変更(例:1080p → 720p)conn.transcode() で VideoConfig(resolution=720)
動画に音声/音楽をオーバーレイTimeline 上の AudioAsset
字幕を追加video.add_subtitle() または CaptionAsset
クリップの結合/トリミングTimeline 上の VideoAsset
ナレーション、音楽、効果音を生成coll.generate_voice()、generate_music()、generate_sound_effect()

リポジトリ

https://github.com/video-db/skills

メンテナンス元: VideoDB

制限事項

  • このスキルは、タスクが上記の範囲に明確に一致する場合にのみ使用してください。
  • 出力を環境固有の検証、テスト、専門家レビューの代替として扱わないでください。
  • 必要な入力、権限、安全境界、成功基準が不足している場合は、停止して明確化を求めてください。

Individual skills in this repo

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

JantonioFC/skillsbank

AI-powered image editing with style transfer and object removal

JantonioFC/skillsbank

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

JantonioFC/skillsbank

Analise e auditoria de editais de leilao judicial e extrajudicial. Riscos ocultos, clausulas perigosas, debitos, ocupante e classificacao da oportunidade.

JantonioFC/skillsbank

Embed Photopea in web apps using photopea.js. Covers embedding, file I/O, scripting, exporting, layers, text, filters, and the full Photoshop-compatible API.

JantonioFC/skillsbank

Best practices for Remotion - Video creation in React

JantonioFC/skillsbank

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

JantonioFC/skillsbank

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

JantonioFC/skillsbank

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

JantonioFC/skillsbank

Upload, stream, search, edit, transcribe, and generate AI video and audio using the VideoDB SDK.

JantonioFC/skillsbank

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

JantonioFC/skillsbank

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

JantonioFC/skillsbank

Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results, agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending

JantonioFC/skillsbank

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

JantonioFC/skillsbank

When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' 'audience targeting,' 'Google Ads,' 'Facebook ads,'...

JantonioFC/skillsbank

Create AI avatar and talking head videos with OmniHuman, Fabric, PixVerse via inference.sh CLI. Models: OmniHuman 1.5, OmniHuman 1.0, Fabric 1.0, PixVerse Lipsync. Capabilities: audio-driven avatars, lipsync videos, talking head generation, virtual presenters. Use for: AI presenters, expla...

JantonioFC/skillsbank

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awarene...

JantonioFC/skillsbank

Generate AI videos with Google Veo, Seedance, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 1.5 Pro, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, lipsync, avatar animation, video upscaling, fole...

JantonioFC/skillsbank

Production-ready CI/CD configurations for Playwright — GitHub Actions, GitLab CI, CircleCI, Azure DevOps, Jenkins, Docker, parallel sharding, reporting, code coverage, and global setup/teardown.

JantonioFC/skillsbank

Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.

JantonioFC/skillsbank

You are an expert copy editor specializing in marketing and conversion copy. Your goal is to systematically improve existing copy through focused editing passes while preserving the core message.

関連スキル