ffmpeg-skill

Developer toolsDesign and media

Local FFmpeg video and audio tools over stdio. Footage stays on this machine.

Your AI app calls the ffmpeg-skill MCP server, which does the developer tools and design and media work and sends the result back to the chat.

About ffmpeg-skill

ffmpeg-skill is a community MCP server from kajisho5, filed in our directory under developer tools and design and media. Local FFmpeg video and audio tools over stdio. Footage stays on this machine.

ffmpeg-skill runs on your own machine: your AI app starts it with the command npx -y ffmpeg-skill@4.39.0 mcp and talks to it over standard input and output.

The README for ffmpeg-skill lists tools such as stabilize.py, color.py, join.py and sync.py, which your AI app can call once the server is connected.

ffmpeg-skill is listed in the official MCP registry as io.github.kajisho5/ffmpeg-skill, version 4.39.0.

At a glance

Publisher
kajisho5 (community)
Runs
Locally on your machine
Install from
Node.js package on npm: ffmpeg-skill
Written in
Python
License
MIT
GitHub stars
13,682
Official MCP registry
io.github.kajisho5/ffmpeg-skill

Tools ffmpeg-skill gives your AI app

  • stabilize.pyRuns vidstab in two passes, and the second pass needs the first pass's transforms file.
  • color.pyBuilds the HDR-to-SDR chain. With a wrong colour tag the run still finishes, and the picture comes out washed out.
  • join.pyPuts transitions between clips that differ in size, frame rate or audio layout. Done by hand, those clips have to be normalised first or xfade fails.
  • sync.pyAnd multicam.py find the offset between two recordings by audio cross-correlation. No ffmpeg filter measures it.

Tool names as the ffmpeg-skill README lists them. Your AI app shows the live list once ffmpeg-skill is connected.

How to set up ffmpeg-skill

  1. Install Node.js on the machine that runs your AI app, because ffmpeg-skill starts with npx and downloads its package on first run.
  2. Check the ffmpeg-skill README for keys or settings; the registry lists none that ffmpeg-skill requires.
  3. Add ffmpeg-skill to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the ffmpeg-skill tools to confirm the connection.
  5. Run one read-only task with ffmpeg-skill first, such as a call to stabilize.py, before you allow anything that writes or sends.

ffmpeg-skill compared with similar servers

  • rust-anything by erkamyaman has fewer GitHub stars than ffmpeg-skill (13.1k against 13.7k); both are community servers, and both run locally.
  • OmniGet by tonhowtf has more GitHub stars than ffmpeg-skill (14.8k against 13.7k); both are community servers, and both run locally.
  • Pal by BeehiveInnovations has fewer GitHub stars than ffmpeg-skill (11.9k against 13.7k); both are community servers, and both run locally. The Pal README lists 5 tools to ffmpeg-skill's 4.

Before you connect ffmpeg-skill

  • Give ffmpeg-skill its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each ffmpeg-skill tool call until you trust what it does with them.
  • Treat text that ffmpeg-skill fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for ffmpeg-skill on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for ffmpeg-skill

How marketing and sales teams put ffmpeg-skill to work, by company size. Pick the size closest to yours and start ffmpeg-skill on one use case.

Small business

  • A small business with a developer can use ffmpeg-skill to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask ffmpeg-skill to explain and fix a marketing site issue without context switching between tools.
  • A small business can use ffmpeg-skill to resize and adapt one design for every channel instead of hiring for each version.
  • ffmpeg-skill runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use ffmpeg-skill to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect ffmpeg-skill to keep scripts and automations documented and versioned as they change.
  • Creative teams can connect ffmpeg-skill so agents produce variants for testing while designers keep control of the master files.
  • Start with stabilize.py and color.py, the tools ffmpeg-skill lists first, and add more once the team trusts the results.

Enterprise

  • Enterprise engineering teams can roll out ffmpeg-skill with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on ffmpeg-skill so web and marketing engineering share one reviewed way of working with AI.
  • Enterprises can use ffmpeg-skill with brand rules and approved assets only, so generated work stays inside the brand system.
  • ffmpeg-skill is a community server, so have security review the code and pin a version before ffmpeg-skill touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

ffmpeg-skill README

From kajisho5/ffmpeg-skill on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

Give your coding agent a video editor.
Claude Code, Cursor, Codex or any MCP client edits your footage with local FFmpeg, then checks its own output.
No cloud · No API keys · Python standard library
What you install and what it touches

Website · Quick start · Use cases · Demos · Tools · MCP · npm

English · 日本語 · 日本語(サイト)

Use cases, end to end: a vertical short with captions · a podcast as an audiogram · cleaning a phone clip · a cut-down of a long recording · one master, several platforms · a talk from two cameras

npx ffmpeg-skill

caption.py --animate pop --karaoke

fit.py --aspect 9:16 --fit crop

silence.py --threshold -35

loudness.py -I -14 --tp -1


Twelve clips edited by asking: colour, slow motion and reframing, a talk laid out with its slides and cut into a captioned short, a pause removed, a green-screen composite, a levelled horizon, and three phone clips (stabilised, a night shot lifted and denoised, 60 fps slowed down). Watch them (English and Japanese) · the request and the exact commands. Nine clips are AI-generated with Google Veo; three are shot on a phone.

Review page

After an edit, ask your agent for the review page ("show me the review page"), or run npx ffmpeg-skill review project.json --result run.json yourself (python3 scripts/_review.py from a checkout). It writes one local HTML file. It shows the sources, every step with its checks, the result in a phone frame with the platform's safe area, and a timeline. Press the number of a clip or a caption, write what should change, and copy the instruction it builds back to your agent. Nothing is uploaded; the page speaks English, Japanese, Korean and Chinese.


The talk above as a vertical short, on the review page (AI-generated footage).

Left half is the input, right half is what the command produced. Every before/after demo, with the exact command under each one →, all of it built by python3 demos/build.py, so you can rebuild every frame of it yourself. The pictures come from demos/footage/: clips AI-generated with Google Veo (the people and places do not exist) and a few shot on a phone. The sound is synthetic, and a few demos (HDR10, a panorama) use a synthetic picture.

ffmpeg-skill is an Agent Skill for Claude Code, Cursor, Codex and any agent that reads SKILL.md. It teaches the agent a fixed workflow (probe → edit losslessly where possible → check → verify) and ships 41 tools that do the actual work with ffmpeg / ffprobe: cut, join, silence removal, fit to duration and aspect, captions and karaoke, overlays and motion graphics, HDR → SDR and LUTs, audio clean-up and typed dynamics, sync with drift correction, multicam, loudness, delivery checks, whole-edit project rendering, batch folders. Every tool is also callable as an MCP tool (tools/list advertises a core 12 by default to keep client context small, with FFMPEG_SKILL_MCP_FULL=1 listing all 41; every tool is reachable by name through tools/call either way), and the whole set is described by a machine-readable contract.

If ffmpeg and python3 are on your PATH, it works: offline, on footage you would rather not upload.

  • Protect your source files. A destination that matches a declared input is refused. Direct edits require --overwrite to replace an existing output. A batch --watch job can replace an unchanged file it delivered on an earlier pass. The -y in the dry-run command takes effect only after the tool checks the destination.
  • Call typed tools. The agent supplies named options such as --aspect 9:16 and --fit pad. The tool builds the FFmpeg command and filter graph.
  • Verify the edit. The tools probe the source and the written file, so the agent can check the actual duration, frame size and audio before reporting success.

SPEC (Self-Producing Execution Contract): each tool's input_schema, the part of its contract and MCP tool definition that has to track the CLI flag-for-flag, is never hand-authored beside the code. It is derived, at run time, from the same argparse parser that already defines the CLI, and CI fails the build if any of it drifts. → full explanation

Standalone, and in an ecosystem

Standalone, this is a local FFmpeg engine: probe → edit → verify, npx ffmpeg-skill and nothing else. No API key, no account, no other repo required. Everything above and below this section describes that standalone tool, and none of it changes if you never read the rest of this one.

In kajisho5's wider video-production ecosystem, this repo is the hands: it cuts, measures and exports files, and reports back in structured JSON. It does not decide what to cut, whether a deliverable is approvable, what makes a highlight interesting, or what a caption should say (the user's cue text is burned as written, never rewritten to fit), those are a brain's job, sitting in front of this engine, not inside it.

You want to... Use
Cut / join / measure / export a file right now this repo (ffmpeg-skill), standalone
Decide cut points, approve a deliverable, plan a whole edit video-production-agent / AI-video-production-OS
Build a typed editing graph across a workspace, without writing raw ffmpeg video-editing-skill / audio-production-skill
Put Remotion motion graphics (animated captions, silence jump cuts, audio-peak motion) on a real recording remotion-ffmpeg-skill: its compositions take their length, fps, frame, silences, scene cuts, audio peaks and beats from this repo's probe.py, silence.py and scenes.py. It verifies its render with check.py and look.py, composites a graphics layer with overlay.py (--place for its --sparse mode), and delivers through render.py --template

Other repos in the ecosystem, media-analysis-skill, transcription-skill, subtitle-skill, thumbnail-skill, color-grading-skill, motion-graphics-skill, qc-skill, read this repo's contract --json, its tools' --json output and doctor, the same way any agent framework would; this repo does not call into any of them. The dependency runs one way.

Contents Standalone, and in an ecosystem · Why · Quick start · How it works · Design principles · Tools · Audio · Built for agents · FAQ · FFmpeg compatibility · Tested on real footage · Install · Requirements · Development · Docs

Why

An agent that "knows FFmpeg" still guesses: it assumes a frame rate, picks a codec the container cannot hold, re-encodes a file that only needed a stream copy, and reports "done" without opening the result. This skill takes the guessing out:

  • Real files first. Every job starts with probe.py; the agent decides from the measured duration, fps, resolution, colour and audio layout, not from the file name.
  • Structured tools, not shell strings. Each operation is a script with typed arguments. Nothing runs through a shell; no filter graph is accepted from the caller.
  • A contract the agent can read. contract --json states, for every tool, what it takes, what it writes, which FFmpeg components it needs and how the result is verified. The MCP surface is derived from it.
  • Verification after execution. The result is probed, checked against the destination's spec and, when the picture changed, looked at as a contact sheet.
  • Local first. No cloud, no API keys, no Python dependencies. Optional local transcription is used when a speech engine (Parakeet or a whisper) is installed, never required, by caption.py --transcribe and, since 1.17, by silence.py --transcribe (with --filler, or since 3.6 with --sentence-min-silence / --sentence-margin-tail); both take a transcript you already have instead, and both refuse with the install lines rather than guessing. Both take --engine and --model; FFMPEG_SKILL_ASR_ENGINE and FFMPEG_SKILL_ASR_MODEL set this machine's defaults (e.g. large-v3-turbo where that whisper.cpp model is installed; without either, auto and base). The engine runs on your machine and the audio is never uploaded; parakeet-mlx, faster-whisper and openai-whisper download their model weights the first time they run (parakeet-mlx's default from Hugging Face).

Paper

The design discipline behind this skill, per-operation verification for AI agents, is written up as a position paper. The paper scores ffmpeg-skill itself as only partially conformant with the discipline it defines.

Kajiyama, S. (2026). What Is Verification-Driven Coding?, A Discipline for Not Trusting Generation. Zenodo. https://doi.org/10.5281/zenodo.23720216

Quick start

One command does steps 0 to 2 below: npx ffmpeg-skill setup installs the skill for every agent it finds on the machine (~/.claude, ~/.cursor, ~/.codex or ~/.agents; Claude Code when it finds none), installs FFmpeg when ffmpeg does not run (brew install ffmpeg-full, winget install --id Gyan.FFmpeg -e or sudo apt-get install -y ffmpeg, printed before it runs; --no-ffmpeg never runs a package manager), and ends with doctor, whose exit status it returns. On a system with none of those three package managers it installs the skill, says FFmpeg is still missing, and exits non-zero. It needs Node 16+ and Python 3.10+, and installs neither.

npx ffmpeg-skill setup

The same steps one at a time:

# 0. FFmpeg itself, once (Ubuntu/Debian shown; macOS and Windows are in the Install table below)
sudo apt install ffmpeg

# 1. install the skill for Claude Code (Cursor: --cursor, Codex: --codex, all three: --all)
npx ffmpeg-skill

# 2. check the machine: ffmpeg, ffprobe and every FFmpeg component the tools need
npx ffmpeg-skill doctor

# 3. (for agent frameworks) read the machine-readable contract
npx ffmpeg-skill contract --json | head -40

Captions from speech (caption.py --transcribe) need one local speech engine, installed separately. pip install faster-whisper is the simplest; the first run downloads its model, and the audio never leaves the machine. Without an engine, everything else works, doctor lists the engine as missing optional, and --transcribe refuses with the install line for each engine it supports.

Already installed? re-run npx ffmpeg-skill to refresh ~/.claude/skills/ffmpeg-skill. Copies are not updated automatically.

doctor's overall ok and a single tool's usable are different signals: ok is false when anything some tool requires is missing, so one missing filter (a plain Homebrew ffmpeg without subtitles, or a build without libvidstab) turns it false even though most tools still run. Check doctor --json's tools field for the per-tool answer, not just ok.

Then talk to your agent:

"Take interview.mp4, keep 0:45–1:20 and 5:00–5:25, and make it a 60-second Reel."

The agent runs probe.py, cut.py --segments 0:45-1:20,5:00-5:25 --accurate, fit.py --aspect 9:16 --fit crop, export.py --preset reels, check.py --platform reels and look.py, then reports "final.mp4: 60.00 s, 1080×1920, 30 fps, AAC stereo" with the contact sheet it inspected.

Deliver to a platform

One command per destination, with the app's own UI taken into account:

python3 $S/render.py talk.mp4 --template tiktok --cues cues.txt

That fills the shipped templates/tiktok.json: 9:16 crop, captions popped word by word above TikTok's description bar and clear of its like column, −14 LUFS, the tiktok export preset, and a check.py --platform tiktok on the file it wrote. The caption size comes from the delivery table, so since 1.17.1 the filled project also states "fit_size": "on": a size nobody asked for shrinks to fit the cue instead of splitting the sentence across two cues. A template that states its own fit_size, and a --brand that states a caption size, still win, and a project with "fit_size": "off" renders the captions 1.17.0 rendered. Templates ship for tiktok, reels, shorts, youtube-shorts, youtube, x, linkedin, facebook, podcast and audiogram; --template all (or a comma-separated list) renders the seven video destinations (tiktok, reels, shorts, youtube, x, linkedin, facebook) from the same edit and writes a <name>_pack.md table of what each one produced. Files land next to the input unless -o says otherwise, and --dry-run shows every planned command rather than a result. render.py --list-templates prints them with their frames, limits and safe zones. Alias spellings work everywhere a platform is named (youtube-shorts = shorts, ig = reels, twitter = x, fb = facebook).

The tools also work on their own, from any shell:

S=~/.claude/skills/ffmpeg-skill/scripts
python3 $S/probe.py input.mp4 --compact
python3 $S/fit.py input.mp4 --duration 60 --method trim --aspect 9:16 --dry-run    # plan a trim and reframe
python3 $S/export.py input.mp4 --preset reels --json                 # structured result with a probe of the output

On Windows in Git Bash, python3 is only on PATH if Python was installed from the Microsoft Store; a python.org install exposes python (or the py launcher) instead, replace python3 with python above if you see a "command not found". bin/install.js and doctor/contract already handle this for you; only the raw script examples above need it spelled out manually.

More requests and the commands behind them: examples/README.md. To see everything run end-to-end on generated footage: npm run demo (the gallery in docs/demos.md).

How it works

flowchart TD
    U[User request] --> A[AI agent<br/>Claude Code · Cursor · Codex]
    A -->|reads| S[SKILL.md<br/>workflow, request → tool map, report format]
    A -->|runs| T[Structured tool<br/>scripts/&lt;name&gt;.py, typed argparse flags]
    T --> C[Contract<br/>input schema · role · capabilities · verification policy]
    C --> D[Capability detection<br/>doctor: available / missing / unknown]
    D --> F[FFmpeg execution<br/>no shell, stream copy when possible]
    F --> V[Verification<br/>probe · check · look.py contact sheet]
    V --> R[Structured result<br/>--json: status, output, commands, probe]
    R --> A

Over MCP the same tools are reached through a transport that holds no tool table of its own:

flowchart LR
    M[MCP client<br/>Claude Desktop · Cursor · any client] --> P[mcp/server.py<br/>stdio JSON-RPC]
    P -->|tools/list| C[Contract-derived ToolSpecs<br/>names · order · inputSchema]
    P -->|tools/call| T[scripts/&lt;name&gt;.py]
    C -.derived from.-> K[scripts/_contract.py]
    T -.described by.-> K

Names, order and inputSchema in tools/list are translated from each tool's argparse parser at start-up, so a new flag or a new script appears in MCP with no edit to mcp/. A test copies the skill, adds, removes and edits a script, and reads tools/list again to prove it.

Design principles

These are the rules the skill file gives the agent and the code enforces.

  1. Probe first. No tool decides from the file name. probe.py measures duration, fps (with variable-frame-rate detection), resolution, rotation, bit depth, HDR format including Dolby Vision, colour tags and every audio stream before anything is cut.
  2. Lossless when possible. cut.py and loudness.py stream-copy what they do not need to touch (join.py re-encodes so it can crossfade and conform mismatched clips; --copy --transition none joins clips that already match by stream copy). Re-encoding happens only when it must: frame-accurate cuts, filters, format changes, or a keyframe farther than the tolerance.
  3. Plan before render. Every tool takes --dry-run (print the ffmpeg command lines, write nothing; verify ignores it), --plan FILE (the dry run saved as a plan with fingerprinted inputs that render.py FILE executes later, refusing if an input changed; render and verify refuse it), --json (structured result with a probe of the output), --fast (preview quality), --progress (percent and ETA), --timeout (a hung ffmpeg is killed and reported, never waited on forever; Ctrl-C or SIGTERM likewise stops the running ffmpeg, removes its partial output and reports kind: interrupted) and --overwrite (explicit consent before an existing output is replaced). A test runs every tool whose contract says its dry run runs no ffmpeg (ffmpeg_execution: none, plus cut and metadata without their measuring flags) under --dry-run behind a fake ffmpeg and asserts that no ffmpeg call happened and no file appeared; another runs every tool the contract says supports --dry-run (all but verify) behind an ffmpeg that logs each decode, and asserts that no file appeared and that every tool that decoded is one the contract lists as analysis_only.
  4. Machine-readable contract. contract --json describes all 41 tools (and crop, an alias of fit --rect since 4.19, marked alias_of): input schema generated from the parser, output schema, role, required and conditional FFmpeg capabilities, dry-run support, the verification tools to run afterwards, whether a visual check is required, mutates_input: false. provides lists them by a cross-repository Capability id (ffmpeg-skill.cut, ffmpeg-skill.loudness, ...) for kajisho5/AI-video-production-OS's CapabilityContract.provides, see docs/contract.md.
  5. Contract-derived MCP. mcp/server.py builds its tools/list from the contract. Tool names, order and inputSchema cannot drift from the scripts; a test keeps the two byte-identical.
  6. Capability detection. doctor reads ffmpeg -encoders / -decoders / -filters / -bsfs and reports which of the components the tools need are present on this build (libx264, libass, zscale, loudnorm, xfade, …), before a job fails inside ffmpeg.
  7. Unknown is not missing. When a listing cannot be read (a layout the parser does not know, ffmpeg exiting non-zero) the affected capabilities are unknown: never missing, never silently available. An installed filter is not reported absent; a failed detection is not a pass.
  8. Verify the result. The output is probed, and when the picture changed (captions, overlays, crops, colour, transitions) the agent runs look.py and inspects the PNG. The report is not finished until its Look: line names that image; audio-only jobs say Look: not needed. "Inspects" means the calling agent's own vision, not a feature of this skill: look.py only renders a PNG; nothing in this repository detects faces, products, subjects, or "the interesting part" of a frame or a scene. When a crop or reframe needs to keep a specific part of the frame (fit.py --fit crop --crop-x/-y, see Tools), it is the multimodal agent looking at that PNG and choosing the anchor, a non-visual caller (a script, a CLI user without eyes on the sheet) has to supply that decision itself, and the default is a plain centre crop. Likewise scenes.py --highlights ranks candidate scenes by a measured proxy (--rank-by audio or --rank-by duration), never by content; it is the agent that turns a look at the sheet into a judgement.
  9. One label per report. A finished job is Done:, a failure or a refusal is Failed:, and a partial result is Done: with the shortfall named in Notes:, never a third label such as Done (partially):.
  10. Keep originals. No tool overwrites its input. Outputs are new files named <input>_<operation>.<ext> unless told otherwise, and a test hashes every input after the run.

Read the rest of the ffmpeg-skill README on GitHub

Questions about ffmpeg-skill

What is the ffmpeg-skill MCP server?

Local FFmpeg video and audio tools over stdio. Footage stays on this machine. ffmpeg-skill is maintained by kajisho5 on GitHub at kajisho5/ffmpeg-skill, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the ffmpeg-skill MCP server?

Add ffmpeg-skill to your AI app's MCP config with the command npx -y ffmpeg-skill@4.39.0 mcp. In Claude Code, run claude mcp add --transport stdio ffmpeg-skill -- npx -y ffmpeg-skill@4.39.0 mcp. To run ffmpeg-skill this way you need Node.js installed.

Does ffmpeg-skill need an API key?

The registry lists no required keys for ffmpeg-skill. Check the ffmpeg-skill README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is ffmpeg-skill an official MCP server?

No. ffmpeg-skill is a community server maintained by kajisho5. Community servers can be excellent; read the code and the open issues before you give ffmpeg-skill access to company data.

What license is ffmpeg-skill under?

ffmpeg-skill is released under the MIT license, according to its GitHub repository. The license covers the code of ffmpeg-skill; the service it connects to has its own terms.