视频编辑器 MCP 服务器
一个强大的视频编辑 MCP 服务器,利用 FFmpeg 通过自然语言命令执行视频编辑操作。
成分
工具
该服务器实现了一个主要工具:
execute_ffmpeg
带有进度跟踪的 FFmpeg 命令- 将命令字符串作为输入
- 验证并执行 FFmpeg 操作
- 报告处理过程中的实时进度
- 处理错误并提供详细的反馈
- 支持所有 FFmpeg 操作,包括:
- 修剪/切割
- 合并视频
- 转换格式
- 调整速度
- 添加音轨
- 提取音频
- 添加字幕
- 基本滤镜(亮度、对比度等)
配置
先决条件
- 必须在系统 PATH 中安装并可访问 FFmpeg
- Python 3.9 或更高版本
- 所需的 Python 包:
安装
- 如果尚未安装,请安装 FFmpeg:
- 安装视频编辑器包:
Claude 桌面集成
在您的 Claude Desktop 配置文件中进行配置:
在 MacOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
发展
构建和发布
- 同步依赖项:
- 构建包:
- 发布到 PyPI:
注意:通过以下方式设置 PyPI 凭据:
- 令牌:
--token
或UV_PUBLISH_TOKEN
- 或用户名/密码:
--username
/UV_PUBLISH_USERNAME
和--password
/UV_PUBLISH_PASSWORD
调试
为了获得最佳调试体验,请使用 MCP Inspector:
示例用法
一旦连接到 Claude Desktop,您就可以发出自然语言请求,例如:
- “将 video.mp4 从 1:30 剪辑到 2:45”
- “将 input.mp4 转换为 WebM 格式”
- “将 video.mp4 加速 2 倍”
- “合并 video1.mp4 和 video2.mp4”
- “从视频.mp4中提取音频”
- “将 subtitles.srt 添加到 video.mp4”
服务器将:
- 解析您的请求
- 生成适当的 FFmpeg 命令
- 使用进度跟踪执行
- 完成时提供反馈
错误处理
该服务器包括强大的错误处理功能:
- 无效的输入文件
- 格式错误的 FFmpeg 命令
- 运行时执行错误
- 进度跟踪问题
所有错误都会连同详细的调试信息一起报告给客户端。
安全注意事项
- 仅处理明确允许的目录中的文件
- 在执行之前验证 FFmpeg 命令
- 清理所有输入参数
- 报告与安全相关的问题的详细错误消息
贡献
欢迎贡献!请按以下步骤操作:
- 分叉存储库
- 创建你的功能分支
- 进行更改
- 提交拉取请求
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
使用由 FFmpeg 提供支持的自然语言命令实现视频编辑,支持修剪、合并、格式转换等操作,并具有实时进度跟踪和错误处理功能。
Related Resources
Related MCP Servers
- -securityAlicense-qualityProvides code manipulation, execution, and version control capabilities. It allows AI assistants to read, write, and execute code while maintaining a history of changes.Last updated -8PythonMIT License
- AsecurityAlicenseAqualityLeverages Vim's native text editing commands and workflows, which Claude already understands, to create a lightweight code assistance layer.Last updated -8130164TypeScriptMIT License
- -securityAlicense-qualityAI-powered assistant that connects Claude to video encoding workflows, translating cryptic errors into plain English and providing actionable solutions for troubleshooting encoding jobs.Last updated -1PythonMIT License
- -security-license-qualityEnables interaction with YouTube videos by extracting metadata, captions in multiple languages, and converting content to markdown with various templates.Last updated -TypeScript