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 "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-mcpextract 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 π¬β‘
A Python package for media processing using FFmpeg and FastMCP. It enables building microservices that handle video/audio tasks with clean, reusable interfaces.
π Overview
This project provides a framework for handling media processing tasks using:
FFmpeg β A powerful multimedia framework for processing audio and video files
FastMCP β A high-performance framework for building microservices
π οΈ Available Tools
1. Metadata & Frames
get_video_metadataparam(s):
input_video_path: str
extract_framesparams:
input_video_path: str | Pathnumber_of_frames: intframe_timestamps: int (eg: 5s, 10s, 15s, ...)
2. Audio
extract_audioparam(s):
input_video_path: str
3. Video Scaling & Resizing
scale_videoparams:
input_video_path: strresolution: Optional[str]
4. Overlay Operations
overlay_imageparams:
input_video_path: stroverlay_image_path: strpositioning: Literal[top_left, bottom_left, top_right, bottom_right, center, top_center, bottom_center] = 'top_right'scale: tuple[int, int] | None = (100, 100)keep_audio: bool = Trueopacity: float | None = None (range 0.0β1.0)start_time: float = 0.0 (in seconds)duration: float | None = None (in seconds; None = until end of video)
overlays_videoparams:
input_video_path: stroverlay_video_path: strpositioning: Literal[top_left, bottom_left, top_right, bottom_right] = 'top_left'
5. Video Editing
clip_videoparams:
input_video_path: strstart_timestampduration: int
crop_videoparams:
input_video_pathsafe_crop: boolheight: intwidth: intx_offset: inty_offset: int
trim_and_concatenateparams:
input_video_pathnumber_of_trims: inttrim_timestamp: List[(start, end), (start, end), ...]
make_gifparams:
input_video_pathstart_timestampduration
6. Concatenation & Transitions
concatenate_videosparam(s):
file_list: list[Path]
normalize_video_clipsparams:
input_video_clips: List[str]resolution: tuple default(1280, 720)frame_rate: int default30crf: int default23audio_bitrate: str default128kpreset: str defaultfast
concat_clips_with_transitionparams:
input_video_clips: List[str]transition_types: str defaultfade(e.g., fade, wipeleft, rectcrop, coverup, etc.)transition_duration: float default2
π§° Utilities
The utils folder contains helper functions and decorators to enhance the functionality and robustness of the media processing tools.
a. Decorators
validate_input_video_pathA decorator that checks if the video path exists, is non-empty, and is a valid video file. This ensures that all video processing functions receive a valid input file.
π¦ Requirements
Python 3.12 or higher
uv (package manager)
FFmpeg installed on the system
π Usage
The package can be used to build media processing microservices that leverage the power of FFmpeg through a Python interface.
1. Clone this repo
2. Sync the project
3. Use via MCP - Cline config
π Dependencies
ffmpeg-pythonβ Python bindings for FFmpegfastmcpβ Framework for building microservicescolorlogβ Colored logging outputfastapiβ Web framework for building APIspydanticβ Data validation and settings management