Ffmpeg Mcp

media MCP Server

Using ffmpeg command line to achieve an mcp server, can be very convenient, through the dialogue to achieve the local video search, tailoring, stitching, playback,clip, overlay, concat and other functions

Fresh
mediamedia
6 views151 stars25 forksMIT

Why This Matters

Discovered via unknown and last synced 2d ago.

Fresh
Source
unknown
Stars
151
Last synced
2d ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
17
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (17)

FFMPEG_MCP_ALLOW_ROOTS

(未設定)

FFMPEG_MCP_MAX_JOBS

`32`

convert

再エンコード。`video_codec` / `audio_codec` / `crf` / `preset` / `video_bitrate` / `audio_bitrate` / `fps` / `resolution=[w,h]` / オプションの `start`・`duration` / `extra_args`

speed

再生速度変更。`setpts=PTS/speed` + `atempo` チェーン (0.5〜2.0 超える倍率も自動チェーン化)。`video_only` / `audio_only` で片方だけ

watermark

ロゴ画像を動画にオーバーレイ。`position` (top-left / top-right / bottom-left / bottom-right / center), `margin`, `watermark_scale` (メイン動画幅に対する比, デフォルト 0.15), `opacity`

version

`ffmpeg -version` / `ffprobe -version` の先頭行

probe

ffprobe を JSON で叩き、format / streams / chapters を間引いて返す(未知ファイルへの第一手)

loudnorm

**EBU R128 2-pass ラウドネス正規化**。1 パス目で measured_I / TP / LRA / thresh / offset を取得、2 パス目で linear モードで再エンコード。`target_i` (-16), `target_tp` (-1.5), `target_lra` (11) がデフォルト

concat

concat デマクサで `input_paths: string[]` を無劣化結合(全入力が同コーデック/同パラメータ前提)

FFMPEG_PATH

`ffmpeg`

thumbnail

指定時刻(既定 `00:00:01`)の 1 フレームを画像として書き出し、`size=[w,h]` で縮小可

FFMPEG_TIMEOUT

`600000`

trim

既定で `-c copy` による**無劣化カット**(再エンコードなし、ほぼ瞬時)。`copy: false` で再エンコード可。**精度注意**: copy モードは I-frame 単位で seek する為、`start` が最大数秒ズレる事がある(ffmpeg の仕様)。フレーム精度が必要なら `copy: false`

batch

`jobs[]` を sequential 実行。`stop_on_error` で中断制御、各ジョブの ok/exit_code/duration/stderr テイルを個別レポート

extract_audio

`-vn` + オプションで `audio_codec` / `audio_bitrate`。拡張子でコーデック自動選択

run

生 args の escape hatch。`use_ffprobe: true` で ffprobe を叩く

FFPROBE_PATH

`ffprobe`