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.1.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.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mcpcn_video_format_converter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 63df66dd57a197489c08c0bcb5482ee53f35275307d015b56051302d03e626d2
MD5 70a7e3a06e7adbbd886988d1c05ea726
BLAKE2b-256 b8903368dac3467b89af793caba71ff240e5e775fb61580951964f77ec3e2e22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcpcn_video_format_converter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3d3f26f51759cb87c493200724188475e14a8eb7bc65b0d12152f3f85ed271d
MD5 6dbddeda56f70a7ccf1d2a7f6a82a81f
BLAKE2b-256 49dcc1681a351244f661889ec2c5e19eb8db20371d470d68908fda5af02a6673

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