Skip to main content

Documentation Index

Fetch the complete documentation index at: https://rendobar.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

You write the FFmpeg command. Rendobar downloads inputs, runs the command in an isolated container, returns a signed download URL. Same syntax you’d run locally.
curl -X POST https://api.rendobar.com/jobs \
  -H "Authorization: Bearer rb_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "raw.ffmpeg",
    "inputs": {},
    "params": {
      "command": "ffmpeg -i https://example.com/video.mp4 -vf scale=1280:720 -c:v libx264 -crf 23 output.mp4"
    }
  }'
From a shell? Use the CLI: rb ffmpeg -i input.mp4 -vf scale=1280:720 out.mp4 — local files upload automatically.

How it runs

  1. Validate — command parsed against 8 security layers (flag whitelist, format/filter blocklists)
  2. Download — input URLs pulled to a sandboxed worker
  3. Substitute — URLs replaced with local paths in the FFmpeg command
  4. Execute — FFmpeg runs in an isolated container with network disabled
  5. Upload — output goes to R2
  6. Return — signed outputUrl available via GET /jobs/{id}

Parameters

FieldTypeRequiredDefaultNotes
typestringyes"raw.ffmpeg"
inputsobjectyes{} when URLs are inline in the command. Otherwise a name→URL map matching filenames in the command
params.commandstringyesReal FFmpeg command starting with ffmpeg. Input URLs go in -i positions
params.outputFormatstringnoinferredOverride container format. Inferred from trailing filename if omitted
params.timeoutintno120Server-side max execution in seconds. Range 1–900

Validate without executing

Free, no auth:
curl -X POST https://api.rendobar.com/ffmpeg/validate \
  -H "Content-Type: application/json" \
  -d '{ "command": "ffmpeg -i video.mp4 -vf scale=1280:720 output.mp4" }'
Returns { data: { valid: true, args: [...], inferredOutputFormat: "mp4" } } or { data: { valid: false, error: "..." } }.

Allowed flags

~120 whitelisted flags. Common ones:
FlagPurpose
-iInput file
-fForce format
-c:v, -c:aVideo / audio codec (stream specifiers like -c:v:0 work)
-vf, -afVideo / audio filter
-filter_complexComplex filter graph
-mapStream mapping
-ss, -tSeek position, duration
-r, -sFrame rate, resolution
-b:v, -b:aVideo / audio bitrate
-crf, -presetQuality + preset
-an, -vnDisable audio / video
-yOverwrite output
-movflags, -strictContainer flags, strict standards
Unrecognised flags are rejected before dispatch with VALIDATION_ERROR.

Security model

Eight layers, in order:
  1. Clean environment. Inherited env vars stripped. Only PATH, HOME, TMPDIR remain.
  2. Flag whitelist. ~120 known-safe flags, including stream specifiers.
  3. Format blocklist. -f lavfi, concat, hls, tee, segment, dash, null blocked.
  4. Filter function blocklist. File-reading filters (movie, amovie, sendcmd, zmq, ladspa, frei0r) blocked.
  5. Filter parameter blocklist. textfile=, filename= in subtitles, absolute paths in subtitle filters blocked.
  6. Pattern blocklist. Path traversal (../), /proc/, /sys/, subfile: blocked.
  7. Per-input protocol restriction. -protocol_whitelist file injected before each -i server-side.
  8. Container isolation. Trigger.dev container sandboxing, restricted stdio.

Cost & timeout

Priced per compute second — wall-clock time FFmpeg ran, excluding file transfer. Typical cost ~$0.05/min. Plan timeouts: 5 min (Free), 15 min (Pro). Exceeding the timeout returns PROVIDER_TIMEOUT; no credits charged.

Examples

Scale to 720p

{
  "type": "raw.ffmpeg",
  "inputs": {},
  "params": {
    "command": "ffmpeg -i https://example.com/video.mp4 -vf scale=1280:720 -c:v libx264 -preset fast -crf 23 output.mp4"
  }
}

Extract audio

{
  "type": "raw.ffmpeg",
  "inputs": {},
  "params": {
    "command": "ffmpeg -i https://example.com/video.mp4 -vn -c:a aac -b:a 128k output.m4a"
  }
}

Trim 30s starting at 1:00

{
  "type": "raw.ffmpeg",
  "inputs": {},
  "params": {
    "command": "ffmpeg -i https://example.com/video.mp4 -ss 00:01:00 -t 00:00:30 -c:v libx264 -c:a aac output.mp4"
  }
}

Merge video + audio tracks

{
  "type": "raw.ffmpeg",
  "inputs": {},
  "params": {
    "command": "ffmpeg -i https://example.com/video.mp4 -i https://example.com/narration.mp3 -c:v libx264 -c:a aac -map 0:v -map 1:a output.mp4"
  }
}

Error handling

FFmpeg exits non-zero → job fails with PROVIDER_ERROR:
{ "error": { "code": "PROVIDER_ERROR", "message": "FFmpeg process exited with code 1" } }
Disallowed flag → rejected before dispatch with VALIDATION_ERROR:
{ "error": { "code": "VALIDATION_ERROR", "message": "Flag '-protocol_whitelist' is not allowed in raw FFmpeg commands" } }
Full error catalogue: Error codes.

See also