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
Metadata
Release files for mcpcn-video-format-converter 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcpcn_video_format_converter-0.1.4.tar.gz | 7.3 kB | Without provenance | Details for mcpcn_video_format_converter-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcpcn_video_format_converter-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for mcpcn_video_format_converter-0.1.4-py3-none-any.whl |
Total release size: 15.6 kB
Release files / mcpcn_video_format_converter-0.1.4.tar.gz
| Download URL | mcpcn_video_format_converter-0.1.4.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e3359373a7f05eebd582942726ee30c100b3bbe07ea2dc3be796de84e7724fb
|
|
BLAKE2b-256 checksum How to use checksums |
eb0c3fd252fea7e1b37bfb558d549dc7d9f901ac3460d4f216a413b26a0c8807
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / mcpcn_video_format_converter-0.1.4-py3-none-any.whl
| Download URL | mcpcn_video_format_converter-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a08a71fe86e2af0c626af34152463e5153fcb9579c87e0ae18635e95db9dc36
|
|
BLAKE2b-256 checksum How to use checksums |
0972b6072e4ce1d0ebcbfc4f97f415b0c9098757d302d97d2453c02c12c02192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for mcpcn-video-format-converter 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.