FFmpeg MCP Server
v0.7.2FFmpeg & FFprobe media processing toolkit for video, audio, and social formats
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
media_probe
Inspect audio and video files with ffprobe. Returns container metadata, stream details, codecs, resolution, bitrate, and duration as JSON.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the media file to inspect (e.g. './video.mp4') |
media_convert
Convert video and audio files between formats. Includes presets for web MP4 (H.264/AAC), WebM (VP9/Opus), animated GIF, Instagram Reels (9:16), and YouTube Shorts (9:16). Supports dryRun plan inspection and verified output probing.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source media file to convert |
outputPath * | string | Destination path for the converted file (e.g. ./output.mp4, ./output.webm, ./animation.gif) |
crf | number | Quality factor from 0 to 51. Lower numbers mean higher quality. Default: 23 for MP4, 30 for WebM. |
dryRun | boolean | Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files. |
fps | number | Target frame rate in frames per second, such as 30, 60, or 15 |
hardwareAcceleration | boolean | Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true. |
preset | string | Encoding preset: 'web_mp4' for browser playback, 'webm' for WebM video, 'gif' for animated GIF, 'instagram_reel' (9:16 vertical 30fps), 'youtube_shorts' (9:16 vertical 60fps), or 'auto'. Default: 'aut… |
resolution | string | Target size formatted as 'WIDTHxHEIGHT', such as '1920x1080' or '1280x720' |
trim_media
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. Supports dryRun plan inspection and post-flight verification.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source media file to cut. |
outputPath * | string | Destination path for the trimmed output file (e.g. './clip.mp4'). |
startTime * | string | Start timestamp formatted as 'HH:MM:SS' (e.g. '00:01:30') or seconds (e.g. '90'). |
accurateReencode | boolean | Re-encode video for cuts between keyframes. Default: false (uses fast stream copy). |
dryRun | boolean | Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files. |
duration | string | Optional duration in seconds from startTime (e.g. '30'). If neither endTime nor duration is set, trims to end of file. |
endTime | string | Optional end timestamp formatted as 'HH:MM:SS' or seconds. Do not combine with duration. |
extract_audio
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. Automatically verifies output properties.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source video or audio file. |
outputPath * | string | Destination path for the output audio file (e.g. './extracted.wav' or './audio.mp3'). |
bitrate | string | Target audio bitrate for MP3 or AAC (e.g. '128k', '192k', '320k'). |
format | string | Audio format: 'whisper_wav' (16kHz mono WAV for Whisper), 'mp3', 'aac', 'flac', or 'copy' (extract without re-encoding). Default: 'mp3'. |
extract_thumbnail
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.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source video file. |
outputPath * | string | Destination image path ending in .png or .jpg (e.g. './thumb.png'). |
includeBase64 | boolean | Return base64 image data in response for vision models. Default: true. |
resolution | string | Optional scaled size formatted as 'WIDTHxHEIGHT', such as '1280x720'. Defaults to source resolution. |
timestamp | string | Timestamp to capture, such as '00:00:05', '10', or 'midpoint' for the middle frame. Default: '00:00:01'. |
compress_video
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. Supports dryRun and post-flight verification.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source video file (e.g. './recordings/demo.mov') |
outputPath * | string | Destination path for the compressed MP4 file (e.g. './recordings/demo_compressed.mp4') |
crf | integer | Quality value between 18 (higher quality) and 45 (smaller file). Overrides preset. |
dryRun | boolean | Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files. |
hardwareAcceleration | boolean | Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true. |
maxWidth | integer | Maximum video width in pixels, such as 1280 for 720p. Keeps aspect ratio. |
preset | string | Preset when targetSizeMB is not set: 'github_pr', 'discord', 'email', 'balanced', or 'high_quality'. Default: 'balanced'. |
targetSizeMB | number | Target output size in megabytes, such as 9.5 for GitHub or 24 for Discord. Computes bitrates from duration. |
concat_media
Join multiple video or audio files in order into a single file. Uses stream copy for matching files or re-encodes when formats differ. Supports dryRun and post-flight verification.
| Parameter | Type | Description |
|---|---|---|
inputPaths * | array | List of media files to concatenate in sequential order |
outputPath * | string | Target output file path |
dryRun | boolean | Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files. |
mode | string | Concatenation mode. 'auto' (default) probes inputs to check codecs, resolutions, framerates, and audio sample rates, using fast stream copy if matching or falling back to re-encoding if they differ. '… |
generate_waveform
Generate a PNG waveform image from an audio or video file. Returns the file path and inlined base64 image data.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the audio or video file. |
outputPath * | string | Destination path for the PNG image. |
color | string | Waveform color in hex or name (such as '0x6366f1', 'white', or 'black'). Default: '0x6366f1'. |
height | integer | Image height in pixels. Default: 280. |
includeBase64 | boolean | Return base64 image data in the response for vision models. Default: true. |
scale | string | Amplitude scale: 'lin', 'log', or 'sqrt'. Default: 'lin'. |
width | integer | Image width in pixels. Default: 1200. |
add_subtitles
Embed an SRT or VTT subtitle track into a video container (mov_text for MP4, srt for MKV) without re-encoding the video stream.
| Parameter | Type | Description |
|---|---|---|
outputPath * | string | Target output video path (.mp4, .mkv, or .mov) |
subtitlesPath * | string | Path to subtitle file (.srt or .vtt) |
videoPath * | string | Path to the source video file |
language | string | ISO 639-2 three-letter language code (e.g. 'eng', 'spa', 'fra', 'deu') |
title | string | Subtitle track label displayed in video players |
change_speed
Change video and audio playback speed (such as 2x for fast forward or 0.5x for slow motion) with pitch correction.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source video or audio file |
outputPath * | string | Target output file path |
speed * | number | Playback speed multiplier (e.g., 2.0 for 2x fast-forward/timelapse, 0.5 for slow-motion) |
muteAudio | boolean | Whether to strip audio track completely |
reformat_aspect_ratio
Change video aspect ratio to 9:16 vertical, 1:1 square, or 4:5 portrait. Adds blurred video borders, solid padding, or center crops. Supports dryRun and post-flight verification.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source video file. |
outputPath * | string | Destination path for the reformatted video. |
blurAmount | number | Blur strength (5 to 50) for blur_background mode. Default: 20. |
dryRun | boolean | Plan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files. |
hardwareAcceleration | boolean | Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true. |
mode | string | Format mode: 'blur_background' adds blurred video borders, 'fit_pad' adds solid color padding, and 'crop_center' zooms and crops the center. Default: 'blur_background'. |
padColor | string | Background color for fit_pad mode, such as 'black', 'white', or hex '0x1e1e2e'. Default: 'black'. |
targetRatio | string | Target aspect ratio: '9:16' for vertical reels, '1:1' for square, '16:9' for horizontal, or '4:5' for portrait. Default: '9:16'. |
trim_silence
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.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source audio or video file. |
outputPath * | string | Destination path for the trimmed file (e.g. './recordings/cleaned.mp4'). |
minDurationSeconds | number | Minimum silence duration in seconds to trigger a cut. Default: 0.5. |
mode | string | Trim mode: 'start_end' removes silence at the start and end (preserving perfect A/V sync on videos); 'all_pauses' removes silent pauses across audio files. Default: 'start_end'. |
thresholdDb | number | Volume threshold in decibels, between -60dB and -10dB. Audio quieter than this is treated as silence. Default: -35. |
create_split_screen
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.
| Parameter | Type | Description |
|---|---|---|
firstVideoPath * | string | Path to the top video (vertical layout) or left video (horizontal layout). |
outputPath * | string | Destination path for the split-screen output file (e.g. './reel.mp4'). |
secondVideoPath * | string | Path to the bottom video (vertical layout) or right video (horizontal layout). |
audioSource | string | Audio track selection: 'mix' (blends audio from both videos), 'first' (uses only top/left audio), 'second' (uses only bottom/right audio), or 'mute'. Default: 'mix'. |
hardwareAcceleration | boolean | Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true. |
layout | string | Split layout: 'vertical_9_16' (1080x1920 stacked top/bottom for Reels and TikTok), 'horizontal_16_9' (1920x1080 side-by-side), or 'square_1_1' (1080x1080 stacked). Default: 'vertical_9_16'. |
subtitlesPath | string | Optional path to an .srt or .vtt subtitle file to embed into the output video. |
burn_subtitles
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.
| Parameter | Type | Description |
|---|---|---|
outputPath * | string | Target output video path (.mp4, .mov, or .mkv). |
subtitlesPath * | string | Path to the subtitle file (.srt, .vtt, or .ass) to burn into the video. |
videoPath * | string | Path to the source video file. |
fontColor | string | Primary subtitle text color: 'white', 'yellow', 'cyan', or ASS hex e.g. '&H00FFFFFF'. Default: 'white'. |
fontSize | integer | Subtitle font size in points. Default: 24. |
hardwareAcceleration | boolean | Use hardware-accelerated video encoding when available. Default: true. |
marginV | integer | Vertical margin distance in pixels from the bottom edge. Default: 35. |
outlineColor | string | Subtitle border/outline color: 'black', 'white', or ASS hex. Default: 'black'. |
outlineWidth | integer | Outline thickness in pixels. Default: 2. |
extract_keyframes
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.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source video file. |
outputPath * | string | Destination image path (e.g. './keyframes_grid.png' or './frames/frame_%02d.jpg'). |
count | integer | Number of representative frames to extract across the video timeline. Default: 6. |
includeBase64 | boolean | Inline base64 image data in response for vision models. Default: true. |
layout | string | Output format: 'montage' combines all frames into a single contact-sheet grid image for vision models; 'individual' exports separate frame images. Default: 'montage'. |
normalize_audio
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 with post-flight verification.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source audio or video file. |
outputPath * | string | Destination path for the normalized media file. |
targetLufs | number | Target integrated loudness in LUFS (-16 for podcasts/Reels, -14 for YouTube, -23 for broadcast). Default: -16. |
targetPeakDb | number | Maximum allowed true peak level in dBTP. Default: -1.5. |
voiceClarity | boolean | Apply speech enhancement filters (80Hz high-pass to remove mic rumble and gentle compressor for presence). Default: false. |
add_overlay
Place a watermark image, logo PNG, or branding graphic over a video with customizable position, padding, scaling, and opacity.
| Parameter | Type | Description |
|---|---|---|
outputPath * | string | Destination path for the output video (.mp4 or .mov). |
overlayPath * | string | Path to the watermark, logo, or overlay image (.png, .jpg, or .webp). |
videoPath * | string | Path to the base video file. |
hardwareAcceleration | boolean | Use hardware-accelerated video encoding when available. Default: true. |
opacity | number | Overlay opacity from 0.05 (subtle watermark) to 1.0 (fully opaque). Default: 1.0. |
padding | integer | Margin padding in pixels from the edge. Default: 20. |
position | string | Corner or screen placement for the overlay. Default: 'bottom_right'. |
scaleWidth | integer | Optional width in pixels to scale the overlay, keeping its original aspect ratio (e.g. 150). |
mux_media
Multiplex (mux) an audio track into a video file or combine standalone video and audio streams. Supports replacing audio, mixing, and instantaneous stream copy without re-encoding video.
| Parameter | Type | Description |
|---|---|---|
audioPath * | string | Path to the source audio file (.mp3, .wav, .aac, .m4a, etc.) to mux. |
outputPath * | string | Target output video path (.mp4, .mov, or .mkv). |
videoPath * | string | Path to the source video file. |
audioOffsetSeconds | number | Audio delay or advance in seconds. Positive numbers delay audio; negative numbers advance it. Default: 0. |
hardwareAcceleration | boolean | Use hardware-accelerated video encoding when streamCopyVideo is false. Default: true. |
mode | string | Muxing mode: 'replace' drops existing video audio and uses new audio; 'add' keeps original audio and adds new audio as secondary track. Default: 'replace'. |
shortest | boolean | End output when the shorter input stream finishes. Default: true. |
streamCopyVideo | boolean | Use stream copy (-c:v copy) for instantaneous video multiplexing without quality loss. Default: true. |
detect_scenes
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.
| Parameter | Type | Description |
|---|---|---|
inputPath * | string | Path to the source video file to analyze for scene transitions. |
includeBase64 | boolean | Return base64 contact sheet image data in response for vision models when outputPath is specified. Default: true. |
minDurationSeconds | number | Minimum scene duration in seconds to filter out rapid flashes or micro-cuts. Default: 0.5. |
outputPath | string | Optional destination path for a contact-sheet montage image (.png or .jpg) visualizing detected scenes. |
threshold | number | Scene cut sensitivity threshold between 0.05 and 1.0. Lower values detect subtle transitions; higher values detect only dramatic scene cuts. Default: 0.3. |
ffmpeg_doctor
Comprehensive diagnostics for FFmpeg environment: detects binary paths, versions, hardware acceleration capabilities, audio/video codecs, and critical filters (libass, loudnorm, silencedetect) with automated health checks and fix recommendations.
| Parameter | Type | Description |
|---|---|---|
checkFilters | boolean | Check availability of specialized filters (libass, loudnorm, boxblur, etc.) |