ffmpeg-mcp
Provides a comprehensive suite of media processing tools for AI assistants, enabling tasks such as video and audio format conversion, compression, metadata probing, trimming, merging, and adding watermarks or subtitles.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ffmpeg-mcpextract the audio from tutorial.mp4 and save it as an mp3"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ffmpeg-mcp
FFmpeg MCP Server — 将常用 FFmpeg 操作封装为 MCP 工具,支持 AI 助手直接调用。
功能特性
支持 17 个实用 FFmpeg 工具:
工具 | 功能 | 典型用途 |
| 获取媒体文件详细信息 | 查看视频分辨率、编码、时长、码率 |
| 格式转换 | MP4→MKV, AVI→MP4, WAV→MP3 |
| 视频压缩 | CRF 控制质量,H.264/H.265 编码 |
| 提取音频 | 从视频中提取 MP3/AAC/WAV/FLAC |
| 生成缩略图 | 指定时间点截图或均匀截取多张 |
| 裁剪/切割 | 按时间范围截取片段(无重编码) |
| 合并拼接 | 多个视频合并为一个 |
| 添加水印 | 图片水印或文字水印,支持位置/透明度 |
| 转 GIF | 高质量双通道调色板 GIF 生成 |
| 调整分辨率 | 缩放视频到指定尺寸 |
| 变速 | 0.25x 慢放到 4x 快进 |
| 旋转/翻转 | 90°/180°/270° 旋转,水平/垂直翻转 |
| 添加音轨 | 替换或混合视频中的音频 |
| 添加字幕 | 硬编码或软字幕(SRT/ASS/VTT) |
| 调整音量 | 音量增减或 EBU R128 标准化 |
| 裁剪画面 | 按区域裁剪视频画面 |
| 提取帧 | 按帧率导出图片序列 |
传输模式
模式 | 命令 | 适用场景 |
stdio |
| Claude Code, Cursor, Windsurf |
SSE |
| Web 客户端(旧版协议) |
Streamable HTTP |
| Web 客户端(新版协议) |
前置条件
Node.js >= 18
FFmpeg 已安装并在 PATH 中(运行
ffmpeg -version验证)
安装
npm install
npm run build客户端配置
Claude Code
claude mcp add ffmpeg-mcp -- node /path/to/ffmpeg-mcp/dist/index.js或在 ~/.claude/settings.json 中:
{
"mcpServers": {
"ffmpeg": {
"command": "node",
"args": ["/path/to/ffmpeg-mcp/dist/index.js"]
}
}
}Cursor
在 .cursor/mcp.json 中:
{
"mcpServers": {
"ffmpeg": {
"command": "node",
"args": ["/path/to/ffmpeg-mcp/dist/index.js"]
}
}
}Windsurf
在 ~/.codeium/windsurf/mcp_config.json 中:
{
"mcpServers": {
"ffmpeg": {
"command": "node",
"args": ["/path/to/ffmpeg-mcp/dist/index.js"]
}
}
}HTTP/SSE 模式(通用 Web 客户端)
# 启动 SSE 服务
node dist/index.js --transport sse --port 3100
# 启动 Streamable HTTP 服务
node dist/index.js --transport http --port 3100SSE 端点: http://127.0.0.1:3100/sse
HTTP 端点: http://127.0.0.1:3100/mcp
使用示例
配置好客户端后,AI 助手可以直接使用自然语言调用:
"帮我查看这个视频的信息" →
probe"把这个 AVI 转成 MP4" →
convert"压缩这个视频到更小的体积" →
compress"从视频中提取音频为 MP3" →
extract_audio"截取视频第 30 秒的缩略图" →
thumbnail"裁剪视频从 1 分钟到 3 分钟" →
trim"把这几个视频合并成一个" →
merge"给视频右下角加个水印" →
watermark"把视频片段转成 GIF" →
gif"把视频缩放到 720p" →
resize"把视频 2 倍速播放" →
speed"把视频旋转 90 度" →
rotate"给视频换一个背景音乐" →
add_audio"给视频加上字幕" →
subtitle"把音量调大一倍" →
volume"裁剪视频中间的画面" →
crop"每秒提取一帧图片" →
frames
命令行参数
--transport <stdio|sse|http> 传输模式(默认 stdio)
--port <number> 端口号(默认 3100)
--host <string> 绑定地址(默认 127.0.0.1)License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yuan66-hub/ffmpeg-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server