最近推送 2026-11-16 09:08(15 天前),属于活跃维护
kajisho5/ffmpeg-skill
GITHUB中文整理主语言 Python · 13,292 星 · MIT · 创建于 2026-09-03
一个面向编程智能体的本地视频编辑工具集,把 42 个 FFmpeg 能力封装成带机器可读契约的工具层,并提供 MCP 服务器。
仓库健康度
5 个维度开放 Issue 33 个 · Fork 599 个
24 小时 +83 · 7 日 +2,314 · 30 日 积累中
许可证 MIT · 12 个 topics · 开了 Wiki
这一项暂无数据,不代表项目没有发布
「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。
Star 趋势
19 天记录横轴 2026-11-04 → 2026-12-02,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。
它解决什么问题
据 README 归纳智能体直接手写 FFmpeg 命令时,参数容易写错却仍返回成功,结果不可靠也难以验证。把它拆成按任务划分的工具,可以让每次操作有明确输入输出并事后核对结果,避免静默出错。
核心能力
6 条- 1把剪辑、字幕、重构图、响度处理、平台导出等任务拆成独立工具
- 2每个工具的输入结构从脚本自身的参数解析器在运行时生成
- 3通过 MCP 服务器提供工具列表与调用,无需另写结构定义
- 4工具执行后重新测量关键指标,读不到值则判定该步骤未通过
- 5用文档与测试检查契约和代码是否同步,不同步则构建失败
- 6默认只向智能体暴露核心工具,其余工具按名称按需调用
项目画像
6 个角度项目定位
一个面向编程智能体的本地视频编辑工具集,把 42 个 FFmpeg 能力封装成带机器可读契约的工具层,并提供 MCP 服务器。
适合谁
适合用 Claude Code、Cursor、Codex 等编程智能体做本地视频处理的开发者和内容创作者,尤其是需要剪辑、加字幕或做平台导出又不想依赖云服务的场景。
典型场景
让编程智能体在本地完成视频裁剪,并得到裁剪点吸附到关键帧的反馈;为视频生成或处理字幕;测量并调整音频响度与真峰值;按平台预设导出视频并检查最大时长。
部署难度
资料未说明部署步骤,需要按仓库说明自行摸索。
风险限制
资料未说明具体要求,需要按仓库说明自行确认。
最近维护
最近一次推送是 2026-11-16 09:08。 实现方式:导入每个工具脚本并拦截其参数解析调用,取得完整的解析器对象,据此生成输入结构;其余元信息来自手工维护的表格。MCP 服务器的工具列表直接由这份契约翻译而来,测试在持续集成中检查契约、文档与代码是否一致。
README 原文细节
4 个板块核心功能README 里列出来的能力清单
Capability detection
doctor reads ffmpeg -encoders, -decoders, -filters and -bsfs and resolves every capability the contract declares against this machine's build. Three states per capability: available, missing, unknown. Exit 0 when everything required is available, 1 when something required is missing, 2 when nothing is proven missing but a required capability is unknown. With detection on (the default), contract --json carries the same lists under capabilities. doctor also reports fonts: the default drawtext family, and fonts.scripts — one available/missing/unknown per writing system (ja, zh, ko, ar, he, hi, bn
doctor --json's gpuencoders reports which GPU-backed encoders (nvenc, videotoolbox, qsv, vaapi, amf) this ffmpeg build was compiled with — read from -encoders alone, so it proves the capability shipped, not that the GPU/driver on this machine will actually accept a job (that needs a real encode, which doctor's introspection never runs). It never affects ok or any tool's usable. The GPU paths a tool uses are opt-in: Apple VideoToolbox on Apple Silicon and, off macOS, NVIDIA NVENC (h264nvenc/hevcnvenc, SDR only, when ffmpeg -encoders lists them). --hw on every re-encoding tool (h264/hevc/prores
doctor also compares the FFmpeg version with a small, dated table of high-severity FFmpeg CVEs (doctor --json's ffmpegsecurity; source ffmpeg.org/security.html, checked 2026-10-22). ffmpeg-skill does not ship FFmpeg, so a decoder bug in the build you have stays yours until you upgrade it. When the version is older than the first upstream release on its branch that carries a fix (today: CVE-2026-8461, the MagicYUV decoder heap write, fixed in 8.0.3, 8.1.2 and 9.0), doctor prints one warning: line on stderr with the update command and lists it under ffmpegsecurity.warnings. It is advice, never a
A local usage record, off by default (#689). FFMPEGSKILLUSAGELOG=1 (or an absolute file path) makes every tool run append one JSON line to ~/.local/state/ffmpeg-skill/usage.jsonl ($XDGSTATEHOME; %LOCALAPPDATA% on Windows), exactly {tool, version, status, kind, reason, flags, seconds, ffmpegmajor}: the tool, the skill version, completed or failed, the failure's error.kind and error.reason codes, the names of the options given (never their values), how long it took, and the FFmpeg major version. No path, file name, argument value or text is recorded, and nothing leaves the machine. npx ffmpeg-sk
怎么安装从零跑起来的步骤
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+
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.
npx ffmpeg-skill setup
Install
Where it can be installed from today. Each route is spelled out below the table.
Not listed in a directory yet. The Claude plugin directory accepts a plugin that ships scripts or programs only from an organization Anthropic has marked Verified, and there is no way to ask for that yet, so the submission is on hold (the tools are Python files; a text-only build would install nothing that runs). The Cursor Marketplace, the Gemini CLI extension gallery and Glama are submitted and waiting on their review or crawl. This table gains a row when a listing goes live; until then the routes above are the whole list.
As a Claude Code plugin (no Node needed, updates with claude plugin update). This repository is its own plugin marketplace:
An agent-agnostic marketplace at .agents/plugins/marketplace.json points at the same release-built plugin branch directory as the Claude marketplace. Codex can add it without a sparse checkout of .claude-plugin (checked against Codex CLI 0.171.0):
- npm — Claude Code, Cursor, Codex skills folders — npx ffmpeg-skill (npmjs.com/package/ffmpeg-skill)
- Claude Code plugin — Claude Code 2.1.275 or later (2.1.69 to 2.1.274: the two commands below) — /plugin install ffmpeg-skill --marketplace kajisho5/ffmpeg-skill
- Codex plugin — Codex CLI — codex plugin marketplace add kajisho5/ffmpeg-skill --sparse .claude-plugin, then codex plugin add ffmpeg-skill@ffmpeg-skill
- Gemini CLI extension — Gemini CLI — gemini extensions install https://github.com/kajisho5/ffmpeg-skill
- MCP server — clients without a shell — npx -y ffmpeg-skill mcp (see MCP)
- MCP Registry — clients that install from the registry — io.github.kajisho5/ffmpeg-skill (entry); the release workflow publishes a new version there after npm, and a failed registry step leaves the ent
- GitHub release — a pinned copy — releases
- macOS — brew install ffmpeg-full, then put it on PATH (below). The plain ffmpeg formula lacks the subtitles, drawtext and zscale filters
- Ubuntu / Debian — sudo apt install ffmpeg
- Windows — winget install Gyan.FFmpeg
- Put it first on PATH. Add export PATH="$(brew --prefix ffmpeg-full)/bin:$PATH" to your shell profile. brew --prefix ffmpeg-full is the stable opt/ path, so this survives upgrades, but it only reaches
- Link it over the lean formula: brew unlink ffmpeg 2>/dev/null; brew link --overwrite --force ffmpeg-full. Every process finds this one, but brew doctor warns about a linked keg-only formula, and an up
npx ffmpeg-skill # Claude Code → ~/.claude/skills/ffmpeg-skill
npx ffmpeg-skill --cursor # Cursor → ~/.cursor/skills/ffmpeg-skill
npx ffmpeg-skill --codex # Codex → ~/.agents/skills/ffmpeg-skill (Cursor reads this location too)
npx ffmpeg-skill --all # all three
npx ffmpeg-skill setup # every agent found on this machine, plus FFmpeg when missing, then doctor
npx ffmpeg-skill --project # this project → ./.claude/skills/ffmpeg-skill
npx ffmp
Troubleshooting an installed copy
Run these checks in the environment that runs the skill, not just in a separate shell. Run the first command from the directory that holds the installed copy's scripts/: the skill's own directory for a copy made by npx ffmpeg-skill, a Claude Code plugin or a copy by hand, and the plugin's top directory (the one that contains skills/) for the Codex plugin:
- It works in my terminal but not in my agent. Compare ffmpegpath and ffprobepath against the binaries seen by the agent (a copy older than 3.13.0 does not report them: update it first, see Updating). U
- A specific tool won't run. In the installed copy's report, look under tools (for example, tools.stabilize) for that tool's usable status and any fix message. See Quick start for how to interpret the o
- The agent still uses an older version. Use the installed copy's version in the report, then follow Updating for that installation route. A newer version reported by the npm command doesn't establish t
python3 scripts/_contract.py doctor --json # from the directory that holds scripts/
npx ffmpeg-skill doctor --json # checks the invoked npm package, not a plugin copy
环境与依赖跑它之前要准备什么
Requirements
doctor's own introspection calls (ffmpeg -filters/-encoders/-bsfs/-version) time out after 10s and report failed rather than hanging forever — those are meant to be fast. Every tool's actual media-processing ffmpeg invocation (cut, fit, caption, ...) runs under --timeout (default 1800 s, FFMPEGSKILLTIMEOUT, 0 = none): past the limit the process is killed, its partial output removed, and the failure reported as kind: timeout (exit 124) — a legitimately long --accurate re-encode should raise the limit rather than run unbounded. -nostdin is always passed, so a hung ffmpeg process waiting on stdin
- FFmpeg 6.1+ (3.0.0 removed 5.x; an older build is refused). Required by at least one tool (so doctor's ok needs them all): libx264, aac, and the drawtext, subtitles (libass), loudnorm, xfade, acrossfa
- Node 16+ only for the npx installer
实现原理它内部是怎么做的
How it works
Over MCP the same tools are reached through a transport that holds no tool table of its own:
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.
- 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 a
- 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 tha
- 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 FIL
- Machine-readable contract. contract --json describes all 41 tools (and crop, an alias of fit --rect since 4.19, marked aliasof): input schema generated from the parser, output schema, role, required a
- 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.
- 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, xfad
- 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 in
- 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
- 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):.
- Keep originals. No tool overwrites its input. Outputs are new files named . unless told otherwise, and a test hashes every input after the run.
关于 ffmpeg-skill 的常见问题
7 个问题ffmpeg-skill 是做什么的?
一个面向编程智能体的本地视频编辑工具集,把 42 个 FFmpeg 能力封装成带机器可读契约的工具层,并提供 MCP 服务器。 智能体直接手写 FFmpeg 命令时,参数容易写错却仍返回成功,结果不可靠也难以验证。把它拆成按任务划分的工具,可以让每次操作有明确输入输出并事后核对结果,避免静默出错。
ffmpeg-skill 有哪些功能?
核心能力:把剪辑、字幕、重构图、响度处理、平台导出等任务拆成独立工具;每个工具的输入结构从脚本自身的参数解析器在运行时生成;通过 MCP 服务器提供工具列表与调用,无需另写结构定义;工具执行后重新测量关键指标,读不到值则判定该步骤未通过;用文档与测试检查契约和代码是否同步,不同步则构建失败;默认只向智能体暴露核心工具,其余工具按名称按需调用。
ffmpeg-skill 适合谁用?
适合用 Claude Code、Cursor、Codex 等编程智能体做本地视频处理的开发者和内容创作者,尤其是需要剪辑、加字幕或做平台导出又不想依赖云服务的场景。
ffmpeg-skill 是怎么工作的?
导入每个工具脚本并拦截其参数解析调用,取得完整的解析器对象,据此生成输入结构;其余元信息来自手工维护的表格。MCP 服务器的工具列表直接由这份契约翻译而来,测试在持续集成中检查契约、文档与代码是否一致。
怎么安装 ffmpeg-skill?
按项目 README 的说明: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;Captions from speech (caption.py --transcribe) need one local speech engine, installed separately. pip install faster-whisper is the simples;npm — Claude Code, Cursor, Codex skills folders — npx ffmpeg-skill (npmjs.com/package/ffmpeg-skill);Claude Code plugin — Claude Code 2.1.275 or later (2.1.69 to 2.1.274: the two commands below) — /plugin install ffmpeg-skill --marketplace k。完整命令见下方「怎么安装」一节或 GitHub 仓库的 README。
用 ffmpeg-skill 有什么门槛或限制?
资料未说明具体要求,需要按仓库说明自行确认。
ffmpeg-skill 现在还在维护吗?数据怎么样?
目前 13,292 星,599 个 Fork,主语言 Python,创建于 2026-09-03,最近一次推送 2026-11-16 09:08,许可证 MIT。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。
这些内容来自哪
读法说明项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-12-01 13:12。