Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions guides/ffmpeg.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "FFmpeg command guide"

Check warning on line 2 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L2

Did you really mean 'FFmpeg'?
sidebarTitle: "FFmpeg"
description: "Run any FFmpeg command in the cloud. ~120 whitelisted flags, 8-layer sandboxed execution, signed download URL. Same FFmpeg syntax you know."

Check warning on line 4 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L4

Did you really mean 'FFmpeg'?

Check warning on line 4 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L4

Did you really mean 'sandboxed'?
icon: "terminal"
keywords: ["ffmpeg guide", "ffmpeg in cloud", "ffmpeg sandboxed execution", "ffmpeg flags whitelist", "ffmpeg command api"]
canonical: "https://rendobar.com/docs/guides/ffmpeg"
Expand All @@ -25,7 +25,7 @@
}}
/>

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.

Check warning on line 28 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L28

Did you really mean 'FFmpeg'?

Check warning on line 28 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L28

Did you really mean 'Rendobar'?

```bash
curl -X POST https://api.rendobar.com/jobs \
Expand All @@ -41,15 +41,15 @@
```

<Tip>
From a shell? Use [the CLI](/cli/overview): `rb ffmpeg -i input.mp4 -vf scale=1280:720 out.mp4`. Local files upload automatically.

Check warning on line 44 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L44

Did you really mean 'ffmpeg'?
</Tip>

## 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

Check warning on line 50 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L50

Did you really mean 'sandboxed'?
3. **Substitute**: URLs replaced with local paths in the FFmpeg command

Check warning on line 51 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L51

Did you really mean 'FFmpeg'?
4. **Execute**: FFmpeg runs in an isolated container with network disabled

Check warning on line 52 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L52

Did you really mean 'FFmpeg'?
5. **Upload**: output goes to R2
6. **Return**: signed `output.file.url` available via `GET /jobs/{id}`

Expand Down Expand Up @@ -95,7 +95,7 @@

### Auxiliary files read by a filter

Some files aren't 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're staged before the command runs.

Check warning on line 98 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L98

Did you really mean 'demuxer'?

This burns a subtitle track that lives only in the request, with no file to host:

Expand All @@ -120,9 +120,10 @@
|---|---|---|---|---|
| `type` | string | yes | - | `"ffmpeg"` |
| `inputs` | object | yes | - | Working directory for the command. Maps a filename to a source (URL, `{url}`, or `{content}`; an uploaded asset's content URL is just a URL). `{}` when every input is an inline `-i` URL. See [Input sources](#input-sources) |
| `params.command` | string | yes | - | Real FFmpeg command starting with `ffmpeg`. Input URLs go in `-i` positions |

Check warning on line 123 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L123

Did you really mean 'FFmpeg'?
| `params.outputFormat` | string | no | inferred | Override container format. Inferred from trailing filename if omitted |
| `params.timeout` | int | no | `120` | Server-side max execution in seconds. Range 1–900 |
| `params.compute` | string | no | `auto` | Machine class: `auto`, `cpu`, or `gpu`. See [GPU acceleration](#gpu-acceleration) |

## Validate without executing

Expand All @@ -144,13 +145,13 @@
|---|---|
| `-i` | Input file |
| `-f` | Force format |
| `-c:v`, `-c:a` | Video / audio codec (stream specifiers like `-c:v:0` work) |

Check warning on line 148 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L148

Did you really mean 'codec'?
| `-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 |

Check warning on line 154 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L154

Did you really mean 'bitrate'?
| `-crf`, `-preset` | Quality + preset |
| `-an`, `-vn` | Disable audio / video |
| `-y` | Overwrite output |
Expand All @@ -158,18 +159,53 @@

Unrecognised flags are rejected before dispatch with `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 don't 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.

Check warning on line 166 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L166

Did you really mean 'GPUs'?

<CodeGroup>

```bash CPU (libx264)
ffmpeg -i input.mp4 -c:v libx264 -preset medium -crf 23 output.mp4
```

```bash GPU (h264_nvenc)
ffmpeg -i input.mp4 -c:v h264_nvenc -preset p5 -cq 23 output.mp4
```

</CodeGroup>

Set `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`.

```json
{
"type": "ffmpeg",
"inputs": {},
"params": {
"command": "ffmpeg -i https://example.com/video.mp4 -c:v h264_nvenc -preset p5 -cq 23 output.mp4",
"compute": "gpu"
}
}
```

<Info>
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.
</Info>

## 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_ERROR` before dispatch.

Check warning on line 201 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L201

Did you really mean 'allowlist'?
- **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.

Check warning on line 204 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L204

Did you really mean 'Sandboxed'?

## Cost & timeout

Priced per compute second from your [credit balance](/concepts/credits), the wall-clock time FFmpeg ran, excluding file transfer. Typical cost ~$0.05/min.

Check warning on line 208 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L208

Did you really mean 'FFmpeg'?

Plan timeouts: 5 min (Free), 15 min (Pro). See [plan limits](/support/limits) for the full table. Exceeding the timeout returns `PROVIDER_TIMEOUT`; no credits charged.

Expand Down Expand Up @@ -227,9 +263,9 @@

The filenames your command writes define the output. You get back every file it produced.

Every completed job, FFmpeg or otherwise, returns the same `output` shape. [Job output](/concepts/job-output) documents it in full. The short version:

Check warning on line 266 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L266

Did you really mean 'FFmpeg'?

- `output.data`: the computed answer (a probe result, a transcript). `null` for FFmpeg jobs, which only write files.

Check warning on line 268 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L268

Did you really mean 'FFmpeg'?
- `output.file`: the headline result you play or download, one file or a stream manifest. `null` for pure file sets.
- `output.files`: every file the job produced, the complete list.
- `output.expiresAt`: Unix ms when the URLs expire, present when `files` is non-empty.
Expand Down Expand Up @@ -330,7 +366,7 @@

## Error handling

A failed job carries an `error` 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.

Check warning on line 369 in guides/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

guides/ffmpeg.mdx#L369

Did you really mean 'FFmpeg'?

```json
{
Expand Down
10 changes: 10 additions & 0 deletions job-types/ffmpeg.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "FFmpeg reference"

Check warning on line 2 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L2

Did you really mean 'FFmpeg'?
sidebarTitle: "FFmpeg"
description: "Execute a custom FFmpeg command via API with ~120 whitelisted flags, sandboxed execution, and signed output URL. Live on all plans, ~$0.05/min."

Check warning on line 4 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L4

Did you really mean 'FFmpeg'?

Check warning on line 4 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L4

Did you really mean 'sandboxed'?
icon: "terminal"
tag: "Live"
keywords: ["ffmpeg api reference", "ffmpeg cloud", "ffmpeg sandboxed", "ffmpeg rest api", "ffmpeg command api"]
Expand All @@ -15,7 +15,7 @@
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://rendobar.com/docs/job-types/ffmpeg/#article",
"headline": "FFmpeg reference",

Check warning on line 18 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L18

Did you really mean 'FFmpeg'?
"description": "Execute a custom FFmpeg command with whitelisted flags, sandboxed execution, and signed output URL. Live on all plans.",
"datePublished": "2026-03-20",
"dateModified": "2026-05-24",
Expand All @@ -30,7 +30,7 @@
**Live.** Production-ready, available on all plans.
</Check>

Execute a custom FFmpeg command with whitelisted flags. The `inputs` map stages source files into the working directory by name. The command references them by bare name, and inline `-i` URLs also work.

Check warning on line 33 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L33

Did you really mean 'FFmpeg'?

<Info>
**Timeout:** 900 s max (plan-capped) · **Accepts:** video, audio, image
Expand Down Expand Up @@ -101,7 +101,7 @@
`{ "url": "https://..." }`. Remote file, explicit form.
</ResponseField>
<ResponseField name="content" type="object">
`{ "content": "...text..." }`. Inline text staged verbatim, up to 64 KB. For subtitles, `concat` lists, and LUTs with nothing to host.

Check warning on line 104 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L104

Did you really mean 'LUTs'?
</ResponseField>
<ResponseField name="uploaded file" type="string">
A file you already uploaded is referenced by its content URL: the `url` returned by the uploads endpoint, like `https://api.rendobar.com/assets/asset_abc123/content`. Pass it like any other URL string.
Expand All @@ -112,7 +112,7 @@
</ParamField>

<ParamField body="command" type="string" required>
Real FFmpeg command starting with `ffmpeg`. Input URLs go in `-i` positions, or reference staged `inputs` files by name.

Check warning on line 115 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L115

Did you really mean 'FFmpeg'?
</ParamField>

<ParamField body="outputFormat" type="enum" default="inferred">
Expand All @@ -123,6 +123,16 @@
Max execution time in seconds. Range 1–900. Plan caps apply (Free 5 min, Pro 15 min).
</ParamField>

<ParamField body="compute" type="enum" default="auto">
Which machine class runs the job. One of `auto`, `cpu`, `gpu`.

- `auto` (default): a command using an NVENC or CUDA encoder, like `h264_nvenc`, routes to a GPU. Everything else runs on CPU. You don't set anything.
- `gpu`: force a GPU machine.
- `cpu`: force a CPU machine. A command that calls an NVENC encoder is rejected with `VALIDATION_ERROR`.

GPU jobs run the hardware encoders `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.

Check warning on line 133 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L133

Did you really mean 'GPUs'?
</ParamField>

## Response

```json
Expand All @@ -131,7 +141,7 @@

Poll `GET /jobs/{id}` until `status: "complete"`. On success the job carries an `output` object. On failure it carries an `error` object. The filenames your command writes define the output.

`output` is one shape for every job type, documented in full on [Job output](/concepts/job-output). FFmpeg jobs set `output.data` to `null` and return their files in `output.file` and `output.files`. Read `output.file.url` for the file to play or download, and `output.files` for the full list.

Check warning on line 144 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L144

Did you really mean 'FFmpeg'?

<ResponseField name="error" type="object">
Present when `status` is `failed`.
Expand Down Expand Up @@ -167,4 +177,4 @@
- [CLI overview](/cli/overview): the same job from your terminal with `rb ffmpeg`
- [Credits and billing](/concepts/credits): per-compute-second pricing detail
- [Plan limits](/support/limits): file-size caps, timeouts, and concurrency per plan
- [FFmpeg in the cloud](https://rendobar.com/ffmpeg/): every operation Rendobar supports

Check warning on line 180 in job-types/ffmpeg.mdx

View check run for this annotation

Mintlify / Mintlify Validation (rendobar) - vale-spellcheck

job-types/ffmpeg.mdx#L180

Did you really mean 'Rendobar'?
Loading