v1

latestOpenAPI 3.1.02026-07-26132249.4 KB
API
FFmpeg Commands

Run FFmpeg Command

Submit an FFmpeg command for processing with input and output file specifications.

post/v1/run-ffmpeg-command

Request body

input_filesobject nullable

Dictionary mapping file aliases to their publicly accessible paths, file name should appear in the end of the url, keys are alphanumeric, with underscore allowed, must start with 'in_'. You can use public file urls, google drive, dropbox, rendi stored files, s3 stored files, etc. as long as they are publicly accessible. If not available, input_compressed_folder has to be provided

max_command_run_secondsnumber

Maximum allowed runtime in seconds for a single FFmpeg command, the default is 300 seconds

vcpu_countinteger

Number of virtual CPUs to use for a single ffmpeg command, the default is 8, up to your account's maximum. Multiple commands can run in parallel as long as their total vCPU usage doesn't exceed your quota.

metadataobject nullable

Metadata to be stored with the command, useful for webhooks and custom tracking and reporting. Up to 10 key-value pairs; each key and each string value must be at most 512 characters.

is_privateboolean

If true, the command's output files are placed in private storage and can only be downloaded via a presigned URL (request one by passing presigned_ttl_seconds on the poll endpoint). Not available on free plans.

input_compressed_folderstring nullable

A single compressed zip archive containing input media files. Provide either this field or input_files, but not both. Value should be a publicly accessible URL or a rendi storage URL. This field is only available for single FFmpeg commands, not chained commands.

ffmpeg_commandstring required

FFmpeg command string using {{alias}} placeholders for input and output files. Input file keys should start with 'in_' prefix, for example: in_video1. Output file keys should start with 'out_' prefix, for example: out_1. If you're using an automation platform where curly brackets are used special as characters (like make.com, zapier, or other) add backslashes before the curly brackets, for example, replace {{in_1}} with backslashes and brackets \{\{in_1\}\}.

Example request

{
  "ffmpeg_command": "-i {{in_1}} -vf \"select='lte(t,60)*gt(trunc(t/10),trunc(prev_t/10))',setpts='PTS*0.025',scale=trunc(oh*a/2)*2:320:force_original_aspect_ratio=decrease,pad=trunc(oh*a/2)*2:320:-1:-1\" -an -vsync vfr {{out_1}}",
  "input_files": {
    "in_1": "https://storage.rendi.dev/sample/sample.avi"
  },
  "max_command_run_seconds": 300,
  "metadata": {
    "key": "value"
  },
  "output_files": {
    "out_1": "output1.gif"
  },
  "vcpu_count": 8
}

Response

Successfully submitted FFmpeg command

command_idstring uuid required

Unique identifier for the submitted command

Example response

{
  "command_id": "123e4567-e89b-12d3-a456-426614174000"
}