ffmpeg-mcp

ffmpeg-mcp

Enables comprehensive video/audio processing, analysis, and streaming via natural language by exposing 40+ FFmpeg tools as MCP tools.

Category
访问服务器

README

FFmpeg MCP Server

Model Context Protocol (MCP) server that provides 40+ advanced FFmpeg tools for video/audio processing, analysis, and streaming

Features

Media Analysis & Probing (7 tools)

  • get_media_info — Comprehensive metadata (codecs, bitrates, resolution, fps, etc.)
  • get_video_resolution — Width, height, aspect ratio
  • get_duration — File duration in seconds & formatted
  • list_streams — All video, audio, subtitle streams
  • get_frame_count — Total frame count
  • detect_scene_changes — Scene cut detection with timestamps
  • get_keyframes — Keyframe timestamp listing

Format Conversion (5 tools)

  • convert_video — Full codec/quality control (x264, x265, VP9, AV1, etc.)
  • convert_audio — Audio format conversion (MP3, AAC, FLAC, WAV, OGG, etc.)
  • convert_to_gif — High-quality GIF with palette optimization
  • batch_convert — Bulk convert entire directories
  • extract_audio — Extract audio track from video

Video Editing (10 tools)

  • trim_video — Cut segments by time
  • merge_videos — Concatenate multiple videos
  • resize_video — Scale to any resolution
  • change_speed — Speed up / slow down with audio sync
  • extract_frames — Export frames as images
  • create_video_from_images — Image sequence → video
  • rotate_video — 90°, 180°, 270° or arbitrary angle
  • crop_video — Crop a region
  • generate_thumbnail — Extract frame as image
  • add_thumbnail — Embed poster image in MP4

Audio Processing (7 tools)

  • adjust_volume — Volume control (factor, dB, percentage)
  • normalize_audio — EBU R128 loudness normalization
  • mix_audio — Overlay/replace audio tracks
  • remove_audio — Strip all audio
  • add_fade_audio — Fade in/out effects
  • generate_waveform — Audio waveform visualization
  • generate_spectrogram — Spectrogram image generation

Visual Effects & Filters (7 tools)

  • add_text_overlay — Text/watermark with position, timing, styling
  • add_image_overlay — Logo/watermark image overlay
  • apply_video_filter — Any FFmpeg filter (blur, sharpen, eq, hue, etc.)
  • add_fade — Video fade in/out
  • picture_in_picture — PiP effect with two videos
  • side_by_side — Horizontal/vertical split view
  • create_slideshow — Image slideshow with transitions (fade, wipe, slide)

Subtitles (3 tools)

  • extract_subtitles — Extract subtitle tracks (SRT, ASS, VTT)
  • burn_subtitles — Hardcode subtitles into video
  • add_subtitle_track — Add soft subtitles with language tags

Streaming (4 tools)

  • create_hls_stream — Generate HLS segments + playlist
  • create_dash_stream — Generate DASH manifest + segments
  • create_adaptive_hls — Multi-bitrate adaptive streaming (1080p/720p/480p/360p)
  • stream_to_rtmp — Stream to YouTube Live, Twitch, etc.

Advanced Processing (14 tools)

  • two_pass_encode — Optimal bitrate distribution
  • stabilize_video — Shake reduction (vidstab)
  • denoise_video — Noise reduction (hqdn3d, nlmeans)
  • deinterlace_video — Interlaced → progressive
  • change_framerate — FPS conversion with motion interpolation
  • compress_video — Target file size or CRF compression
  • add_metadata — Add/modify tags (title, artist, year, etc.)
  • remove_metadata — Strip all metadata
  • reverse_video — Play video backwards
  • create_mosaic — Video grid layout (2x2, 3x2, etc.)
  • run_custom_ffmpeg — Execute any custom FFmpeg command
  • get_ffmpeg_version — FFmpeg version info
  • list_supported_formats — All supported formats
  • list_supported_codecs — All supported codecs

Prerequisites

  • Python 3.10+
  • FFmpeg installed and available on PATH
    • Windows: winget install ffmpeg or download from https://ffmpeg.org/download.html
    • macOS: brew install ffmpeg
    • Linux: sudo apt install ffmpeg

Installation

cd ffmpeg-mcp
pip install -r requirements.txt

Usage

Manual Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "ffmpeg-mcp": {
      "command": "python",
      "args": ["C:/path/to/ffmpeg-mcp/server.py"]
    }
  }
}

Project Structure

ffmpeg-mcp/
├── server.py           # MCP server entry point
├── utils.py            # Shared utilities (run_command, probe, validation)
├── requirements.txt    # Python dependencies
├── pyproject.toml      # Project metadata
├── README.md           # This file
└── tools/
    ├── __init__.py     # Tool registration
    ├── probe.py        # Media analysis & probing tools
    ├── convert.py      # Format conversion tools
    ├── video.py        # Video editing tools
    ├── audio.py        # Audio processing tools
    ├── effects.py      # Visual effects & filter tools
    ├── subtitles.py    # Subtitle management tools
    ├── streaming.py    # Streaming (HLS/DASH/RTMP) tools
    └── advanced.py     # Advanced processing tools

Examples

Analyze a video

"Get detailed info about this video: C:/Videos/test.mp4"

Convert video

"Convert test.mp4 to MKV with H.265 codec at CRF 20 quality"

Create GIF

"Create a GIF from the video between 5s and 15s, 320px wide"

Compress video

"Compress this video to under 50MB"

Adaptive streaming

"Create an HLS stream with 1080p, 720p, and 480p quality levels"

Stabilize shaky video

"Stabilize this shaky video"

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选