ffmpeg-mcp
Summary: This MCP server wraps FFmpeg so an AI assistant can inspect, edit, and produce video/audio files through validated tool calls.
Inspect media — probe a video for streams, codecs, and duration (
get_video_metadata).Extract assets — pull frames as images (evenly spaced, by interval, or 1/sec) and rip audio to
.wav.Basic edits — clip segments by start/duration, crop to a region, and upscale to 1080p/2K/4K.
GIFs — turn any segment of a video into an optimized animated GIF.
Overlays — composite a logo/watermark image with position, scale, opacity, and timing, or overlay a looping video on another.
Combine clips — trim and stitch multiple clips into one portrait video, normalize clips to a common resolution/fps/codec in parallel, and concatenate with
xfadetransitions (fade, wipes, slides, dissolves, circles, and dozens more).Output control — every render returns an output file path (or a structured error) written to the configured output directory.
Provides tools for media processing including video metadata retrieval, frame and audio extraction, scaling, cropping, clipping, GIF creation, and video concatenation with transitions and overlays.
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 extract the audio from recording.mp4"
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 🎬⚡
The AI video editor for Claude, Cursor and every MCP client. Edit, caption and produce videos just by asking.
ffmpeg-mcp is a Model Context Protocol (MCP) server that turns FFmpeg into an AI video editing toolkit your LLM can drive. It covers automatic captions and subtitles (local Whisper speech-to-text), Instagram Reels, YouTube Shorts and TikTok formatting, beat-synced montages, jump cuts, punch-in zooms, speed ramps, transitions, colour grading, background music with ducking, and one-call video production from raw clips to an upload-ready MP4. It also has the classic tools: clip, crop, scale, overlay, concatenate, extract frames and audio, and make GIFs. No command-line flags to memorize.
uvx ffmpeg-mcp-studio # that's it - add it to your MCP client (see Quick Start)
✨ Why ffmpeg-mcp?
FFmpeg is incredibly powerful and incredibly hard to remember. ffmpeg-mcp hands that power to your AI assistant so you can say what you want in plain English:
"Grab the first 10 seconds of
demo.mov, scale it to 1080p, slap my logo in the top-right corner, and turn it into a GIF."
…and the model orchestrates the right tools for you. Each tool is a small, validated Python function — easy to read, reuse, and extend.
🗣️ Natural-language video editing — works in any MCP client (Claude Desktop, Cursor, Cline, …)
🎞️ Creator editing — Reels/Shorts reframing, word-by-word animated captions, titles, punch-in zooms, speed ramps, beat-synced cuts, jump cuts, colour looks and ducked music
🎬 Full video production — one declarative timeline (or a one-call preset) renders a finished, upload-ready video
🧱 29 focused tools — composable building blocks instead of one giant black box
✅ Input validation built in — paths are checked for existence, emptiness, and validity before FFmpeg runs
🧩 Hackable — add a new tool by writing one function and registering it
Related MCP server: ff-toolkit
🎯 Use Cases
Talking-head Reels & Shorts: vertical crop, karaoke-style animated captions, punch-in zooms and automatic jump cuts from one recording.
Beat-synced montages: travel, event and product clips cut exactly on the beat of your song.
Podcast & interview clips: transcribe, cut highlights, burn in subtitles and export for every platform.
Product promos & ads: titles, logo watermark, colour look, music and transitions in one timeline.
Batch content repurposing: turn landscape YouTube footage into 9:16 TikTok/Reels/Shorts with blurred-background fill.
Everyday FFmpeg chores: trim, crop, scale, GIFs, frame grabs and audio extraction, by just asking.
🛠️ Available Tools
Tool | What it does | Key parameters |
| Probe a file for streams, codecs, duration, etc. |
|
| Save frames as images (evenly, by interval, or 1/sec) |
|
| Pull audio out to a |
|
| Upscale to |
|
| Crop to a region |
|
| Cut a sub-clip by start + duration |
|
| Turn a segment into an optimized GIF |
|
| Composite an image (logo/watermark) with timing & opacity |
|
| Overlay a (looping) video onto another |
|
| Trim multiple clips and stitch them together |
|
| Normalize clips to a common res/fps/codec (in parallel) |
|
| Concatenate clips with an |
|
?marks optional parameters.concat_clips_with_transitionsupports many transitions —fade,wipeleft,slideup,circlecrop,dissolve,pixelize,radial, and dozens more.
🎞️ Creator editing tools
Tool | What it does | Key parameters |
| Convert to 9:16 / 1:1 / 4:5 / 16:9 |
|
| Styled, auto-wrapped title or label with an animation |
|
| Local speech-to-text with word timestamps (faster-whisper) → |
|
| Burned-in word-synced captions (karaoke highlight, one word at a time, phrases) |
|
| Constant speed, slow-mo segments or gradual speed ramps (pitch preserved) |
|
| Punch-in zooms and ken-burns push |
|
| Looks: |
|
| Music bed that loops/trims, fades and auto-ducks under speech |
|
| Tempo, beat and downbeat times of a song |
|
| Jump-cut out pauses and dead air |
|
| Upload-ready file: right size, H.264/AAC, fast-start, −14 LUFS |
|
| Contact sheet of timestamped thumbnails to check an edit |
|
🎬 Full video production
Tool | What it does |
| Lists every format, platform, style, colour preset, transition and position the tools accept |
| Renders a whole edit from a JSON timeline: per-clip trim → speed → reframe → zoom → colour, joined with transitions, then captions, titles, logos, music and platform export. |
| One call: videos/photos → captioned, titled, transitioned 9:16 Reel with music |
| One call: cuts between clips exactly on the song's beats, with pulse zooms on downbeats |
| One call: talking-to-camera recording → vertical crop, karaoke captions, punch-ins, optional jump cuts, ducked music |
Example render_composition spec:
{
"format": "reel",
"clips": [
{"path": "/videos/hook.mp4", "end": 4, "zoom": [{"start": 1.5, "end": 4, "zoom": 1.2, "ease": "snap"}]},
{"path": "/videos/broll.mp4", "start": 2, "end": 6, "speed_ramp": [{"start": 1, "end": 3, "speed": 0.4}], "color": "cinematic"},
{"path": "/photos/product.jpg", "image_duration": 2.5, "transition_in": {"type": "slideup", "duration": 0.3}}
],
"default_transition": {"type": "fade", "duration": 0.4},
"text_overlays": [{"text": "3 editing tricks", "start": 0, "duration": 2.5, "style": "title", "animation": "slide_up"}],
"image_overlays": [{"path": "/brand/logo.png", "position": "top_right", "width": 160, "opacity": 0.9}],
"captions": {"style": "karaoke", "mode": "phrase_highlight"},
"music": {"path": "/music/track.mp3", "volume": 0.25, "duck": true},
"export": {"platform": "instagram_reel"}
}Times: clip start/end and speed_ramp are in source seconds; zoom is in seconds within the clip's output; text/image overlays are on the final timeline. Auto-generated transcripts are saved to the transcripts/ folder in the output directory. Fix any misheard words in the JSON and pass it back as captions.transcript_path.
Text and captions are rendered with Pillow using the bundled Montserrat font, so they work even on FFmpeg builds without
libass/freetype. The first caption run downloads the faster-whisper model (~145 MB forbase).
📦 Requirements
Verify FFmpeg is available:
ffmpeg -version🚀 Quick Start
Option A: run with uvx (recommended)
No clone needed. uvx downloads and runs the server in an isolated environment:
uvx ffmpeg-mcp-studioAdd it to your MCP client:
{
"mcpServers": {
"ffmpeg-mcp": {
"command": "uvx",
"args": ["ffmpeg-mcp-studio"],
"env": { "FFMPEG_MCP_OUTPUT_DIR": "/Users/you/Movies/ffmpeg-mcp" }
}
}
}claude mcp add ffmpeg-mcp -- uvx ffmpeg-mcp-studio{
"mcpServers": {
"ffmpeg-mcp": {
"command": "uvx",
"args": ["ffmpeg-mcp-studio"],
"timeout": 600,
"transportType": "stdio"
}
}
}To run the latest unreleased code straight from GitHub: uvx --from git+https://github.com/yubraaj11/ffmpeg-mcp ffmpeg-mcp-studio. You can also pip install ffmpeg-mcp-studio and run ffmpeg-mcp-studio.
Option B: run from source (for development)
git clone https://github.com/yubraaj11/ffmpeg-mcp.git
cd ffmpeg-mcp
uv sync --frozen{
"mcpServers": {
"ffmpeg-mcp": {
"command": "uv",
"args": ["--directory", "/path/to/ffmpeg-mcp", "run", "ffmpeg-mcp-studio"]
}
}
}Where outputs go
Setting | Output folder |
| that folder |
Installed via |
|
Running from a source checkout |
|
Long renders (captions, full compositions) can take a minute or more. If your client has a tool timeout, raise it (e.g.
"timeout": 600in Cline).
Where to find it
Where | What it is |
The package that | |
| |
Directory listing | |
Source code, issues and releases |
The config goes in your MCP client:
Client | Config location |
Claude Desktop |
|
Cursor |
|
Claude Code |
|
Cline | Cline → MCP Servers → Configure → |
When the client starts, uvx fetches the package from PyPI into its cache (~/.cache/uv) and runs it locally. Your videos never leave your machine.
Restart your client and start editing
"Extract 5 evenly-spaced frames from
intro.mp4.""Make a 3-second GIF from
clip.movstarting at 12s.""Concatenate
a.mp4,b.mp4, andc.mp4with a 1-secondwipelefttransition between them.""Turn
talk.movinto a Reel with karaoke captions, cut out the pauses, and putlofi.mp3quietly underneath.""Make a 15-second beat-synced montage of everything in
~/trip/tosong.mp3, starting at the drop at 0:42."
🧰 Project Layout
ffmpeg_mcp/
├── main.py # MCP server entry point — registers all tools
├── services/ # one module per tool
├── core/ # paths, probing, ffmpeg runner, text rendering, styles, transcription, beats
├── effects/ # reusable filter builders: reframe, speed, zoom, color, audio, text
├── composition/ # timeline models, multi-stage renderer, preset recipes
├── utils/ # validation decorators & helpers
├── assets/fonts/ # bundled OFL font for titles and captions
├── configs/ # colored logging setup
└── exceptions/ # structured error messages
tests/ # pytest suite on synthetic media
server.json # MCP Registry manifestSingle-effect tools and the composition renderer share the same filter builders in effects/, so each effect has a single implementation.
Every tool returns either the output file path or a structured JSON error (status, error_type, message, time), so failures are easy for the model to read and recover from.
❓ FAQ
How do I add automatic captions or subtitles to a video with Claude?
Install the server, then ask: "Add karaoke captions to /path/talk.mp4". It transcribes locally with Whisper (add_captions) and burns in word-synced captions. Use transcribe_audio if you only want an .srt file.
Can it make Instagram Reels, YouTube Shorts or TikToks?
Yes. make_reel_from_clips, talking_head_reel and beat_sync_montage output 1080×1920 videos, and export_for_platform produces upload-ready files (H.264/AAC, fast-start, −14 LUFS) for instagram_reel, tiktok, youtube_shorts and more.
Does it upload my videos anywhere? No. Everything, including speech-to-text, runs locally with FFmpeg. Only the Whisper model is downloaded once from Hugging Face.
Which MCP clients does it work with? Any client that supports stdio MCP servers: Claude Desktop, Claude Code, Cursor, Windsurf, Cline, Continue, Zed and others.
Do I need FFmpeg installed?
Yes. Install ffmpeg (which includes ffprobe) and make sure it is on your PATH (brew install ffmpeg, apt install ffmpeg, or winget install ffmpeg).
Is it an alternative to CapCut or Instagram Edits? It covers many of the same creator features (captions, beat sync, speed ramps, zooms, transitions, music), driven by your AI assistant and scriptable through a JSON timeline instead of a GUI.
🤝 Contributing
Contributions are very welcome! Adding a tool is roughly:
Write a function in
ffmpeg_mcp/services/your_tool.py.Export it from
ffmpeg_mcp/services/__init__.py.Register it in
main.pywithmcp.tool(name_or_fn=your_tool).
Please run the linter and tests before opening a PR:
uv run ruff check .
uv run pytestReleasing (maintainers)
Bump
versioninpyproject.tomland bothversionfields inserver.json.Merge to
main, then tag:git tag v0.2.0 && git push origin v0.2.0.The Release workflow checks the versions match, builds, publishes to PyPI (using the
PYPI_API_TOKENsecret) and then to the MCP Registry.
Found a bug or have an idea? Open an issue — and if this project saves you from another ffmpeg man-page dive, consider leaving a ⭐.
📄 License
MIT. The bundled Montserrat font is licensed under the SIL Open Font License.
📚 Built With
fastmcp— the MCP server frameworkffmpeg-python— Python bindings for FFmpegpydantic— data validationcolorlog— colored logsfaster-whisper— local speech-to-text for captionslibrosa— beat trackingPillow— title and caption rendering
Available Tools
12 toolsclip_videoA
Generate a video clip from the given video file using ffmpeg-python.
Args: input_video_path (str): Path to the source video file. start_timestamp (float, optional): Start time in seconds. Defaults to 0.0. duration (float, optional): Clip length in seconds. Defaults to 5.0.
Returns: str: Path to the generated clip, or an exception message string on failure.
Inputs: input_video_path (required), start_timestamp, duration.
concat_clips_with_transitionA
Concatenate multiple video clips with transitions.
Args: input_video_clips (List[str]): A list of file paths (strings) to the video clips that will be concatenated. transition_type (str, optional): The type of transition to apply between clips. Supported transitions include: - fade (default), fadeblack, fadewhite, distance - wipeleft, wiperight, wipeup, wipedown - slideleft, slideright, slideup, slidedown - smoothleft, smoothright, smoothup, smoothdown - circlecrop, rectcrop, circleclose, circleopen - horzclose, horzopen, vertclose, vertopen - diagbl, diagbr, diagtl, diagtr - hlslice, hrslice, vuslice, vdslice - dissolve, pixelize, radial, hblur - wipetl, wipetr, wipebl, wipebr - zoomin, fadegrays, squeezev, squeezeh - hlwind, hrwind, vuwind, vdwind - coverleft, coverright, coverup, coverdown transition_duration (float, optional): Duration of the transition effect in seconds.
Returns: str: The absolute path to the final concatenated video with transitions applied.
Inputs: input_video_clips (required), transition_type, transition_duration. Returns: result
crop_videoB
Crop a video using ffmpeg-python.
Params: input_video_path: Path to input video (required) safe_crop: If True, allows exact cropping (ignores mod-2 restrictions). Default: False height: Output height (default: 480) width: Output width (default: 640) x_offset: Top-left X coordinate of crop (default: 0) y_offset: Top-left Y coordinate of crop (default: 0)
Returns: str: Path to the cropped video.
Inputs: input_video_path (required), safe_crop, height, width, +2 more.
extract_audioB
Function to extract audio from the given input video.
Params: input_video_path (str): Path to the input video.
Returns: audio_file_path (str): Path to the audio file.
Inputs: input_video_path (required).
extract_framesA
Extract frames from a video file and save each frame with a unique UUID filename.
Behavior:
- If number_of_frames is provided, extracts that many frames evenly across the video.
If requested frames exceed total frames available, caps at total frames.
- If timestamp_offset is provided (and number_of_frames is None), extracts frames
at every given second interval.
- If neither is provided, defaults to extracting one frame per second.
- number_of_frames takes priority if both are provided.
Params: input_video_path (str): Path to the input video file. number_of_frames (Optional[int]): Total number of frames to extract evenly across the video. timestamp_offset (Optional[int]): Time interval in seconds between frames.
Returns: List[str]: List of file paths for the extracted frames with UUID-based filenames.
Inputs: input_video_path (required), number_of_frames, timestamp_offset. Returns: result
get_normalized_clipsA
Normalize multiple video clips in parallel by adjusting resolution, frame rate, codec, and compression parameters.
Parameters: input_video_clips (list[str]): should give input video clips in the form of string resolution (tuple, optional): Target resolution as (width, height). Defaults to (1280, 720). frame_rate (int, optional): Target frame rate. Defaults to 30. crf (int, optional): Constant Rate Factor for quality control (lower = better quality). Defaults to 23. audio_bitrate (str, optional): Target audio bitrate. Defaults to '128k'. preset (str, optional): Encoding speed vs. compression efficiency preset. Defaults to 'fast'. max_workers (int, optional): Number of parallel worker threads. If None, uses os.cpu_count().
Returns: list: Sorted list of file paths to the successfully normalized video clips.
Notes: - Runs normalization tasks in parallel using ThreadPoolExecutor. - Includes a progress bar (tqdm) to track processing status. - Automatically determines the number of workers based on CPU cores if not specified. - Skips clips that encounter errors but continues processing the rest.
Inputs: input_video_clips (required), resolution, frame_rate, crf, +2 more.
get_video_metadataC
Function to extract metadata of the given input video.
Params: input_video_path (str): Path to the input video.
Returns: JSON of the video metadata.
Inputs: input_video_path (required).
make_gifB
Make gif using video path provided by user.
Args: input_video_path (str): Path to the source video file. start_timestamp (float, optional): Start time in seconds. Defaults to 0.0. duration (float, optional): Clip length in seconds. Defaults to 4.0.
Returns: str: Path to the generated clip, or an exception message string on failure.
Inputs: input_video_path (required), start_timestamp, duration.
overlay_imageA
Overlay an image on top of a video with timing control.
Args: input_video_path (str): Path to background video. overlay_image_path (str): Path to image file. output_filename (str): Output video filename (saved inside VIDEO_OVERLAY_PATH). positioning (Literal): Where to place overlay. scale (tuple | None): (width, height) to resize image before placing. keep_audio (bool): Whether to keep background audio. opacity (float | None): Transparency level (0–1). None = no alpha applied. start_time (float): When to start showing overlay (seconds). duration (float | None): How long to show overlay (seconds). None = until end of video.
Returns: str: Path to generated video.
Inputs: input_video_path (required), overlay_image_path (required), output_filename, positioning, +5 more. Returns: result
overlays_videoA
Overlay a video on top of another with simple positioning. Loops the overlay video until the background video ends, trimming any extra frames.
Args: input_video_path (str): Path to background video. overlay_video_path (str): Path to overlay video. output_filename (str): Name of the output video file (saved inside VIDEO_OVERLAY_PATH). positioning (Literal): Where to place overlay. scale (tuple): (width, height) to resize overlay video before placing. keep_audio (bool): Whether to keep background audio.
Returns: str: Path to the generated video.
Inputs: input_video_path (required), overlay_video_path (required), output_filename, positioning, +2 more. Returns: result
scale_videoA
Upscales a video to 1080p, 2K, or 4K using FFmpeg while preserving aspect ratio and color accuracy.
Args: input_video_path (str): Path to the input video file. resolution (str, optional): Target resolution for upscaling. Acceptable values are '1080p', '2k', or '4k'. Defaults to '1080p'.
Returns: str: Path to the upscaled video if successful.
Inputs: input_video_path (required), resolution. Returns: result
trim_and_concat_operationA
Trim and concatenate multiple videos (portrait orientation, normalize format).
Args: inputs (list[dict]): Each dict must have: - 'path' (str): path to the video file - 'start_time' (str, optional): start time in seconds - 'end_time' (str, optional): end time in seconds width (int): Width to scale each video (portrait). height (int): Height to scale each video (portrait). x (int): X position for overlay (default 0). y (int): Y position for overlay (default 0).
Returns: str: Path to the output video if successful. None: If an error occurs.
Inputs: inputs (required), width, height, x, +1 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools have distinct purposes like clipping, cropping, extracting, and overlaying, but some overlap exists: 'clip_video' and 'trim_and_concat_operation' both involve trimming video segments, which could cause confusion. However, their descriptions clarify that 'clip_video' is for single clips while 'trim_and_concat_operation' handles multiple videos with concatenation, mitigating ambiguity.
The naming is mixed with no clear pattern: some tools use verb_noun (e.g., 'clip_video', 'crop_video'), others use noun_verb (e.g., 'get_video_metadata'), and there are inconsistencies like 'overlay_image' vs. 'overlays_video'. While readable, the lack of a consistent convention across all tools reduces predictability.
With 12 tools, the count is well-scoped for a video processing server, covering essential operations like editing, conversion, and metadata extraction. Each tool serves a specific function without redundancy, making the set comprehensive yet manageable for typical video manipulation tasks.
The toolset covers core video processing needs including clipping, cropping, scaling, overlaying, and format conversion, with good lifecycle coverage. Minor gaps exist, such as no direct tool for adding subtitles or advanced audio editing beyond extraction, but agents can likely work around these with the provided tools.
Maintenance
Related MCP Connectors
FFmpeg processing for video, audio and images via MCP with OAuth and shared account allowance.
Hosted MCP tools for FFmpeg-style video and audio processing through FFMPEG API.
FFmpeg Micro - The FFmpeg Api - www.ffmpeg-micro.com Transcode videos from n8n or Make using FFmpeg in the cloud. MCP Server: https://github.com/ffmpeg-micro/ffmpeg-micro-mcp/
MCP server for the FFmpeg Micro video transcoding API — create, monitor, download transcodes.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables comprehensive video/audio processing, analysis, and streaming via natural language by exposing 40+ FFmpeg tools as MCP tools.24-
- 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
- AlicenseAqualityNot gradedmaintenanceProvides 30+ FFmpeg video and audio editing tools via MCP, enabling AI assistants to perform operations like trimming, transcoding, overlays, and composition directly.274MIT
- AlicenseBqualityCmaintenanceEnables any MCP host to probe, transcode, remux, extract, convert, thumbnail, and burn subtitles for video, audio, and images using local FFmpeg with safe typed tools and quality-first CRF/VBR defaults.10MIT