inputs map stages source files into the working directory by name. The command references them by bare name, and inline -i URLs also work.
Accepts: video, audio, image
Request
How it runs
- Validate: command parsed against 8 security layers (flag whitelist, format/filter blocklists)
- Download: input URLs pulled to a sandboxed runner
- Substitute: URLs replaced with local paths in the FFmpeg command
- Execute: FFmpeg runs in an isolated container with network disabled
- Upload: output goes to R2
- Return: signed
output.file.urlavailable viaGET /jobs/{id}
Input sources
Most commands put the source URL straight in the command and skipinputs entirely. It is optional and defaults to an empty map:
inputs map only when a file cannot go inline: a file a filter reads by name (see below), inline text you do not want to host, an already-uploaded asset, or when you need a stable filename. Each key is a filename staged under that exact name, and the command references it by bare name.
A value can be one of three shapes:
| Value | Use it for |
|---|---|
"https://..." | A remote file. Shorthand for { "url": "..." } |
{ "url": "https://..." } | A remote file, explicit form |
{ "content": "...text..." } | Inline text you do not want to host (≤64 KB) |
url
returned by the uploads endpoint, like https://api.rendobar.com/assets/asset_abc123/content.
Pass it like any other URL.
Auxiliary files read by a filter
Some files are not passed as-i arguments. Filters like subtitles=, lut3d=, and drawtext fontfile=, and the lists read by the concat demuxer, read a file by name from the working directory. Provide those through inputs so they are staged before the command runs.
This burns a subtitle track that lives only in the request, with no file to host:
Parameters
Working directory for the command. Optional, defaults to an empty map. Each key is a path-safe filename staged under that exact name. Each value is the source for that file. Omit it when every input is an inline
-i URL. A value is one of:Filters that read a file by name (subtitles=, lut3d=, drawtext fontfile=, concat lists) must get that file through inputs. They are not -i arguments. See Input sources.Real FFmpeg command starting with
ffmpeg. Input URLs go in -i positions, or reference staged inputs files by name.Container format. Inferred from the trailing filename if omitted. One of:
mp4, mkv, webm, mov, avi, ts, gif, png, jpg, mp3, wav, flac, ogg, aac, opus, m4a, srt, vtt.Max execution time in seconds. Range 1–900. Plan caps apply (Free 5 min, Pro 15 min).
Which machine class runs the job. One of
auto, cpu, gpu.auto(default): a command using an NVENC or CUDA encoder, likeh264_nvenc, routes to a GPU. Everything else runs on CPU. You do not set anything.gpu: force a GPU machine.cpu: force a CPU machine. A command that calls an NVENC encoder is rejected withVALIDATION_ERROR.
h264_nvenc, hevc_nvenc, and av1_nvenc on NVIDIA L4 GPUs, billed per second. gpu and auto-routed GPU jobs require the Pro plan. A GPU job on the Free plan returns 403 PLAN_LIMIT. cpu and auto work on every plan. See GPU acceleration.Validate without executing
Free, no auth:{ data: { valid: true, args: [...], inferredOutputFormat: "mp4" } } or { data: { valid: false, error: "..." } }.
Allowed flags
~120 whitelisted flags. Common ones:| Flag | Purpose |
|---|---|
-i | Input file |
-f | Force format |
-c:v, -c:a | Video / audio codec (stream specifiers like -c:v:0 work) |
-vf, -af | Video / audio filter |
-filter_complex | Complex filter graph |
-map | Stream mapping |
-ss, -t | Seek position, duration |
-r, -s | Frame rate, resolution |
-b:v, -b:a | Video / audio bitrate |
-crf, -preset | Quality + preset |
-an, -vn | Disable audio / video |
-y | Overwrite output |
-movflags, -strict | Container flags, strict standards |
VALIDATION_ERROR.
GPU acceleration
Your jobs run on CPU-powered or GPU-powered machines.compute defaults to auto, so a command that uses an NVENC encoder routes to a GPU on its own. You do not send anything.
Switch one flag to move an encode to the hardware encoder. The GPU path runs h264_nvenc, hevc_nvenc, and av1_nvenc on NVIDIA L4 GPUs, several times faster than software libx264 at the same resolution.
compute only to force a choice. gpu pins the job to a GPU. cpu pins it to CPU and rejects an NVENC command with VALIDATION_ERROR.
GPU jobs require the Pro plan and bill per second at GPU rates. A GPU job on the Free plan returns
403 PLAN_LIMIT. CPU jobs run on every plan.Security model
Every command is validated before it runs, then executed in an isolated, network-restricted sandbox.- Flag allowlist. Only known-safe flags pass. Anything unrecognised is rejected with
VALIDATION_ERRORbefore dispatch. - No reads through filters. Filters and formats that read from disk, fetch over the network, or run external code are blocked.
- Path containment. Inputs are limited to the files you provide. Path traversal and access to system paths are rejected.
- Sandboxed execution. Each job runs in an isolated container with a clean environment, restricted I/O, and no ambient network access.
Cost & timeout
Priced per compute second from your credit balance, the wall-clock time FFmpeg ran, excluding file transfer. Plan timeouts: 5 min (Free), 15 min (Pro). See plan limits for the full table. Exceeding the timeout returnsRUNNER_TIMEOUT, and no credits are charged.
Examples
Scale to 720p
Extract audio
Trim 30s starting at 1:00
Merge video + audio tracks
Output files
The filenames your command writes define the output. You get back every file it produced. Every completed job, FFmpeg or otherwise, returns the sameoutput shape. Job output documents it in full. The short version:
output.data: the computed answer (a probe result, a transcript).nullfor FFmpeg jobs, which only write files.output.file: the headline result you play or download, one file or a stream manifest.nullfor pure file sets.output.files: every file the job produced, the complete list.output.expiresAt: Unix ms when the URLs expire, present whenfilesis non-empty.
{ url, path, type, size, meta? }. The type is an open enum: video, image, audio, captions, playlist, data, or other. Tolerate values you do not recognise.
A command that writes one file sets output.file to that file, and output.files to a list of one:
output.file to the manifest, typed playlist. Point a player at output.file.url directly. output.files carries the manifest plus every segment:
-f segment, a resolution ladder) has no single headline result. output.file is null. Read output.files for the list:
output.data. The thing you play or download is output.file.url. The full list is output.files. Two invariants hold: output.file is always one of output.files (or null), and output.expiresAt is present whenever output.files is non-empty.
URLs expire at output.expiresAt. Re-fetch the job with GET /jobs/{id} to mint fresh ones.
Error handling
A failed job carries anerror object with code, message, detail, and retryable. When FFmpeg exits non-zero, error.detail holds the last ~2 KB of the real stderr. Fetch the job to see exactly why FFmpeg stopped.
See also
- Job output: the output shape every job returns
- CLI: run the same job from your terminal with
rb ffmpeg - Webhooks: receive
job.completedinstead of polling - Credits and billing: per-compute-second pricing detail
- Plan limits: file-size caps, timeouts, and concurrency per plan
- Job lifecycle: how a job moves from dispatched to complete