FFmpeg MCP Server

v0.7.2
io.github.Ashutos1997/ffmpeg-mcp-server Checked 7 hours ago Published 2 days ago

FFmpeg & 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.

ParameterTypeDescription
inputPath *stringPath 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.

ParameterTypeDescription
inputPath *stringPath to the source media file to convert
outputPath *stringDestination path for the converted file (e.g. ./output.mp4, ./output.webm, ./animation.gif)
crfnumberQuality factor from 0 to 51. Lower numbers mean higher quality. Default: 23 for MP4, 30 for WebM.
dryRunbooleanPlan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.
fpsnumberTarget frame rate in frames per second, such as 30, 60, or 15
hardwareAccelerationbooleanUse hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true.
presetstringEncoding 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…
resolutionstringTarget 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.

ParameterTypeDescription
inputPath *stringPath to the source media file to cut.
outputPath *stringDestination path for the trimmed output file (e.g. './clip.mp4').
startTime *stringStart timestamp formatted as 'HH:MM:SS' (e.g. '00:01:30') or seconds (e.g. '90').
accurateReencodebooleanRe-encode video for cuts between keyframes. Default: false (uses fast stream copy).
dryRunbooleanPlan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.
durationstringOptional duration in seconds from startTime (e.g. '30'). If neither endTime nor duration is set, trims to end of file.
endTimestringOptional 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.

ParameterTypeDescription
inputPath *stringPath to the source video or audio file.
outputPath *stringDestination path for the output audio file (e.g. './extracted.wav' or './audio.mp3').
bitratestringTarget audio bitrate for MP3 or AAC (e.g. '128k', '192k', '320k').
formatstringAudio 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.

ParameterTypeDescription
inputPath *stringPath to the source video file.
outputPath *stringDestination image path ending in .png or .jpg (e.g. './thumb.png').
includeBase64booleanReturn base64 image data in response for vision models. Default: true.
resolutionstringOptional scaled size formatted as 'WIDTHxHEIGHT', such as '1280x720'. Defaults to source resolution.
timestampstringTimestamp 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.

ParameterTypeDescription
inputPath *stringPath to the source video file (e.g. './recordings/demo.mov')
outputPath *stringDestination path for the compressed MP4 file (e.g. './recordings/demo_compressed.mp4')
crfintegerQuality value between 18 (higher quality) and 45 (smaller file). Overrides preset.
dryRunbooleanPlan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.
hardwareAccelerationbooleanUse hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true.
maxWidthintegerMaximum video width in pixels, such as 1280 for 720p. Keeps aspect ratio.
presetstringPreset when targetSizeMB is not set: 'github_pr', 'discord', 'email', 'balanced', or 'high_quality'. Default: 'balanced'.
targetSizeMBnumberTarget 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.

ParameterTypeDescription
inputPaths *arrayList of media files to concatenate in sequential order
outputPath *stringTarget output file path
dryRunbooleanPlan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.
modestringConcatenation 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.

ParameterTypeDescription
inputPath *stringPath to the audio or video file.
outputPath *stringDestination path for the PNG image.
colorstringWaveform color in hex or name (such as '0x6366f1', 'white', or 'black'). Default: '0x6366f1'.
heightintegerImage height in pixels. Default: 280.
includeBase64booleanReturn base64 image data in the response for vision models. Default: true.
scalestringAmplitude scale: 'lin', 'log', or 'sqrt'. Default: 'lin'.
widthintegerImage 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.

ParameterTypeDescription
outputPath *stringTarget output video path (.mp4, .mkv, or .mov)
subtitlesPath *stringPath to subtitle file (.srt or .vtt)
videoPath *stringPath to the source video file
languagestringISO 639-2 three-letter language code (e.g. 'eng', 'spa', 'fra', 'deu')
titlestringSubtitle 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.

ParameterTypeDescription
inputPath *stringPath to the source video or audio file
outputPath *stringTarget output file path
speed *numberPlayback speed multiplier (e.g., 2.0 for 2x fast-forward/timelapse, 0.5 for slow-motion)
muteAudiobooleanWhether 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.

ParameterTypeDescription
inputPath *stringPath to the source video file.
outputPath *stringDestination path for the reformatted video.
blurAmountnumberBlur strength (5 to 50) for blur_background mode. Default: 20.
dryRunbooleanPlan-before-encode: returns planned FFmpeg command, parameters, and target output without writing files.
hardwareAccelerationbooleanUse hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true.
modestringFormat mode: 'blur_background' adds blurred video borders, 'fit_pad' adds solid color padding, and 'crop_center' zooms and crops the center. Default: 'blur_background'.
padColorstringBackground color for fit_pad mode, such as 'black', 'white', or hex '0x1e1e2e'. Default: 'black'.
targetRatiostringTarget 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.

ParameterTypeDescription
inputPath *stringPath to the source audio or video file.
outputPath *stringDestination path for the trimmed file (e.g. './recordings/cleaned.mp4').
minDurationSecondsnumberMinimum silence duration in seconds to trigger a cut. Default: 0.5.
modestringTrim 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'.
thresholdDbnumberVolume 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.

ParameterTypeDescription
firstVideoPath *stringPath to the top video (vertical layout) or left video (horizontal layout).
outputPath *stringDestination path for the split-screen output file (e.g. './reel.mp4').
secondVideoPath *stringPath to the bottom video (vertical layout) or right video (horizontal layout).
audioSourcestringAudio track selection: 'mix' (blends audio from both videos), 'first' (uses only top/left audio), 'second' (uses only bottom/right audio), or 'mute'. Default: 'mix'.
hardwareAccelerationbooleanUse hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true.
layoutstringSplit 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'.
subtitlesPathstringOptional 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.

ParameterTypeDescription
outputPath *stringTarget output video path (.mp4, .mov, or .mkv).
subtitlesPath *stringPath to the subtitle file (.srt, .vtt, or .ass) to burn into the video.
videoPath *stringPath to the source video file.
fontColorstringPrimary subtitle text color: 'white', 'yellow', 'cyan', or ASS hex e.g. '&H00FFFFFF'. Default: 'white'.
fontSizeintegerSubtitle font size in points. Default: 24.
hardwareAccelerationbooleanUse hardware-accelerated video encoding when available. Default: true.
marginVintegerVertical margin distance in pixels from the bottom edge. Default: 35.
outlineColorstringSubtitle border/outline color: 'black', 'white', or ASS hex. Default: 'black'.
outlineWidthintegerOutline 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.

ParameterTypeDescription
inputPath *stringPath to the source video file.
outputPath *stringDestination image path (e.g. './keyframes_grid.png' or './frames/frame_%02d.jpg').
countintegerNumber of representative frames to extract across the video timeline. Default: 6.
includeBase64booleanInline base64 image data in response for vision models. Default: true.
layoutstringOutput 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.

ParameterTypeDescription
inputPath *stringPath to the source audio or video file.
outputPath *stringDestination path for the normalized media file.
targetLufsnumberTarget integrated loudness in LUFS (-16 for podcasts/Reels, -14 for YouTube, -23 for broadcast). Default: -16.
targetPeakDbnumberMaximum allowed true peak level in dBTP. Default: -1.5.
voiceClaritybooleanApply 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.

ParameterTypeDescription
outputPath *stringDestination path for the output video (.mp4 or .mov).
overlayPath *stringPath to the watermark, logo, or overlay image (.png, .jpg, or .webp).
videoPath *stringPath to the base video file.
hardwareAccelerationbooleanUse hardware-accelerated video encoding when available. Default: true.
opacitynumberOverlay opacity from 0.05 (subtle watermark) to 1.0 (fully opaque). Default: 1.0.
paddingintegerMargin padding in pixels from the edge. Default: 20.
positionstringCorner or screen placement for the overlay. Default: 'bottom_right'.
scaleWidthintegerOptional 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.

ParameterTypeDescription
audioPath *stringPath to the source audio file (.mp3, .wav, .aac, .m4a, etc.) to mux.
outputPath *stringTarget output video path (.mp4, .mov, or .mkv).
videoPath *stringPath to the source video file.
audioOffsetSecondsnumberAudio delay or advance in seconds. Positive numbers delay audio; negative numbers advance it. Default: 0.
hardwareAccelerationbooleanUse hardware-accelerated video encoding when streamCopyVideo is false. Default: true.
modestringMuxing mode: 'replace' drops existing video audio and uses new audio; 'add' keeps original audio and adds new audio as secondary track. Default: 'replace'.
shortestbooleanEnd output when the shorter input stream finishes. Default: true.
streamCopyVideobooleanUse 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.

ParameterTypeDescription
inputPath *stringPath to the source video file to analyze for scene transitions.
includeBase64booleanReturn base64 contact sheet image data in response for vision models when outputPath is specified. Default: true.
minDurationSecondsnumberMinimum scene duration in seconds to filter out rapid flashes or micro-cuts. Default: 0.5.
outputPathstringOptional destination path for a contact-sheet montage image (.png or .jpg) visualizing detected scenes.
thresholdnumberScene 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.

ParameterTypeDescription
checkFiltersbooleanCheck availability of specialized filters (libass, loudnorm, boxblur, etc.)