Skip to main content
POST
/
v1
/
run-ffmpeg-command
Run FFmpeg Command
curl --request POST \
  --url https://api.rendi.dev/v1/run-ffmpeg-command \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "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,
  "output_files": {
    "out_1": "output1.gif"
  },
  "vcpu_count": 8
}'
{
  "command_id": "123e4567-e89b-12d3-a456-426614174000"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

Request model for submitting a single FFmpeg command.

This model allows submitting an FFmpeg command with input and output file specifications. Input file aliases must start with 'in_' and direct to a publicly accessible file, and output file aliases must start with 'out_' and only name a file name to be created.

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\}\}.

input_files
object
required

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.

Examples:
{
"in_1": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_intro.mp4",
"in_2": "https://storage.rendi.dev/sample/big_buck_bunny_720p_5sec_outro.mp4"
}
output_files
object
required

Dictionary mapping file aliases to their desired output file names, keys are alphanumeric, with underscore allowed, must start with 'out_'

Examples:
{
"out_1": "output_one.mp4",
"out_2": "output_two.mp4"
}
ffmpeg_command
string
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\}\}.

Examples:

"-i {{in_1}} -i {{in_2}} -filter_complex \"[0:v][1:v]hstack=inputs=2[v]\" -map [v] {{out_1}}"

max_command_run_seconds
number

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

Required range: x > 0
Examples:

300

vcpu_count
integer

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.

Required range: x > 0
Examples:

8

Response

Successfully submitted FFmpeg command

Response model for command submission.

Contains the unique identifier assigned to the submitted command that can be used to poll for status and retrieve results.

command_id
string<uuid>
required

Unique identifier for the submitted command

Examples:

"123e4567-e89b-12d3-a456-426614174000"