mcpField
V
video-trimming

video-trimming

github.com/eachlabsクリエイティブ・メディア44305 回インストール今日更新
リポジトリ

video-trimming について

video-trimmingは、each::senseで動画をカット・分割するスキルです。タイムスタンプ指定の切り出し、無音やシーンに応じた編集、SNS向けクリップの一括作成を必要とするクリエイターや編集者向けです。

主な機能

  1. 01長さまたはタイムスタンプでカット
  2. 02区間やハイライトの抽出
  3. 03冒頭・末尾・無音の除去
  4. 04シーン変化に応じた分割
  5. 05動画の一括処理
  6. 06SNS向け尺やループ動画の作成

活用シーン

  1. 01タイムスタンプ指定でインタビューを切り出す
  2. 02録画の無音部分を削除する
  3. 03SNS向けの短い動画を作る
  4. 04同じルールで動画を一括編集する

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/eachlabs/skills --skill video-trimming

インストール後、Claude Code で/video-trimmingを入力して読み込まれたか確認します。

同梱ファイルreferences/SSE-EVENTS.md

詳細

動画のトリミング

each::sense を使って、動画をトリミング、カット、分割します。このスキルでは、セグメントの抽出、シーン検出、無音部分の削除、ソーシャルメディア向けの最適化を目的とした一括処理など、正確な動画編集操作を実行できます。

機能

  • 正確なトリミング:指定したタイムスタンプまたは再生時間で動画をカットします
  • セグメントの抽出:動画の途中から特定の部分を抽出します
  • イントロ/アウトロの削除:不要な冒頭や末尾を取り除き、動画を整えます
  • 動画の分割:長い動画を複数の短いクリップに分割します
  • ハイライトの抽出:長いコンテンツから重要な場面を取り出します
  • 無音部分の削除:無音や間を自動で検出して削除します
  • シーン検出:映像のシーンの変化に基づいてスマートにカットします
  • ソーシャルメディア向けの最適化:プラットフォーム固有の長さ(15 秒、30 秒、60 秒)にトリミングします
  • ループに適した編集:ソーシャルメディア向けのシームレスなループを作成します
  • 一括処理:一貫したトリミングルールで複数の動画を処理します

クイックスタート

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Trim this video to the first 30 seconds"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/my-video.mp4"]
  }'

トリミング操作リファレンス

操作説明使用例
再生時間のトリミング動画の冒頭から指定した長さにカットしますソーシャルメディア向けクリップ
タイムスタンプによるトリミング開始時刻と終了時刻の間を抽出しますインタビューのセグメント
イントロの削除最初の N 秒を削除します録画の不要部分を整理
アウトロの削除最後の N 秒を削除しますエンドカードの削除
セグメントの抽出途中の部分を取り出しますハイライト動画
シーン分割映像の変化に基づいて分割しますチャプターの作成
無音部分の削除無音部分をカットしますポッドキャストの編集
一括トリミング複数の動画を処理しますコンテンツの再利用

使用例

1. 動画を指定した長さにトリミングする

動画の冒頭から指定した長さにトリミングします。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Trim this video to exactly 60 seconds, keeping the first minute only"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/full-video.mp4"]
  }'
2. 動画の途中からセグメントを切り出す

タイムスタンプを使って、動画の途中から特定の部分を抽出します。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Cut out the segment from 1:30 to 2:45 of this video. I want just that middle portion as a standalone clip."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/interview.mp4"]
  }'
3. イントロとアウトロを削除する

不要なイントロとアウトロの部分を削除して、動画を整えます。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the first 10 seconds (intro) and last 15 seconds (outro) from this video. Keep only the main content in the middle."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/youtube-video.mp4"]
  }'
4. 動画を複数のクリップに分割する

長い動画を複数の短いセグメントに分割します。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Split this 5-minute video into five 1-minute clips. Each clip should be a separate output."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/long-video.mp4"]
  }'
5. ハイライトを抽出する

長い動画から見どころを取り出します。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract the most engaging or action-packed moments from this video. Create a highlight reel of the best 30 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/sports-footage.mp4"]
  }'
6. 無音や間を削除する

動画内の無音部分を自動で検出して削除します。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove all silent portions and dead air from this video. Cut out any segments where there is no speaking or significant audio for more than 2 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/podcast-recording.mp4"]
  }'
7. スマートなシーン検出カット

AI を使ってシーンの変化を検出し、それに応じて動画を分割します。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Analyze this video and split it into separate clips based on scene changes. Each time the visual scene changes significantly, create a new clip."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/multi-scene-video.mp4"]
  }'
8. 複数の動画を一括でトリミングする

セッションの継続性を活用し、同じトリミングルールで複数の動画を処理します。

# First video
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Trim this video to 30 seconds from the start. We will process multiple videos with the same rule."}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "batch-trim-001",
    "mode": "eco",
    "video_urls": ["https://example.com/video1.mp4"]
  }'

# Second video (same session)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Apply the same 30-second trim to this video"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "batch-trim-001",
    "mode": "eco",
    "video_urls": ["https://example.com/video2.mp4"]
  }'

# Third video (same session)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "And the same for this one"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "batch-trim-001",
    "mode": "eco",
    "video_urls": ["https://example.com/video3.mp4"]
  }'
9. ソーシャルメディア向けの長さにトリミングする

特定のソーシャルメディアプラットフォームの要件に合わせて動画を最適化します。

# Instagram Reels / TikTok (15 seconds)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Trim this video to exactly 15 seconds for Instagram Reels. Pick the most engaging 15-second segment."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/content.mp4"]
  }'

# YouTube Shorts (30 seconds)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a 30-second clip optimized for YouTube Shorts from this video. Focus on the hook at the start."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/content.mp4"]
  }'

# Standard social clip (60 seconds)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Trim to 60 seconds maximum for Twitter/X. Keep the most important content."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/content.mp4"]
  }'
10. ループに適したトリミング

ソーシャルメディア向けに、シームレスにループする動画クリップを作成します。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Trim this video to create a seamless loop. Find a segment where the end flows naturally back to the beginning, ideally 5-10 seconds long for a satisfying social media loop."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/loopable-content.mp4"]
  }'

ベストプラクティス

トリミングのヒント
  • 具体的に指定する:可能な場合は、正確なタイムスタンプ(MM:SS または HH:MM:SS)を指定します
  • 内容を説明する:タイムスタンプがわからない場合は、希望する箇所を説明します(「握手をする場面」など)
  • 余裕を持たせる:唐突な切り替わりを避けるため、カットの前後に少し余裕を持たせます
  • 音声を確認する:文や音符の途中でカットされないようにします
パフォーマンスの最適化
  • 一括処理や素早い反復には eco モードを使用します
  • 最終的な書き出しや品質が重要なコンテンツには max モードを使用します
  • 一括処理の前に短い動画を処理して、設定を確認します
ソーシャルメディアのガイドライン
プラットフォーム推奨される長さ備考
TikTok15~60 秒最初の 3 秒で視聴者を引きつけます
Instagram Reels15~30 秒最大 90 秒
YouTube Shorts30~60 秒60 秒未満が必須です
Twitter/X30~60 秒標準アカウントでは最大 2:20
LinkedIn30~90 秒ビジネス向けの内容

動画のトリミングに関するプロンプトのヒント

動画のトリミングを依頼する際は、次の詳細を含めてください。

  1. 正確なタイミング:「0:45から1:30まで」または「最初の30秒」
  2. 内容の参照:「インタビューの部分」または「製品デモが始まるところ」
  3. 出力要件:「音声を残す」または「3つの個別のクリップが必要」
  4. 対象プラットフォーム:「Instagram Reels向け」または「YouTube Shorts向けに最適化」
  5. 品質の希望:最終版にはmode: "max"、下書きにはmode: "eco"を使用します
プロンプトの構成例
"[Action] this video [timing/selection criteria].
[Additional requirements like output format, platform, etc.]"

例:

  • 「この動画を1:00から始まる30秒の長さにトリミングしてください」
  • 「この動画の異なる部分から、15秒のハイライトを3つ抽出してください」
  • 「最初の5秒と最後の10秒を削除してください」

モードの選択

「速さと安さを重視しますか、それとも高品質を重視しますか?」

モード最適な用途速度品質
max最終エクスポート、クライアントへの納品、品質が重要な用途遅め最高
ecoクイックプレビュー、バッチ処理、下書きの反復作業速め良好

複数ターンの編集セッション

session_idを使用して、動画編集を繰り返し調整します。

# Initial trim
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Trim this video to the segment from 0:30 to 1:30"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "edit-session-001",
    "video_urls": ["https://example.com/raw-footage.mp4"]
  }'

# Adjust the trim
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Actually, extend the end by 10 more seconds to include the conclusion"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "edit-session-001"
  }'

# Request additional version
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a shorter 15-second version of this same segment for Instagram"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "edit-session-001"
  }'

エラー処理

エラー原因解決策
Failed to create prediction: HTTP 422残高不足eachlabs.aiでチャージしてください
タイムアウト長時間の動画処理クライアントのタイムアウトを最低10分に設定してください
無効なタイムスタンプタイムスタンプが動画の長さを超えていますまず動画の長さを確認してください
サポートされていない形式動画コーデックがサポートされていませんまずMP4/H.264に変換してください

関連スキル

  • each-sense - コアAPIドキュメント
  • video-generation - 動画を一から作成
  • video-editing - 高度な動画編集操作
  • video-to-video - 動画の変換とスタイル転送

コメント