Skip to main content
Glama

Video Clip MCP

🎬 Video Clip MCP

📖 项目简介

基于 AI MCP 协议的专业视频剪辑工具,提供高效的视频处理能力和智能化操作体验。

✨ 核心功能

  • 🎯 精准剪辑 - 支持毫秒级精度的视频片段裁剪
  • 🔗 智能合并 - 多视频文件无缝拼接,自动适配格式差异
  • ✂️ 灵活分割 - 按时长、大小或段数智能分割视频
  • 📊 信息获取 - 详细的视频元数据分析和格式检测
  • 🚀 批量处理 - 高效的批量任务管理和并行处理
  • 🎨 多格式支持 - 支持主流视频格式和编码标准
  • 📈 任务监控 - 实时任务状态跟踪和进度管理
  • 🛠️ 高度可配置 - 丰富的编码参数和质量预设

📦 安装使用

npm install -g @pickstar-2002/video-clip-mcp

🔧 MCP 服务器配置

Claude Desktop

claude_desktop_config.json 中添加:

{ "mcpServers": { "video-clip": { "command": "npx", "args": ["@pickstar-2002/video-clip-mcp"] } } }

Cursor AI

.cursorrules 或项目配置中添加:

{ "mcp": { "servers": { "video-clip": { "command": "npx @pickstar-2002/video-clip-mcp" } } } }

WindSurf

windsurfconfig.json 中配置:

{ "mcpServers": { "video-clip": { "command": "npx", "args": ["@pickstar-2002/video-clip-mcp"], "env": {} } } }

CodeBuddy

在项目根目录创建 .codebuddy/mcp.json

{ "servers": { "video-clip": { "command": "npx @pickstar-2002/video-clip-mcp", "description": "视频剪辑处理工具" } } }

其他 MCP 兼容工具

通用配置格式:

{ "mcpServers": { "video-clip": { "command": "npx", "args": ["@pickstar-2002/video-clip-mcp"] } } }

💡 使用示例

基础视频剪辑

// 剪辑视频片段(10秒到30秒) await clipVideo({ inputPath: "input.mp4", outputPath: "output.mp4", timeSegment: { start: 10000, // 10秒(毫秒) end: 30000 // 30秒(毫秒) }, quality: "fast", videoCodec: "libx264" });

视频合并

// 合并多个视频文件 await mergeVideos({ inputPaths: ["video1.mp4", "video2.mp4", "video3.mp4"], outputPath: "merged.mp4", quality: "medium", resolution: { width: 1920, height: 1080 } });

视频分割

// 按时长分割视频 await splitVideo({ inputPath: "long_video.mp4", outputDir: "./segments", splitBy: "duration", duration: 60, // 每60秒一段 namePattern: "segment_{index}.{ext}" });

批量处理

// 批量处理任务 const tasks = [ { type: "clip", options: { inputPath: "video1.mp4", outputPath: "clip1.mp4", timeSegment: { start: 0, end: 30000 } } }, { type: "clip", options: { inputPath: "video2.mp4", outputPath: "clip2.mp4", timeSegment: { start: 10000, end: 40000 } } } ]; await batchProcess({ tasks });

🎥 支持格式

视频格式

  • 输入格式: MP4, AVI, MOV, MKV, WebM, FLV, 3GP, WMV
  • 输出格式: MP4, AVI, MOV, MKV, WebM

视频编码

  • H.264 (libx264) - 通用兼容性最佳
  • H.265 (libx265) - 高压缩比,文件更小
  • VP9 (libvpx-vp9) - 开源编码,适合网络传输
  • AV1 (libaom-av1) - 新一代编码,压缩效率极高

音频编码

  • AAC - 高质量音频编码
  • MP3 (libmp3lame) - 通用兼容性
  • Opus (libopus) - 低延迟高质量
  • Vorbis (libvorbis) - 开源音频编码

🖥️ 系统要求

Node.js 版本

  • 最低要求: Node.js 18.0.0+
  • 推荐版本: Node.js 20.0.0+

系统依赖

  • FFmpeg: 必须安装并配置到系统PATH
  • 操作系统: Windows 10+, macOS 10.15+, Linux (Ubuntu 18.04+)

推荐硬件配置

  • CPU: 4核心以上,支持硬件加速更佳
  • 内存: 8GB RAM 以上
  • 存储: SSD 硬盘,至少2GB可用空间
  • GPU: 支持硬件编码的显卡(可选)

📚 API 文档

核心接口定义

interface VideoClipOptions { inputPath: string; outputPath: string; timeSegment: { start: number; // 开始时间(毫秒) end: number; // 结束时间(毫秒) }; quality?: 'ultrafast' | 'fast' | 'medium' | 'slow' | 'veryslow'; videoCodec?: 'libx264' | 'libx265' | 'libvpx-vp9' | 'libaom-av1'; audioCodec?: 'aac' | 'libmp3lame' | 'libopus' | 'libvorbis'; preserveMetadata?: boolean; } interface MergeVideosOptions { inputPaths: string[]; outputPath: string; quality?: string; videoCodec?: string; audioCodec?: string; resolution?: { width: number; height: number }; fps?: number; } interface SplitVideoOptions { inputPath: string; outputDir: string; splitBy: 'duration' | 'size' | 'segments'; duration?: number; // 按时长分割(秒) maxSize?: number; // 按大小分割(MB) segmentCount?: number; // 分割段数 namePattern?: string; // 文件命名模式 } interface VideoInfo { duration: number; // 时长(秒) width: number; // 宽度 height: number; // 高度 fps: number; // 帧率 bitrate: number; // 比特率 format: string; // 格式 codec: string; // 编码 size: number; // 文件大小(字节) } interface TaskStatus { id: string; type: 'clip' | 'merge' | 'split'; status: 'pending' | 'processing' | 'completed' | 'failed'; progress?: number; createdAt: string; completedAt?: string; error?: string; result?: any; }

主要方法

// 获取视频信息 getVideoInfo(filePath: string): Promise<VideoInfo> // 剪辑视频 clipVideo(options: VideoClipOptions): Promise<string> // 合并视频 mergeVideos(options: MergeVideosOptions): Promise<string> // 分割视频 splitVideo(options: SplitVideoOptions): Promise<string[]> // 批量处理 batchProcess(tasks: BatchTask[]): Promise<string[]> // 获取任务状态 getTaskStatus(taskId: string): Promise<TaskStatus> // 取消任务 cancelTask(taskId: string): Promise<boolean> // 获取支持的格式 getSupportedFormats(): Promise<SupportedFormats>

🤝 贡献指南

我们欢迎所有形式的贡献!请遵循以下步骤:

  1. Fork 本仓库
  2. 创建特性分支: git checkout -b feature/amazing-feature
  3. 提交更改: git commit -m 'Add amazing feature'
  4. 推送分支: git push origin feature/amazing-feature
  5. 提交 Pull Request

开发环境设置

# 克隆仓库 git clone https://github.com/your-username/video-clip-mcp.git cd video-clip-mcp # 安装依赖 npm install # 构建项目 npm run build # 运行测试 npm test

📄 许可证

本项目采用 MIT License 开源协议。您可以自由使用、修改和分发本软件。

🙏 致谢

感谢以下开源项目和社区的支持:

📞 联系方式

如有问题或建议,欢迎联系:

微信: pickstar_loveXX

🌟 支持项目

如果这个项目对您有帮助,请:

  • 给项目点个 Star
  • 🐛 报告问题和建议
  • 📖 查看详细测试报告: 测试报告.md

让我们一起打造更好的视频处理工具!🚀

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A Model Context Protocol server that provides video manipulation capabilities, allowing users to clip, merge, and split video files through MCP integration.

  1. 📖 项目简介
    1. ✨ 核心功能
      1. 📦 安装使用
        1. 🔧 MCP 服务器配置
          1. Claude Desktop
          2. Cursor AI
          3. WindSurf
          4. CodeBuddy
          5. 其他 MCP 兼容工具
        2. 💡 使用示例
          1. 基础视频剪辑
          2. 视频合并
          3. 视频分割
          4. 批量处理
        3. 🎥 支持格式
          1. 视频格式
          2. 视频编码
          3. 音频编码
        4. 🖥️ 系统要求
          1. Node.js 版本
          2. 系统依赖
          3. 推荐硬件配置
        5. 📚 API 文档
          1. 核心接口定义
          2. 主要方法
        6. 🤝 贡献指南
          1. 开发环境设置
        7. 📄 许可证
          1. 🙏 致谢
            1. 📞 联系方式
              1. 🌟 支持项目

                Related MCP Servers

                • A
                  security
                  F
                  license
                  A
                  quality
                  A Node.js server that provides advanced video and image processing capabilities through the Model Context Protocol, enabling operations like conversion, compression, editing, and effects application.
                  Last updated -
                  10
                  1
                  20
                  JavaScript
                  • Apple
                  • Linux
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.
                  Last updated -
                  4
                  TypeScript
                  MIT License
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that enables enhanced file system operations including reading, writing, copying, moving files with streaming capabilities, directory management, file watching, and change tracking.
                  Last updated -
                  12
                  15
                  TypeScript
                  MIT License
                  • Linux
                  • Apple
                • A
                  security
                  F
                  license
                  A
                  quality
                  A comprehensive Model Context Protocol (MCP) server that provides 39 professional image processing tools including basic operations, geometric transformations, color adjustments, filter effects, and advanced batch processing capabilities.
                  Last updated -
                  39
                  Python
                  • Apple
                  • Linux

                View all related MCP servers

                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/pickstar-2002/video-clip-mcp'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server