Skip to main content
Glama

Video MCP Server

Video MCP Server

一个基于 Model Context Protocol (MCP) 的视频处理服务器,提供视频格式转换、信息获取和批量处理功能。

功能特性

  • 🎬 视频格式转换 - 支持多种视频格式之间的转换 (MP4, AVI, MOV, WebM, MKV, FLV, WMV, M4V)
  • 📊 视频信息获取 - 获取视频文件的详细信息(时长、分辨率、编解码器等)
  • 🔄 批量处理 - 支持批量转换多个视频文件
  • 实时进度 - 提供转换进度回调
  • 🎯 质量控制 - 支持多种质量预设 (low, medium, high, ultra)
  • 🛠️ 灵活配置 - 支持自定义分辨率、码率、帧率等参数

安装

npm install video-mcp

使用方法

作为 MCP 服务器

在你的 MCP 客户端配置中添加:

{ "mcpServers": { "video-mcp": { "command": "npx", "args": ["video-mcp"] } } }

作为 Node.js 模块

import { convertVideo, getVideoInfo, batchConvert } from 'video-mcp'; // 转换视频格式 const result = await convertVideo({ input: 'input.mp4', output: 'output.webm', format: 'webm', quality: 'high' }); // 获取视频信息 const info = await getVideoInfo('video.mp4'); console.log(`时长: ${info.duration}秒, 分辨率: ${info.video.width}x${info.video.height}`); // 批量转换 const results = await batchConvert({ inputs: ['video1.mp4', 'video2.mp4'], outputDir: './converted', format: 'webm', quality: 'medium' });

MCP 工具

convert_video

转换视频格式

参数:

  • input (string): 输入视频文件路径
  • output (string): 输出视频文件路径
  • format (string): 目标格式 (mp4, avi, mov, webm, mkv, flv, wmv, m4v)
  • quality (string, 可选): 质量预设 (low, medium, high, ultra)
  • resolution (object, 可选): 目标分辨率 {width: number, height: number}
  • videoBitrate (number, 可选): 视频码率
  • audioBitrate (number, 可选): 音频码率
  • frameRate (number, 可选): 帧率
  • overwrite (boolean, 可选): 是否覆盖已存在的文件

get_video_info

获取视频文件信息

参数:

  • filePath (string): 视频文件路径

batch_convert

批量转换视频文件

参数:

  • inputs (array): 输入文件路径数组
  • outputDir (string): 输出目录
  • format (string): 目标格式
  • quality (string, 可选): 质量预设
  • overwrite (boolean, 可选): 是否覆盖已存在的文件

支持的格式

格式扩展名视频编解码器音频编解码器
MP4.mp4H.264AAC
AVI.aviH.264AAC
MOV.movH.264AAC
WebM.webmVP9Opus
MKV.mkvH.264AAC
FLV.flvH.264AAC
WMV.wmvH.264AAC
M4V.m4vH.264AAC

质量预设

预设视频码率音频码率描述
low1000k96k低质量
medium2500k128k中等质量
high5000k192k高质量
ultra8000k320k超高质量

系统要求

  • Node.js 16+
  • FFmpeg (需要在系统PATH中可用)

安装 FFmpeg

Windows:

# 使用 Chocolatey choco install ffmpeg # 或下载预编译版本 # https://ffmpeg.org/download.html#build-windows

macOS:

# 使用 Homebrew brew install ffmpeg

Linux:

# Ubuntu/Debian sudo apt update && sudo apt install ffmpeg # CentOS/RHEL sudo yum install ffmpeg

开发

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

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

更新日志

v1.0.0

  • 初始版本发布
  • 支持多种视频格式转换
  • 提供 MCP 服务器接口
  • 支持批量处理和进度回调
-
security - not tested
F
license - not found
-
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 processing capabilities including format conversion, metadata extraction, and batch processing with configurable quality settings.

  1. 功能特性
    1. 安装
      1. 使用方法
        1. 作为 MCP 服务器
        2. 作为 Node.js 模块
      2. MCP 工具
        1. convert_video
        2. get_video_info
        3. batch_convert
      3. 支持的格式
        1. 质量预设
          1. 系统要求
            1. 安装 FFmpeg
          2. 开发
            1. 许可证
              1. 贡献
                1. 更新日志
                  1. v1.0.0

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that provides web content fetching and conversion capabilities.
                  Last updated -
                  4
                  458
                  2
                  JavaScript
                  MIT License
                  • Apple
                • 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
                  9
                  20
                  JavaScript
                  • Apple
                  • Linux
                • A
                  security
                  A
                  license
                  A
                  quality
                  Model Context Protocol server that enables generating videos from text prompts and/or images using AI models (Luma Ray2 Flash and Kling v1.6 Pro) with configurable parameters like aspect ratio, resolution, and duration.
                  Last updated -
                  2
                  3
                  JavaScript
                  MIT License
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that enables developers to integrate advanced text-to-speech and video translation capabilities into their applications through simple API calls.
                  Last updated -
                  Python
                  MIT License

                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-mcp'

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