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.4.tar.gz (7.3 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.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mcpcn_video_format_converter-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8e3359373a7f05eebd582942726ee30c100b3bbe07ea2dc3be796de84e7724fb
MD5 ab4a82d57d0cef72a087c5ab78a99732
BLAKE2b-256 eb0c3fd252fea7e1b37bfb558d549dc7d9f901ac3460d4f216a413b26a0c8807

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcpcn_video_format_converter-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5a08a71fe86e2af0c626af34152463e5153fcb9579c87e0ae18635e95db9dc36
MD5 24abe882faa1a10820794afcdd6e24b8
BLAKE2b-256 0972b6072e4ce1d0ebcbfc4f97f415b0c9098757d302d97d2453c02c12c02192

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