FFmpeg-MCP Server
The FFmpeg-MCP Server provides a convenient interface for video management and manipulation using FFmpeg, with capabilities including:
Find Video Path: Search for videos recursively with partial filename matching
Get Video Info: Retrieve details about videos (duration, fps, codec, resolution)
Clip Video: Trim videos by specifying start/end times or duration
Concat Videos: Merge multiple videos with fast or standard concatenation options
Play Video: Use FFplay to watch videos with adjustable speed and looping
Overlay Video: Create picture-in-picture effects with customizable positioning
Scale Video: Resize videos while optionally maintaining aspect ratio
Extract Frames: Save frames from videos as images (PNG, JPG, WEBP)
Provides tools for video manipulation including searching, clipping, concatenating, playing, overlaying, and scaling videos through FFmpeg's command line capabilities.
Offers platform support for macOS (both ARM64 and x86_64 architectures), allowing the video manipulation tools to function on Apple's desktop operating system.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FFmpeg-MCP Server trim my vacation video from 00:30 to 02:15"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FFmpeg-MCP
Using ffmpeg command line to achieve an mcp server, can be very convenient, through the dialogue to achieve the local video search, tailoring, stitching, playback and other functions
Support Tools
The server implements the following tools:
find_video_pathThe parameters are directory and file name, file name can be complete, or is not suffixed, recursive search in the directory, return the full pathget_video_infoThe parameters are video path, return the video info, linkes duration/fps/codec/width/height.clip_videoThe parameter is the file path, start time, end time or duration, and returns the trimmed file pathconcat_videosThe parameters are the list of files, the output path, and if the video elements in the list of files, such as width, height, frame rate, etc., are consistent, quick mode synthesis is automatically usedplay_videoPlay video/audio with ffplay, support many format, like mov/mp4/avi/mkv/3gp, video_path: video path speed: play rate loop: play countoverlay_videoTwo video overlay. background_video: backgroud video path overlay_video: front video path output_path: output video path position: relative location dx: x offset dy: y offsetscale_videoVideo scale. video_path: in video path width: out video width, -2 keep aspect height: out video height, -2 keep aspect output_path: output video pathextract_frames_from_videoExtract images from a video. Parameters: video_path (str): The path to the video. fps (int): Extract one frame every specified number of seconds. If set to 0, extract all frames; if set to 1, extract one frame per second. output_folder (str): The directory where the images will be saved. format (int): The format of the extracted images; 0: PNG, 1: JPG, 2: WEBP. total_frames (int): The maximum number of frames to extract. If set to 0, there is no limit
Related MCP server: mcp-video
Installation procedure
Download project
git clone https://github.com/video-creator/ffmpeg-mcp.git
cd ffmpeg-mcp
uv syncConfiguration in Cline
{
"mcpServers": {
"ffmpeg-mcp": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"command": "uv",
"args": [
"--directory",
"/Users/xxx/Downloads/ffmpeg-mcp",
"run",
"ffmpeg-mcp"
],
"transportType": "stdio"
}
}
}Note: the value:/Users/XXX/Downloads/ffmpeg in args need to replace the actual download ffmpeg-mcp directory
Supported platforms
Currently, only macos platforms are supported, including ARM64 or x86_64
Available Tools
8 toolsclip_videoB
智能视频剪辑函数
参数:
video_path : str - 源视频文件路径
start : int/float/str - 开始时间(支持秒数、MM:SS、HH:MM:SS格式,默认为视频开头,如果不传该参数,或者该参数为负数,从视频结尾往前剪辑)
end : int/float/str - 结束时间(同上,默认为视频结尾)
duration: int/float/str - 裁剪时长,end和duration必须有一个
output_path: str - 裁剪后视频输出路径,如果不传入,会有一个默认的输出路径
time_out: int - 命令行执行超时时间,默认为300s
返回:
error - 错误码
str - ffmpeg执行过程中所有日志
str - 生成的剪辑文件路径
示例:
clip_video("input.mp4", "00:01:30", "02:30")
Inputs: video_path (required), duration, end, output_path, +2 more.
concat_videosA
使用FFmpeg拼接多个视频文件
参数:
input_files (List[str]): 输入视频文件路径列表
output_path (str): 合并后的输出文件路径,如果不传入,会一个默认的输出路径
fast (bool): 拼接方法,可选值:"True"(默认,要求所有视频必须具有相同的编码格式、分辨率、帧率等参数)| "False(当不确定合并的视频编码格式、分辨率、帧率等参数是否相同的情况下,这个参数应该是False)"
返回:
执行日志
注意:
1. 当fast=True时,要求所有视频必须具有相同的编码格式、分辨率、帧率等参数
2. 推荐视频文件使用相同编码参数,避免拼接失败
3. 输出文件格式由output_path后缀决定(如.mp4/.mkv)
Inputs: input_files (required), fast, output_path.
extract_frames_from_videoB
提取视频中的图像。
参数:
video_path(str) - 视频路径。
fps(int) - 每多少秒抽一帧,如果传0,代表全部都抽,传1,代表每一秒抽1帧。
output_folder(str) - 把图片输出到哪个目录
format(int) - 抽取的图片格式,0:代表png 1:jpg 2:webp
total_frames(int) - 最多抽取多少张,0代表不限制
Inputs: video_path (required), format, fps, output_folder, +1 more.
find_video_pathB
可以查找视频文件路径,查找文件路径,递归查找精确匹配文件名的视频文件路径(支持带或不带扩展名)
参数:
root_path - 要搜索的根目录
video_name - 视频文件名(可以带扩展名,但会忽略扩展名匹配)
返回:
首个匹配的视频文件完整路径,找不到时返回空字符串
Inputs: root_path (required), video_name (required).
get_video_infoC
获取视频信息,包括时长,帧率,codec等
参数:
video_path (str): 输入视频文件路径
返回:
视频详细信息
Inputs: video_path (required).
overlay_videoB
两个视频叠加,注意不是拼接长度,而是画中画效果
参数:
background_video(str) - 背景视频文件的路径。
overlay_video(str) - 前景视频文件路径。
output_path(str) - 输出路径
position(enum) - 相对位置,TopLeft=1: 左上角,TopCenter=2: 上居中, TopRight=3: 右上角 RightCenter=4: 右居中 BottomRight=5: 右下角 BottomCenter=6: 下居中 BottomLeft=7: 左下角 LeftCenter=8: 左居中 Center=9: 居中
dx(int) - 整形,前景视频坐标x偏移值
dy(int) - 整形,前景视频坐标y偏移值
Inputs: background_video (required), overlay_video (required), dx, dy, +2 more.
play_videoB
使用 ffplay 播放视频文件,支持mkv,mp4,mov,avi,3gp等等
参数:
video_path(str) - 视频文件的路径。
speed(float) - 浮点型,播放速率,建议0.5-2之间。
loop(int) - 整形,是否循环播放,1:不循环,播放后就退出,0: 循环播放。
Inputs: video_path (required), loop, speed.
scale_videoC
视频缩放
参数:
width(int) - 目标宽度。
height(int) - 目标高度。
output_path(str) - 输出路径
Inputs: height (required), video_path (required), width (required), output_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have distinct purposes (clipping, concatenating, extracting frames, finding files, getting info, overlaying, playing, scaling), but 'clip_video' and 'scale_video' could be confused as both modify video dimensions, though 'clip_video' focuses on time-based trimming while 'scale_video' adjusts resolution. The descriptions clarify this difference, but some overlap exists in the general 'video modification' category.
The naming follows a consistent verb_noun pattern (e.g., clip_video, concat_videos, extract_frames_from_video), with all tools using snake_case. However, 'find_video_path' slightly deviates by including 'path' in the noun, while others use more generic terms like 'video' or 'frames', but this is minor and doesn't break readability.
With 8 tools, the count is well-scoped for an FFmpeg server, covering core video processing tasks like editing, merging, extracting, overlaying, scaling, and playback. Each tool serves a clear function without redundancy, making it a manageable and comprehensive set for typical video manipulation workflows.
The toolset covers essential FFmpeg operations including trimming, merging, frame extraction, file finding, info retrieval, overlaying, playback, and scaling. Minor gaps exist, such as no direct tools for audio extraction or format conversion, but these can be worked around with existing tools (e.g., using clip_video or overlay_video creatively). The core video editing lifecycle is well-represented.
Maintenance
Related MCP Connectors
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Hosted MCP tools for FFmpeg-style video and audio processing through FFMPEG API.
FFmpeg processing for video, audio and images via MCP with OAuth and shared account allowance.
MCP server for Wan AI video generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for programmatic video editing using ffmpeg, enabling draft creation and refinement via natural language.6 npmISC
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables LLMs to analyze video content by extracting frames as base64 images and retrieving video metadata using ffmpeg.7 npmMIT
- AlicenseAqualityDmaintenanceEnables LLMs to perform FFmpeg operations like clipping, merging, extracting audio, adding subtitles, and transcoding videos via a set of tools exposed as an MCP server.58MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables natural language video editing using FFmpeg, supporting operations like trimming, merging, format conversion, and more with real-time progress tracking.-