FFmpeg-Skill: 41 Typed FFmpeg Tools Let AI Agents Edit Videos Without Guessing
The article reviews ffmpeg-skill, an open-source project that equips AI coding assistants like Claude Code and Cursor with 41 typed FFmpeg tools governed by machine-readable SPEC contracts, enabling reliable video editing through automated probe-cut-verify workflows, platform-specific templates, and 2,088 tests, while noting limitations like long-video timeouts and rapid version churn.
Reading font

Project Overview
ffmpeg-skill (GitHub: https://github.com/kajisho5/ffmpeg-skill) is an open-source toolkit that gives AI coding agents — specifically Claude Code, Cursor, and Codex — a reliable way to edit video using local FFmpeg. Instead of letting the model guess FFmpeg parameters, the project wraps 41 distinct editing operations (cut, fit, caption, loudness, export, etc.) into typed commands governed by machine-readable contracts called SPEC. Each tool follows a fixed four-step pipeline: probe the source, perform lossless cutting, check the output, and verify the result. The core promise is that the AI never guesses parameters; every argument is constrained by a JSON schema derived directly from the tool's own argparse definition at runtime.
Key Feature 1: SPEC Contracts — Parameter Definitions Extracted from Code
The root problem with AI-driven FFmpeg is that models rely on memorized command-line syntax. A single mistake in filter name, parameter order, or filter-graph syntax produces a corrupted output that often fails silently (e.g., video becomes blurry). ffmpeg-skill solves this by generating each tool's input schema directly from its Python argparse parser. When a developer adds a new flag to a tool, the MCP tool definition updates automatically; if documentation drifts, CI fails. This guarantees that the schema the AI sees matches the code that executes. The project backs this claim with a benchmark: agents equipped with the skill succeeded on 71 out of 72 editing tasks, while bare FFmpeg agents scored only 66/72. The contract layer is enforced by a single 15,399-line test file, making parameter correctness a machine-verified property rather than a matter of luck.
Key Feature 2: Verify Step — Mandatory Re-measurement and Visual Review
After an edit, the tool re-probes the output file, reporting duration, resolution, and loudness. If the visual content changed, it generates a contact sheet (a 3x3 grid of screenshots) so a multimodal agent can visually inspect the result. This verification is backed by 2,088 test functions. Additionally, a local HTML review page presents a three-pane interface: source file on the left, preview with timeline in the middle, and an editable subtitle pane on the right that can emit correction commands back to the agent. The review page supports Chinese, English, Japanese, and Korean, and uploads nothing to the cloud.
Key Feature 3: Seven Platform Templates — One Command for Multi-platform Output
The project bundles templates for TikTok, Reels, Shorts, YouTube, X (Twitter), LinkedIn, and Facebook. Each template encodes platform-specific requirements: 9:16 aspect ratio, subtitle placement above the description bar, -14 LUFS loudness, and safe zones that avoid like buttons and progress bars. Running --template all renders all seven versions in one pass and produces a comparison table. The templates only fix parameters; creative decisions (which segment to cut, what subtitles to write) remain the agent's responsibility.
Known Issues and Limitations
Long-form video timeout: Exports exceeding 1,800 seconds (30 minutes) are killed by default. Workarounds include --timeout 0 or --fast (approx. 16 minutes for a 1-hour source), but long-form editing is not the tool's strength.
Aggressive versioning: 307 npm versions published in 87 days (295 releases, ~3.4/day). The SECURITY policy states only the current version is supported; there is no LTS. Major versions introduce breaking changes: v2.0 removed --crf, v3.0 dropped FFmpeg 5.x support, v4.0 split the 41 tools into 12 stable and 29 beta. Users are advised to pin a version.
Low active usage: Only 20 watchers (0.16% of stars); the author's 14 repositories total 12.4k stars, 12k concentrated in this repo, while sibling skill repos sum to 54 stars. Many star the project but few integrate it into daily agent workflows.
Installation and Configuration
Prerequisites: FFmpeg ≥ 6.1, Python ≥ 3.10, Node ≥ 16, plus one of Claude Code, Cursor, or Codex. The tool does not bundle FFmpeg; it installs it if missing. One-command setup: npx ffmpeg-skill setup This registers the skill with all detected agents, installs FFmpeg if needed, and runs a final doctor check. Verify with: npx ffmpeg-skill doctor An ok output means the environment is ready. Users can then instruct the agent in natural language, e.g., "Cut interview.mp4 from 0:45 to 1:20 into a 60-second vertical video." Recommended: set FFMPEG_SKILL_ROOTS to restrict file access to specific directories. A known macOS pitfall: Homebrew's ffmpeg-full may still lack the subtitle font dependencies required by the caption tool; manual linking or PATH adjustment is needed.
Author's Verdict
The tool is worth adopting if you have recurring batch video-editing tasks (slicing, subtitling, vertical conversion) and already use Claude Code or Cursor. It eliminates the time spent debugging FFmpeg parameters, not the creative judgment. For occasional single-video edits, a GUI editor like CapCut (JianYing) is more efficient. The automation plumbing is solid; the creative direction remains yours.
Github open-source repository: https://github.com/kajisho5/ffmpeg-skill
About this article
For attribution, corrections or content rights, contact