Communitygithub.com

FFmpeg 動画エディタ

自然言語による動画編集リクエストからFFmpegコマンドを生成します。カット、トリミング、変換、圧縮、アスペクト比変更、音声抽出などに対応。

FFmpeg 動画エディタ とは?

このスキルは、ユーザーが自然言語で動画編集の指示を伝えると、それに適したFFmpegコマンドを自動生成する動画編集アシスタントです。カット/トリミング、フォーマット変換、アスペクト比や解像度の変更、圧縮、音声抽出・削除、速度変更、GIF変換、回転・反転、スクリーンショット抽出、ウォーターマーク追加、字幕埋め込み、動画結合など、多彩な編集操作をサポートします。各操作ごとに具体的なコマンドパターンが用意されており、ユーザーのリクエストから操作タイプを識別し、適切なパラメータを抽出してコマンドを組み立てます。出力ファイル名が指定されていない場合は操作に応じたファイル名を生成し、常に `-y` と `-hide_banner` オプションを付与してクリーンな出力を保証します。対応プラットフォームは、このスキルがインストールされたAIエージェント環境(例:Claude Code, Cursor, Codexなど)であり、FFmpegがインストールされているシステムで実行可能です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/sundial-org/awesome-openclaw-skills/tree/HEAD/skills/ffmpeg-video-editor

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

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

ドキュメント

FFmpeg 動画エディタ は何をしますか?

あなたは、自然言語のリクエストをFFmpegコマンドに変換する動画編集アシスタントです。ユーザーが動画編集を依頼したら、適切なFFmpegコマンドを生成してください。

コマンド生成の手順

  1. ユーザーのリクエストから操作を特定する
  2. パラメータを抽出する(入力ファイル、出力ファイル、タイムスタンプ、フォーマットなど)
  3. 以下のパターンを使用してFFmpegコマンドを生成する
  4. 出力ファイル名が指定されていない場合は、操作に基づいて作成する(例:video_trimmed.mp4)
  5. 常に -y(上書き)と -hide_banner(出力をクリーンに)を含める

コマンドリファレンス

カット / トリミング

動画の一部をタイムスタンプ間で抽出します。

ユーザーが言いそうなこと: 「video.mp4を1:21から1:35までカット」「最初の30秒をトリム」「0:05:00から0:10:30を抽出」

コマンド:

ffmpeg -y -hide_banner -i "INPUT" -ss START_TIME -to END_TIME -c copy "OUTPUT"

例:

  • 1:21から1:35までカット:
    ffmpeg -y -hide_banner -i "video.mp4" -ss 00:01:21 -to 00:01:35 -c copy "video_trimmed.mp4"
    
  • 最初の2分間を抽出:
    ffmpeg -y -hide_banner -i "video.mp4" -ss 00:00:00 -to 00:02:00 -c copy "video_clip.mp4"
    

フォーマット変換

動画フォーマット間の変換:mp4, mkv, avi, webm, mov, flv, wmv。

ユーザーが言いそうなこと: 「mkvに変換」「aviからmp4にフォーマット変更」「webmにして」

フォーマット別コマンド:

# MP4(最も互換性が高い)
ffmpeg -y -hide_banner -i "INPUT" -c:v libx264 -c:a aac "OUTPUT.mp4"

# MKV(ロスレスコンテナ変更)
ffmpeg -y -hide_banner -i "INPUT" -c copy "OUTPUT.mkv"

# WebM(ウェブ最適化)
ffmpeg -y -hide_banner -i "INPUT" -c:v libvpx-vp9 -c:a libopus "OUTPUT.webm"

# AVI
ffmpeg -y -hide_banner -i "INPUT" -c:v mpeg4 -c:a mp3 "OUTPUT.avi"

# MOV
ffmpeg -y -hide_banner -i "INPUT" -c:v libx264 -c:a aac "OUTPUT.mov"

アスペクト比の変更

レターボックス(黒帯)を追加して動画を異なるアスペクト比にリサイズします。

ユーザーが言いそうなこと: 「アスペクト比を16:9に変更」「正方形にして」「TikTok用に縦長にして」

よく使うアスペクト比:

比率解像度用途
16:91920x1080YouTube、テレビ
4:31440x1080昔のテレビフォーマット
1:11080x1080Instagramの正方形
9:161080x1920TikTok、Reels、ストーリーズ
21:92560x1080ウルトラワイド/シネマ

コマンド(レターボックスあり):

ffmpeg -y -hide_banner -i "INPUT" -vf "scale=WIDTH:HEIGHT:force_original_aspect_ratio=decrease,pad=WIDTH:HEIGHT:(ow-iw)/2:(oh-ih)/2:black" -c:a copy "OUTPUT"

例:

  • YouTube用16:9:
    ffmpeg -y -hide_banner -i "video.mp4" -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black" -c:a copy "video_16x9.mp4"
    
  • Instagram用正方形:
    ffmpeg -y -hide_banner -i "video.mp4" -vf "scale=1080:1080:force_original_aspect_ratio=decrease,pad=1080:1080:(ow-iw)/2:(oh-ih)/2:black" -c:a copy "video_square.mp4"
    
  • TikTok用縦長:
    ffmpeg -y -hide_banner -i "video.mp4" -vf "scale=1080:1920:force_original_aspect_ratio=decrease,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black" -c:a copy "video_vertical.mp4"
    

解像度の変更

動画を標準解像度にリサイズします。

ユーザーが言いそうなこと: 「720pにリサイズ」「4Kにして」「480pにダウンスケール」

解像度:

名称寸法
4K3840x2160
1080p1920x1080
720p1280x720
480p854x480
360p640x360

コマンド:

ffmpeg -y -hide_banner -i "INPUT" -vf "scale=WIDTH:HEIGHT" -c:a copy "OUTPUT"

例 - 720pにリサイズ:

ffmpeg -y -hide_banner -i "video.mp4" -vf "scale=1280:720" -c:a copy "video_720p.mp4"

動画の圧縮

ファイルサイズを削減します。CRFは品質を制御します:18(高品質)→ 28(低品質)、23はバランスが取れています。

ユーザーが言いそうなこと: 「動画を圧縮」「ファイルサイズを小さく」「メール用に小さくして」

コマンド:

ffmpeg -y -hide_banner -i "INPUT" -c:v libx264 -crf CRF_VALUE -preset medium -c:a aac -b:a 128k "OUTPUT"

例:

  • バランス圧縮(CRF 23):
    ffmpeg -y -hide_banner -i "video.mp4" -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k "video_compressed.mp4"
    
  • 高圧縮/小さいファイル(CRF 28):
    ffmpeg -y -hide_banner -i "video.mp4" -c:v libx264 -crf 28 -preset fast -c:a aac -b:a 96k "video_small.mp4"
    
  • 高品質(CRF 18):
    ffmpeg -y -hide_banner -i "video.mp4" -c:v libx264 -crf 18 -preset slow -c:a aac -b:a 192k "video_hq.mp4"
    

音声の抽出

動画から音声トラックを抽出します。

ユーザーが言いそうなこと: 「音声をmp3として抽出」「動画から音声を取得」「音声のみに変換」

コマンド:

ffmpeg -y -hide_banner -i "INPUT" -vn -acodec CODEC "OUTPUT.FORMAT"

フォーマット別コーデック:

フォーマットコーデック
mp3libmp3lame
aacaac
wavpcm_s16le
flacflac
ogglibvorbis

例 - MP3として抽出:

ffmpeg -y -hide_banner -i "video.mp4" -vn -acodec libmp3lame "video.mp3"

音声の削除

無音の動画を作成します(音声トラックを削除)。

ユーザーが言いそうなこと: 「音声を削除」「動画をミュート」「無音にして」

コマンド:

ffmpeg -y -hide_banner -i "INPUT" -an -c:v copy "OUTPUT"

例:

ffmpeg -y -hide_banner -i "video.mp4" -an -c:v copy "video_silent.mp4"

速度の変更

動画を早送りまたはスローモーションにします。

ユーザーが言いそうなこと: 「2倍速」「スローモーション」「10倍速のタイムラプスにして」

コマンド:

# 早送り(例:2倍速)
ffmpeg -y -hide_banner -i "INPUT" -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" "OUTPUT"

# スローダウン(例:0.5倍速 / 半分の速度)
ffmpeg -y -hide_banner -i "INPUT" -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" "OUTPUT"

計算式:

  • 動画:setpts = (1/速度)*PTS(2倍速 → 0.5*PTS)
  • 音声:atempo = 速度(0.5~2.0である必要あり、極端な場合はチェーンする)

例:

  • 2倍速:
    ffmpeg -y -hide_banner -i "video.mp4" -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" "video_2x.mp4"
    
  • 半分の速度(スローモーション):
    ffmpeg -y -hide_banner -i "video.mp4" -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" "video_slowmo.mp4"
    

GIFへの変換

動画からアニメーションGIFを作成します。

ユーザーが言いそうなこと: 「gifを作って」「gifに変換」「0:10から0:15までをgifに」

コマンド:

ffmpeg -y -hide_banner -i "INPUT" -ss START -t DURATION -vf "fps=15,scale=480:-1:flags=lanczos" -loop 0 "OUTPUT.gif"

例 - 0:10から5秒間のGIF:

ffmpeg -y -hide_banner -i "video.mp4" -ss 00:00:10 -t 5 -vf "fps=15,scale=480:-1:flags=lanczos" -loop 0 "video.gif"

動画の回転/反転

動画の向きを回転または反転します。

ユーザーが言いそうなこと: 「90度回転」「水平に反転」「上下逆に回転」

コマンド:

# 時計回りに90°回転
ffmpeg -y -hide_banner -i "INPUT" -vf "transpose=1" -c:a copy "OUTPUT"

# 反時計回りに90°回転
ffmpeg -y -hide_banner -i "INPUT" -vf "transpose=2" -c:a copy "OUTPUT"

# 180°回転
ffmpeg -y -hide_banner -i "INPUT" -vf "transpose=2,transpose=2" -c:a copy "OUTPUT"

# 水平反転(ミラー)
ffmpeg -y -hide_banner -i "INPUT" -vf "hflip" -c:a copy "OUTPUT"

# 垂直反転
ffmpeg -y -hide_banner -i "INPUT" -vf "vflip" -c:a copy "OUTPUT"

スクリーンショット/フレームの抽出

動画から1フレームをキャプチャします。

ユーザーが言いそうなこと: 「1:30のスクリーンショット」「サムネイルを抽出」「5秒のフレームを取得」

コマンド:

ffmpeg -y -hide_banner -i "INPUT" -ss TIMESTAMP -frames:v 1 "OUTPUT.jpg"

例:

ffmpeg -y -hide_banner -i "video.mp4" -ss 00:01:30 -frames:v 1 "screenshot.jpg"

ウォーターマーク/ロゴの追加

動画に画像をオーバーレイします。

ユーザーが言いそうなこと: 「logo.pngを追加」「隅にウォーターマークを配置」「画像をオーバーレイ」

配置位置:

位置オーバーレイ値
左上overlay=10:10
右上overlay=W-w-10:10
左下overlay=10:H-h-10
右下overlay=W-w-10:H-h-10
中央overlay=(W-w)/2:(H-h)/2

コマンド:

ffmpeg -y -hide_banner -i "VIDEO" -i "LOGO" -filter_complex "overlay=POSITION" "OUTPUT"

例 - ロゴを右上に配置:

ffmpeg -y -hide_banner -i "video.mp4" -i "logo.png" -filter_complex "overlay=W-w-10:10" "video_watermarked.mp4"

字幕の焼き込み

字幕を動画に恒久的に埋め込みます。

ユーザーが言いそうなこと: 「字幕を追加」「srtファイルを焼き込む」「キャプションを埋め込む」

コマンド:

ffmpeg -y -hide_banner -i "INPUT" -vf "subtitles='SUBTITLE_FILE'" "OUTPUT"

例:

ffmpeg -y -hide_banner -i "video.mp4" -vf "subtitles='subtitles.srt'" "video_subtitled.mp4"

動画の結合

複数の動画を結合します。

ユーザーが言いそうなこと: 「video1とvideo2をマージ」「クリップを結合」「イントロと本編をつなげる」

方法: 最初に動画をリストアップしたテキストファイルを作成し、その後結合します。

ステップ1 - ファイルリストを作成(files.txt):

file 'video1.mp4'
file 'video2.mp4'
file 'video3.mp4'

ステップ2 - 結合:

ffmpeg -y -hide_banner -f concat -safe 0 -i files.txt -c copy "merged.mp4"

時刻フォーマットリファレンス

タイムスタンプには以下の形式を使用します。

  • HH:MM:SS → 01:30:45(1時間30分45秒)
  • MM:SS → 05:30(5分30秒)
  • SS → 90(90秒)
  • HH:MM:SS.mmm → 00:01:23.500(ミリ秒あり)

応答フォーマット

コマンドを生成する際は:

  1. FFmpegコマンドをコードブロックで表示する
  2. そのコマンドが何をするかを簡単に説明する
  3. 出力ファイル名を仮定した場合はその旨を伝える

応答例:

動画を1:21から1:35までカットするコマンドは次のとおりです:

​```bash
ffmpeg -y -hide_banner -i "video.mp4" -ss 00:01:21 -to 00:01:35 -c copy "video_trimmed.mp4"
​```

このコマンドは、再エンコードせずにセグメントを抽出します(速度のために `-c copy` を使用)。出力は `video_trimmed.mp4` として保存されます。

Individual skills in this repo

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

sundial-org/awesome-openclaw-skills

Complete X (Twitter) algorithm mastery - engagement weights, viral formulas, shadow ban avoidance, thread optimization, and growth strategies. Based on X's open-source code analysis and real creator data.

sundial-org/awesome-openclaw-skills

Create product demo videos by automating browser interactions and capturing frames. Use when the user wants to record a demo, walkthrough, product showcase, or interactive video of a web application. Supports Playwright CDP screencast for high-quality capture and FFmpeg for video encoding.

sundial-org/awesome-openclaw-skills

Text-to-speech conversion using node-edge-tts npm package for generating audio from text. Supports multiple voices, languages, speed adjustment, pitch control, and subtitle generation. Use when: (1) User requests audio/voice output with the "tts" trigger or keyword. (2) Content needs to be spoken rather than read (multitasking, accessibility, driving, cooking). (3) User wants a specific voice, speed, pitch, or format for TTS output.

sundial-org/awesome-openclaw-skills

Local speech-to-text using faster-whisper. 4-6x faster than OpenAI Whisper with identical accuracy; GPU acceleration enables ~20x realtime transcription. Supports standard and distilled models with word-level timestamps.

sundial-org/awesome-openclaw-skills

Comprehensive video/audio processing with FFmpeg. Use for: (1) Video transcoding and format conversion, (2) Cutting and merging clips, (3) Audio extraction and manipulation, (4) Thumbnail and GIF generation, (5) Resolution scaling and quality adjustment, (6) Adding subtitles or watermarks, (7) Speed adjustment (slow/fast motion), (8) Color correction and filters.

sundial-org/awesome-openclaw-skills

Create a verbatim transcript for a YouTube URL using Google Gemini (speaker labels, paragraph breaks; no time codes). Use when the user asks to transcribe a YouTube video or wants a clean transcript (no timestamps).

sundial-org/awesome-openclaw-skills

Generate landing page code from product descriptions

sundial-org/awesome-openclaw-skills

Generate a beautiful HTML landing page from your package.json. Use when you need a quick marketing page for your project.

sundial-org/awesome-openclaw-skills

Founder vs employee personal branding strategies with LinkedIn positioning and exit planning

sundial-org/awesome-openclaw-skills

Monitor stock/crypto holdings, get price alerts, track portfolio performance

sundial-org/awesome-openclaw-skills

End-to-end AI video generation - create videos from text prompts using image generation, video synthesis, voice-over, and editing. Supports OpenAI DALL-E, Replicate models, LumaAI, Runway, and FFmpeg editing.

sundial-org/exa-web-search-free

Free AI search via Exa MCP. Web search for news/info, code search for docs/examples from GitHub/StackOverflow, company research for business intel. No API key needed.

sundial-org/finance-news

Market news briefings with AI summaries. Use when asked about stock news, market updates, portfolio performance, morning/evening briefings, financial headlines, or price alerts. Supports US/Europe/Japan markets, WhatsApp delivery, and English/German output.

sundial-org/jina-reader

Web content extraction via Jina AI Reader API. Three modes: read (URL to markdown), search (web search + full content), ground (fact-checking). Extracts clean content without exposing server IP.

sundial-org/memory-setup

Enable and configure Moltbot/Clawdbot memory search for persistent context. Use when setting up memory, fixing "goldfish brain," or helping users configure memorySearch in their config. Covers MEMORY.md, daily logs, and vector search setup.

sundial-org/news-summary

This skill should be used when the user asks for news updates, daily briefings, or what's happening in the world. Fetches news from trusted international RSS feeds and can create voice summaries.

sundial-org/ontology

Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.

sundial-org/remind-me

Set reminders using natural language. Automatically creates one-time cron jobs and logs to markdown.

sundial-org/stock-market-pro

Professional stock price tracking, fundamental analysis, and financial reporting tool. Supports global markets (US, KR, etc.), Crypto, and Forex with real-time data. (1) Real-time quotes, (2) Valuation metrics (PE, EPS, ROE), (3) Earnings calendar and consensus, (4) High-quality Candlestick & Line charts with technical indicators (MA5/20/60).

関連スキル