Skip to main content

MCP server for video format conversion using FFmpeg

Project description

Video Format Converter MCP

基于 MCP (Model Context Protocol) 的视频格式转换服务器,使用 FFmpeg 进行视频处理。

功能特性

  • 视频容器转换: MP4、MOV、MKV、WebM、AVI、WMV 等格式互转
  • 视频编码设置: 支持 libx264、libx265、vp9、mpeg4 等编码器
  • 分辨率调整: 支持指定分辨率或按比例缩放
  • 码率控制: 视频码率、音频码率独立设置
  • 音频属性: 编码器、采样率、声道数配置
  • 智能 Remux: 纯换容器时直接复制流,无需重编码

安装

通过 uvx 安装(推荐):

uvx mcpcn-video-format-converter

或通过 pip 安装:

pip install mcpcn-video-format-converter

使用方法

启动 MCP 服务器:

mcpcn-video-format-converter

系统要求

  • Python >= 3.12
  • FFmpeg(需要系统安装)

环境变量

  • FFMPEG_BINARY: 指定 FFmpeg 可执行文件路径
  • FFPROBE_BINARY: 指定 FFprobe 可执行文件路径

工具说明

convert_video_format

批量视频容器转换与属性重设。

参数:

参数 类型 必填 说明
input_video_paths list[string] 输入视频文件路径列表,支持批量转换多个视频
output_dir string 输出目录路径,转换后的视频保存到此目录
target_format string 目标格式 (mp4/mov/mkv/webm/avi/wmv)
resolution string 分辨率,如 '1920x1080' 或 '720'
video_codec string 视频编码器 (libx264/libx265/vp9等)
video_bitrate string 视频码率,如 '2500k'
frame_rate int 帧率,如 24/30/60
audio_codec string 音频编码器 (aac/libopus/mp3等)
audio_bitrate string 音频码率,如 '128k'
audio_sample_rate int 音频采样率,如 44100/48000
audio_channels int 声道数,1=单声道,2=立体声

支持的格式与默认编解码器:

格式 视频编码器 音频编码器 附加参数
mp4/m4v libx264 aac movflags=+faststart
mov libx264 aac -
webm libvpx-vp9 libopus -
mkv libx264 aac -
avi mpeg4 mp3 -
wmv wmv2 wmav2 -

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcpcn_video_format_converter-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcpcn_video_format_converter-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file mcpcn_video_format_converter-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mcpcn_video_format_converter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6bd43aaf92c8d10243bf89ab56094387bda3b7268e71b05fa847a9c4864064bd
MD5 a1636985e0dd1b579b3196c0860b74d1
BLAKE2b-256 8cc4076400e73711243f8afbf949e3e32d61e5e7363a7847838bdc1267b405d8

See more details on using hashes here.

File details

Details for the file mcpcn_video_format_converter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcpcn_video_format_converter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb9c20308787b0cfda66de5c1c1ca2d764d0878566d1687aeb7281dc7c54101d
MD5 03ec2e7b1350f6273cfe1bef84706d91
BLAKE2b-256 f33a58822b7541704273a6817e3345e925abdecb3aade54752fb8c4528a8f08a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page