Skip to main content

ffmpeg_command

ffmpeg

Run FFmpeg on a media file (transcode, trim, scale, extract audio, change frame rate, make a thumbnail, etc.). Pass the input as file_url or file_base64 + filename, the FFmpeg arguments that go AFTER the input in 'args' (e.g. '-vf scale=1280:720 -c:v libx264' or '-vn -ab 192k'), and the output_format (e.g. 'mp4', 'mp3', 'gif'). The server runs: ffmpeg -i <input> <args> output.<output_format>. Shell metacharacters and network/file protocols are blocked.

When to use
A media job the dedicated tools do not cover: transcoding with specific codecs or bitrates, scaling, changing frame rate, extracting the audio track, making a thumbnail, or applying an arbitrary filter graph.
Not for
Plain format changes (convert_file is simpler). Trimming (trim_video), blurring (blur_video), or changing the duration (retime_video) — those take the request in the terms the user stated it.
Returns
A signed download URL for the produced file, or JSON with exit_code and stderr when FFmpeg itself failed.
Runtime
Slow — a large input can take minutes. The call is synchronous, so the request simply stays open until the file comes back.

Parameters

NameTypeRequiredDescription
file_urlstringnoPublic http(s) URL of the input media (preferred).
file_base64stringnoBase64 of a small inline input file (<=15MB). Provide 'filename'.
filenamestringnoInput filename incl. extension, e.g. 'clip.mov'.
argsstringnoFFmpeg arguments placed AFTER '-i <input>' and BEFORE the output file, e.g. '-vf scale=1280:720', '-ss 5 -t 10', '-vn -ab 192k'.
output_formatstringyesOutput container/format extension, e.g. 'mp4', 'mp3', 'gif', 'wav'.

Example call

JSON-RPC tools/call body (sent to https://convertfleet.com/api/mcp):

{
  "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": { "name": "ffmpeg_command", "arguments": {
               "file_url": "https://example.com/input",
               "output_format": "mp4",
               "args": "-vf scale=1280:720"
             } }
}

Connect first

curl -sN https://convertfleet.com/api/mcp \
  -H "Authorization: Bearer flt_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

See the quickstarts for Hermes, Claude, Cursor, OpenClaw, n8n, Zapier and Make.