ffmpeg-mcp-server
Use this MCP server to inspect and process local video/audio files with typed FFmpeg/ffprobe tools.
Probe media metadata, streams, codecs, resolution, bitrate, and duration.
Convert formats (MP4/WebM/GIF), compress to size/quality targets, trim/cut, concatenate, change speed, reformat aspect ratios, and create split-screen videos.
Extract audio (including Whisper WAV), thumbnails, keyframes/contact sheets, and waveform images, with base64 previews for vision models.
Add soft subtitle tracks or burn hard subtitles; normalize loudness and remove silence.
Watermark/overlay video and use hardware acceleration where supported.
Note: the schema exposes 17 tools; the README-mentioned mux_media and detect_scenes are not present in the provided schema.
Provides tools for inspecting, converting, trimming, extracting audio and thumbnails, compressing, concatenating, generating waveforms, embedding subtitles, and changing playback speed of video and audio files using local FFmpeg and ffprobe.
ffmpeg-mcp-server
A Model Context Protocol (MCP) server that gives AI tools access to FFmpeg and FFprobe to process video and audio locally.
Supports cross-platform GPU hardware encoding (Apple Silicon, NVIDIA NVENC, Intel QuickSync, AMD AMF), live progress updates via MCP progress tokens, instant cancellation via AbortSignal, and inlines image previews directly for multimodal vision models.
Why This Exists
When AI agents process media, they often hallucinate invalid flags, syntax errors, or incompatible pixel formats.
This server provides 19 typed tools using Zod schemas. The AI passes parameters (such as { inputPath: "video.mov", preset: "web_mp4" }), and the server runs the valid FFmpeg command locally with proper error handling, hardware acceleration, and progress notifications.
Related MCP server: ffmpeg-mcp
Key Features
Universal Hardware Acceleration: Automatically detects and leverages hardware encoders across macOS (VideoToolbox), Linux/Windows GPUs (NVIDIA NVENC, Intel QuickSync, AMD AMF, and VA-API) for 5x–20x faster exports with low CPU usage.
Real-time Progress Reporting: Emits live percentage updates via standard MCP progress tokens (
notifications/progress), enabling progress bars in modern AI clients.Instant Cancellation: Listens to client
AbortSignalevents to immediately terminate child FFmpeg processes when a generation is stopped.Multimodal Vision Previews: Inlines base64 image data for thumbnails, audio waveforms, and multi-frame contact sheets so vision models (Claude 3.7, GPT-4o, Gemini) can "see" media content.
Social Formats & Automation: Reformats landscape video to 9:16 vertical video with blurred backgrounds, burns customizable hardcoded subtitles, and stacks top/bottom split-screen reels for TikTok and Instagram Reels.
Audio Engineering: Normalizes loudness to broadcast/streaming standards (EBU R128 / -16 LUFS), cleans vocal audio with 80Hz rumble removal, and trims dead air while preserving lip-sync.
Scene Intelligence & Multiplexing: Detects visual scene changes and cut points for smart editing workflows, and combines or replaces video/audio tracks with zero-loss stream copy.
Included Tools (19 Total)
Tool | Description | Key Parameters |
| Inspects media files with ffprobe. Returns metadata, streams, codecs, resolution, and duration as JSON. |
|
| Converts video and audio formats. Includes presets for web MP4, WebM, and animated GIF with GPU acceleration. |
|
| Cuts a segment from a video or audio file using stream copy or re-encoding. |
|
| Rips audio tracks from video. Includes a 16kHz mono WAV preset for Whisper speech recognition. |
|
| Captures a still image at a timestamp or midpoint. Returns base64 image data for vision models. |
|
| Compresses video to fit target sizes (such as GitHub PRs under 10MB or Discord under 25MB). |
|
| Changes video ratio to 9:16 vertical, 1:1 square, or 4:5 portrait with blurred borders or center crop. |
|
| Stacks two videos top-and-bottom (9:16 Reels/TikTok) or side-by-side with audio mixing and subtitles. |
|
| Detects and removes silent pauses from recordings while preserving video & audio lip-sync. |
|
| Joins multiple video or audio files in order using stream copy or re-encoding. |
|
| Generates a PNG waveform image. Returns base64 image data for vision models. |
|
| Embeds SRT or VTT subtitle tracks into MP4/MKV video files without re-encoding video. |
|
| Hardcodes subtitles directly onto video frames with customizable font size, colors, and margins. |
|
| Extracts multiple representative frames across the video and generates a contact sheet grid for vision AI. |
|
| Normalizes audio loudness using EBU R128 (default -16 LUFS) with optional speech clarity high-pass filter. |
|
| Places a watermark image or logo PNG over video with customizable corner position, scale, and opacity. |
|
| Adjusts playback speed (such as 2x fast forward or 0.5x slow motion) with pitch correction. |
|
| Combines or replaces video and audio streams with optional audio offset delay and zero-loss stream copy. |
|
| Detects video cut points and scene transitions with adjustable sensitivity. Returns timestamps, scene durations, and an optional contact sheet. |
|
MCP Resources & Prompts
Resources
media://capabilities: Inspects local FFmpeg installation, active version, detected hardware accelerators (VideoToolbox, NVENC, QSV, AMF, VAAPI), and supported video encoders.media://presets: Standard reference table of social aspect ratios, platform upload file size limits, and broadcast audio loudness targets.
Prompts
social_clip_generator: Interactive workflow that turns raw landscape video into vertical shorts with blurred background padding, trimmed silence, and hardcoded captions.whisper_audio_prep: Standard pipeline for extracting 16kHz mono WAV audio and normalizing loudness for speech-to-text models.
Requirements
Node.js >= 18.0.0
FFmpeg & FFprobe installed locally:
macOS:
brew install ffmpegLinux (Ubuntu/Debian):
sudo apt update && sudo apt install ffmpeg libass-devWindows:
winget install Gyan.FFmpegorchoco install ffmpeg
Installation
Quick Start (Claude Desktop, Cursor, Antigravity)
Run directly with npx (no manual cloning or building required):
{
"mcpServers": {
"ffmpeg": {
"command": "npx",
"args": ["-y", "@ash_j1997/ffmpeg-mcp-server"]
}
}
}Configuration File Locations:
Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.jsonAntigravity IDE:
~/.gemini/config/mcp_config.jsonCursor / Windsurf: Add as a stdio server with command
npxand args["-y", "@ash_j1997/ffmpeg-mcp-server"]
Local Development & Testing
Install dependencies:
npm installRun build and automated test suite:
npm test
Acknowledgements & Community
Special thanks to @rajarshidattapy for suggesting the stream multiplexing (mux_media) and scene transition detection (detect_scenes) capabilities to expand the server beyond format conversion.
License
MIT © Ashutos1997
Available Tools
19 toolsadd_overlayB
Place a watermark image, logo PNG, or branding graphic over a video with customizable position, padding, scaling, and opacity.
Inputs: videoPath (required), outputPath (required), overlayPath (required), opacity, +4 more.
add_subtitlesA
Embed an SRT or VTT subtitle track into a video container (mov_text for MP4, srt for MKV) without re-encoding the video stream.
Inputs: videoPath (required), outputPath (required), subtitlesPath (required), title, +1 more.
burn_subtitlesA
Hardcode/burn subtitles directly into video frames with customizable font size, colors, and positioning. Unlike soft subtitles, burned subtitles render on all platforms including TikTok, Instagram Reels, and YouTube Shorts.
Inputs: videoPath (required), outputPath (required), subtitlesPath (required), marginV, +5 more.
change_speedB
Change video and audio playback speed (such as 2x for fast forward or 0.5x for slow motion) with pitch correction.
Inputs: speed (required), inputPath (required), outputPath (required), muteAudio.
compress_videoA
Compress video files to fit upload limits (such as GitHub PRs under 10MB or Discord under 25MB) using target file sizes or CRF quality levels. Does not modify the original file.
Inputs: inputPath (required), outputPath (required), crf, preset, +3 more.
concat_mediaA
Join multiple video or audio files in order into a single file. Uses stream copy for matching files or re-encodes when formats differ.
Inputs: inputPaths (required), outputPath (required), mode.
create_split_screenB
Combine two video files into a split-screen video. Stacks clips vertically (1080x1920 for Reels and TikTok) or places them side-by-side. Supports audio mixing and subtitle embedding.
Inputs: outputPath (required), firstVideoPath (required), secondVideoPath (required), layout, +3 more.
detect_scenesB
Detect video cuts and scene transitions. Returns structured timestamps, scene durations, and cut boundaries as JSON, with optional contact-sheet image preview for vision models.
Inputs: inputPath (required), threshold, outputPath, includeBase64, +1 more.
extract_audioA
Extract an audio track from a video file into a standalone audio file. Supports the 'whisper_wav' preset (16kHz mono WAV) for speech recognition models, plus MP3, AAC, FLAC, and stream copy.
Inputs: inputPath (required), outputPath (required), format, bitrate.
extract_keyframesB
Extract multiple representative frames across a video's timeline. In 'montage' mode, merges frames into a single contact-sheet grid image and inlines base64 for vision models to inspect the whole video at once.
Inputs: inputPath (required), outputPath (required), count, layout, +1 more.
extract_thumbnailB
Capture a single still image from a video. Returns the saved image path and inlined base64 image data so vision models can inspect the frame.
Inputs: inputPath (required), outputPath (required), timestamp, resolution, +1 more.
generate_waveformB
Generate a PNG waveform image from an audio or video file. Returns the file path and inlined base64 image data.
Inputs: inputPath (required), outputPath (required), color, scale, +3 more.
media_convertA
Convert video and audio files between formats. Includes presets for web MP4 (H.264/AAC), WebM (VP9/Opus), and animated GIF. Supports hardware acceleration on Apple Silicon, NVIDIA, Intel, and AMD.
Inputs: inputPath (required), outputPath (required), crf, fps, +3 more.
media_probeA
Inspect audio and video files with ffprobe. Returns container metadata, stream details, codecs, resolution, bitrate, and duration as JSON.
Inputs: inputPath (required).
mux_mediaB
Combine or replace video and audio streams. Takes a video file and an audio track, with optional audio delay offset, stream-copy mode for zero quality loss, and 'replace' or 'add' stream mapping.
Inputs: audioPath (required), videoPath (required), outputPath (required), mode, +4 more.
normalize_audioB
Normalize audio loudness using the broadcast standard EBU R128 (loudnorm). Supports -16 LUFS (podcasts/Reels), -14 LUFS (YouTube), and optional voice clarity enhancement (80Hz high-pass to remove mic rumble). Works on audio or video files.
Inputs: inputPath (required), outputPath (required), targetLufs, targetPeakDb, +1 more.
reformat_aspect_ratioB
Change video aspect ratio to 9:16 vertical, 1:1 square, or 4:5 portrait. Adds blurred video borders, solid padding, or center crops.
Inputs: inputPath (required), outputPath (required), mode, padColor, +3 more.
trim_mediaA
Cut a segment from a video or audio file. Uses stream copy without re-encoding by default, or re-encodes when accurate cuts are needed.
Inputs: inputPath (required), startTime (required), outputPath (required), endTime, +2 more.
trim_silenceA
Detect and remove silent pauses from audio or video files. Preserves video & audio lip-sync in 'start_end' mode. Returns original duration and seconds saved.
Inputs: inputPath (required), outputPath (required), mode, thresholdDb, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have clearly distinct purposes, with descriptions making the soft-subtitle vs. burned-subtitle split explicit. The only real overlap is between trim_silence and trim_media, and extract_thumbnail vs. extract_keyframes, but the descriptions clarify those boundaries well.
The set is almost entirely verb_noun snake_case (trim_media, extract_audio, compress_video, burn_subtitles), which is predictable. The exceptions are media_probe and media_convert, which use noun_verb ordering and mildly break the pattern.
19 tools is on the heavy side but each maps to a distinct, commonly needed ffmpeg operation (probe, convert, trim, concat, mux, overlays, subtitles, normalization). Nothing feels redundant enough to remove, though the surface is larger than ideal.
Coverage is broad across the media lifecycle: inspection, conversion, compression, trimming, concatenation, muxing, overlay, subtitles, speed, aspect ratio, split-screen, keyframes, waveform, and loudness normalization. Minor gaps like rotate/flip, frame-rate changes, and audio fade/volume adjustment are workable gaps rather than dead ends.
Maintenance
Related MCP Connectors
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
FFmpeg as a service for AI agents: typed video editing tools, async jobs, downloadable outputs.
Transform video, audio and images, and generate media from prompts. FFmpeg, captions, models.
Hosted MCP tools for FFmpeg-style video and audio processing through FFMPEG API.
Related MCP Servers
- AlicenseAqualityDmaintenanceA lightweight server that exposes FFmpeg's video processing capabilities to AI assistants through the Model Context Protocol (MCP), supporting operations like video format conversion, audio extraction, and adding watermarks.853 npm25MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that exposes FFmpeg as structured tools for AI-agent-driven video editing, enabling operations like trimming, subtitling, and transcoding via natural language.19,326 npm1MIT
- 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
- AlicenseNot gradedqualityDmaintenanceAn MCP server that exposes FFmpeg as a structured tool set for AI agents, enabling timeline-based video editing, preview, rendering, and analysis with an optional LLM autopilot.MIT