Provides comprehensive video and audio processing capabilities including format conversion, compression, trimming, audio extraction, frame extraction, subtitle burning, and media file merging through FFmpeg
Click on "Install 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 MCPcompress this video to medium quality to save space"
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
A powerful MCP server for video and audio processing through FFmpeg
Integrate FFmpeg with Claude, Dive, and other MCP-compatible AI systems. Convert, compress, trim videos, extract audio, and more β all through natural language.
Features β’ Installation β’ Tools β’ Usage β’ Configuration
β¨ Features
π Media Information
Get comprehensive metadata
Duration, resolution, codecs
Bitrate and stream details
JSON formatted output
π Format Conversion
Convert between any formats
MP4, MKV, WebM, MOV, etc.
Custom video/audio codecs
Resolution scaling
ποΈ Video Compression
Quality presets (low/medium/high)
Encoding speed control
H.264 optimization
Size reduction stats
βοΈ Video Trimming
Precise start/end times
Duration-based cuts
Stream copy (fast)
No re-encoding needed
π΅ Audio Extraction
Multiple formats supported
MP3, AAC, WAV, FLAC, OGG, Opus
Bitrate control
High quality output
ποΈ Advanced Features
Merge multiple videos
Extract frames as images
Interval or count-based extraction
JPG, PNG, BMP output
π Subtitles
Burn-in SRT/ASS/VTT subtitles
Multiple styles available
Customizable font size
Works great with Whisper MCP
π Installation
Prerequisites
Install FFmpeg on your system:
Getting Started
Add the following config to your MCP client:
{
"mcpServers": {
"ffmpeg": {
"command": "uvx",
"args": ["ffmpeg-mcp-lite"]
}
}
}MCP Client Configuration
Open Dive Desktop
Click "+ Add MCP Server"
Paste the config provided above
Click "Save" and you're ready!
Use the Claude Code CLI to add the ffmpeg MCP server:
claude mcp add ffmpeg uvx ffmpeg-mcp-liteAdd to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"ffmpeg": {
"command": "uvx",
"args": ["ffmpeg-mcp-lite"]
}
}
}Go to Cursor Settings -> MCP -> New MCP Server. Use the config provided above.
Install via the VS Code CLI:
code --add-mcp '{"name":"ffmpeg","command":"uvx","args":["ffmpeg-mcp-lite"]}'Follow the configure MCP guide using the standard config from above.
Manual Installation
pip install ffmpeg-mcp-liteOr with uv:
uv pip install ffmpeg-mcp-liteπ οΈ Available Tools
All tools are prefixed with ffmpeg_ to avoid naming conflicts with other MCP servers.
π Media Information
Get comprehensive video/audio metadata
Parameters:
file_pathReturns: JSON with duration, resolution, codecs, bitrate, streams
π Conversion & Compression
Convert video/audio to different formats
Parameters:
file_path,output_format,scale,video_codec,audio_codecFormats: mp4, mkv, webm, mov, mp3, wav, etc.
Compress video to reduce file size
Parameters:
file_path,quality,scale,presetQuality: low, medium, high
Preset: ultrafast to veryslow
βοΈ Editing
Trim video to extract a segment
Parameters:
file_path,start_time,end_timeordurationTime format: "00:01:30" or seconds
Concatenate multiple videos into one
Parameters:
file_paths(list),output_pathSupports: Same codec videos
π΅ Audio & Frames
Extract audio track from video
Parameters:
file_path,audio_format,bitrateFormats: mp3, aac, wav, flac, ogg, opus
Extract frames as images
Parameters:
file_path,intervalorcount,formatFormats: jpg, png, bmp
π Subtitles
Burn-in subtitles to video (hardcode)
Parameters:
file_path,subtitle_path,style,font_size,output_pathFormats: SRT, ASS, VTT
Styles: outline, shadow, background, glow
π‘ Usage Examples
Get Media Information
"Get info about /path/to/video.mp4"
"What's the resolution and duration of this video?"
"Show me the codec information for my video"Convert Videos
"Convert video.mp4 to WebM format"
"Convert this video to MKV with h265 codec"
"Convert and scale to 1280x720"Compress Videos
"Compress video.mp4 with medium quality"
"Compress this video to reduce file size, use fast preset"
"Compress with high quality and scale to 1920:-1"Trim Videos
"Trim video.mp4 from 00:01:00 to 00:02:30"
"Cut the first 30 seconds from this video"
"Extract a 1-minute clip starting at 5:00"Extract Audio
"Extract audio from video.mp4 as MP3"
"Get the audio track in AAC format with 192k bitrate"
"Extract audio as FLAC for best quality"Extract Frames
"Extract one frame every 5 seconds from video.mp4"
"Get 10 frames evenly distributed from this video"
"Extract frames as PNG images"Merge Videos
"Merge video1.mp4 and video2.mp4 together"
"Concatenate these three videos into one"Add Subtitles
"Add subtitles.srt to video.mp4"
"Burn in Chinese subtitles with shadow style"
"Add subtitles with font size 32 and glow effect"π§ Configuration
Environment Variables
Variable | Description | Default |
| Path to ffmpeg binary |
|
| Path to ffprobe binary |
|
| Default output directory |
|
Custom Configuration
{
"mcpServers": {
"ffmpeg": {
"command": "uvx",
"args": ["ffmpeg-mcp-lite"],
"env": {
"FFMPEG_OUTPUT_DIR": "/path/to/output"
}
}
}
}ποΈ Architecture
Built With
FFmpeg - Video/audio processing engine
FastMCP - MCP Python framework
asyncio - Async subprocess execution
Python 3.10+ - Type hints and modern features
Key Features
β Async Processing: Non-blocking FFmpeg execution
β Type Safe: Full type hints with mypy validation
β Well Tested: 31 test cases with pytest
β Cross Platform: Works on Windows, macOS, Linux
β Modular Design: One file per tool
π€ Contributing
Contributions are welcome!
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development
# Clone and install
git clone https://github.com/kevinwatt/ffmpeg-mcp-lite.git
cd ffmpeg-mcp-lite
uv sync
# Run tests
uv run pytest
# Type checking
uv run mypy src/
# Linting
uv run ruff check src/π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
FFmpeg - The powerful multimedia framework
Anthropic - For the Model Context Protocol
Dive - MCP-compatible AI platform