Skip to main content

retime_video

ffmpeg

Make a video last an exact number of seconds. New in-between frames are synthesised by motion interpolation, so a stretched clip still moves smoothly instead of stuttering on held frames; audio is tempo-stretched at its original pitch.

When to use
The user states a duration — 'make this 8-second clip run for 40 seconds', 'fit this into a 15-second slot' — or a speed multiplier.
Not for
Cutting a clip down to length by removing footage (trim_video). Simply changing the frame rate (ffmpeg_command).
Returns
A signed download URL for the retimed mp4, alongside the source, target and actual durations.
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 file (preferred — fetched server-side, so the bytes never pass through your context). Private, loopback and cloud-metadata addresses are blocked.
file_base64stringnoBase64 of a small inline input file (up to about 15MB). Provide "filename" too.
filenamestringnoOriginal filename including its extension, e.g. "report.pdf". The extension is how the source format is detected.
target_durationnumbernoHow many seconds the finished video should last. Give this OR speed.
speednumbernoSpeed multiplier instead of a duration: 0.5 is half speed, 2 is double.
output_filenamestringnoDesired output filename.

Example call

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

{
  "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": { "name": "retime_video", "arguments": {
               "file_url": "https://example.com/input"
             } }
}

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.