{"slug":"ffmpeg-agent","title":"FFmpeg Agent — Video Processing CLI","tags":["ffmpeg","cli","video-processing","agent"],"agent_summary":"Agent-native FFmpeg CLI wrapper with JSON output for video info, trim, concat, extract-audio, thumbnail, compress, subtitles, resize, normalize, and speed control.","trigger_phrases":["ffmpeg agent","compress video","add subtitles to video","resize video vertical","extract audio from video","normalize audio","video processing cli","ffmpeg json output"],"runnable":true,"markdown":"\n# FFmpeg Agent — Video Processing CLI\n\nAgent-native CLI wrapper for FFmpeg. Provides compound commands with JSON output for Claude Code and other agents. Wraps FFmpeg v8.1 on Windows.\n\n## Install\n\n```powershell\ncd D:\\ClaudeDev\\00_GITHUB\\cliit\\clis\\ffmpeg-agent\npip install -r requirements.txt\npython cli.py --help\n```\n\nFFmpeg binary: C:\\Users\\mikem\\AppData\\Local\\Microsoft\\WinGet\\Links\\ffmpeg.exe\n\nOverride with env: FFMPEG_BIN, FFPROBE_BIN\n\n## Agent Pattern\n\nAlways run `info` first to get metadata before processing. Add --json to any command for machine-readable output.\n\n```bash\npython cli.py info video.mp4 --json\n# Returns: {\"ok\": true, \"duration_seconds\": 120.5, \"video\": {\"width\": 1920, \"height\": 1080}}\n```\n\n## Commands\n\n| Command | Purpose | Example |\n|---------|---------|---------|\n| info | Get metadata | python cli.py info video.mp4 --json |\n| cut | Trim video | python cli.py cut input.mp4 --start 00:01:00 --end 00:02:00 -o out.mp4 |\n| concat | Join files | python cli.py concat a.mp4 b.mp4 -o merged.mp4 |\n| extract-audio | Pull audio | python cli.py extract-audio input.mp4 -o audio.mp3 |\n| thumbnail | Single frame | python cli.py thumbnail input.mp4 --time 00:00:05 -o thumb.jpg |\n| thumbnails | Batch frames | python cli.py thumbnails input.mp4 --interval 10 --dir ./thumbs/ |\n| convert | Transcode | python cli.py convert input.mp4 --format mp4 --quality high -o out.mp4 |\n| compress | Smart compress | python cli.py compress input.mp4 --target-size 10MB -o compressed.mp4 |\n| add-subs | Burn subtitles | python cli.py add-subs input.mp4 --srt captions.srt -o out.mp4 |\n| resize | Resize/reframe | python cli.py resize input.mp4 --width 1080 --height 1920 -o vertical.mp4 --fit crop |\n| audio-normalize | EBU R128 | python cli.py audio-normalize input.mp4 -o normalized.mp4 --target-lufs -16 |\n| gif | Video to GIF | python cli.py gif input.mp4 --start 00:00:05 --duration 3 -o output.gif |\n| speed | Speed control | python cli.py speed input.mp4 --factor 2x -o fast.mp4 |\n\nQuality levels for convert: high (CRF 18), medium (CRF 23), low (CRF 28).\nTarget LUFS for normalize: -23 (broadcast), -16 (social, default), -14 (streaming).\nFit modes for resize: crop (center-crop, default), pad (letterbox/pillarbox), stretch.\n\n## JSON Response Schema\n\nSuccess: `{\"ok\": true, \"output\": \"path/to/output.ext\", \"size_mb\": 12.4}`\nError: `{\"ok\": false, \"error\": \"Actionable error message\"}`\n\n## Social Content Workflow\n\n```bash\npython cli.py extract-audio interview.mp4 -o podcast.mp3 --json\npython cli.py audio-normalize podcast.mp3 -o podcast-normalized.mp3 --target-lufs -16 --json\npython cli.py resize interview.mp4 --width 1080 --height 1920 --fit crop -o vertical.mp4 --json\n```\n\nAll commands are non-destructive (never modify the input file). Output directories auto-created.\n","html":"<h1>FFmpeg Agent — Video Processing CLI</h1>\n<p>Agent-native CLI wrapper for FFmpeg. Provides compound commands with JSON output for Claude Code and other agents. Wraps FFmpeg v8.1 on Windows.</p>\n<h2>Install</h2>\n<pre><code class=\"language-powershell\">cd D:\\ClaudeDev\\00_GITHUB\\cliit\\clis\\ffmpeg-agent\npip install -r requirements.txt\npython cli.py --help\n</code></pre>\n<p>FFmpeg binary: C:\\Users\\mikem\\AppData\\Local\\Microsoft\\WinGet\\Links\\ffmpeg.exe</p>\n<p>Override with env: FFMPEG_BIN, FFPROBE_BIN</p>\n<h2>Agent Pattern</h2>\n<p>Always run <code>info</code> first to get metadata before processing. Add --json to any command for machine-readable output.</p>\n<pre><code class=\"language-bash\">python cli.py info video.mp4 --json\n# Returns: {\"ok\": true, \"duration_seconds\": 120.5, \"video\": {\"width\": 1920, \"height\": 1080}}\n</code></pre>\n<h2>Commands</h2>\n<p>| Command | Purpose | Example |\n|---------|---------|---------|\n| info | Get metadata | python cli.py info video.mp4 --json |\n| cut | Trim video | python cli.py cut input.mp4 --start 00:01:00 --end 00:02:00 -o out.mp4 |\n| concat | Join files | python cli.py concat a.mp4 b.mp4 -o merged.mp4 |\n| extract-audio | Pull audio | python cli.py extract-audio input.mp4 -o audio.mp3 |\n| thumbnail | Single frame | python cli.py thumbnail input.mp4 --time 00:00:05 -o thumb.jpg |\n| thumbnails | Batch frames | python cli.py thumbnails input.mp4 --interval 10 --dir ./thumbs/ |\n| convert | Transcode | python cli.py convert input.mp4 --format mp4 --quality high -o out.mp4 |\n| compress | Smart compress | python cli.py compress input.mp4 --target-size 10MB -o compressed.mp4 |\n| add-subs | Burn subtitles | python cli.py add-subs input.mp4 --srt captions.srt -o out.mp4 |\n| resize | Resize/reframe | python cli.py resize input.mp4 --width 1080 --height 1920 -o vertical.mp4 --fit crop |\n| audio-normalize | EBU R128 | python cli.py audio-normalize input.mp4 -o normalized.mp4 --target-lufs -16 |\n| gif | Video to GIF | python cli.py gif input.mp4 --start 00:00:05 --duration 3 -o output.gif |\n| speed | Speed control | python cli.py speed input.mp4 --factor 2x -o fast.mp4 |</p>\n<p>Quality levels for convert: high (CRF 18), medium (CRF 23), low (CRF 28).\nTarget LUFS for normalize: -23 (broadcast), -16 (social, default), -14 (streaming).\nFit modes for resize: crop (center-crop, default), pad (letterbox/pillarbox), stretch.</p>\n<h2>JSON Response Schema</h2>\n<p>Success: <code>{\"ok\": true, \"output\": \"path/to/output.ext\", \"size_mb\": 12.4}</code>\nError: <code>{\"ok\": false, \"error\": \"Actionable error message\"}</code></p>\n<h2>Social Content Workflow</h2>\n<pre><code class=\"language-bash\">python cli.py extract-audio interview.mp4 -o podcast.mp3 --json\npython cli.py audio-normalize podcast.mp3 -o podcast-normalized.mp3 --target-lufs -16 --json\npython cli.py resize interview.mp4 --width 1080 --height 1920 --fit crop -o vertical.mp4 --json\n</code></pre>\n<p>All commands are non-destructive (never modify the input file). Output directories auto-created.</p>\n"}