video-compress
Runs in your own browser through FFmpeg compiled to WebAssembly. The default mode picks a bitrate for you; the codec can be chosen explicitly. Note that a long video takes real minutes on the caller's own CPU — budget the wait, not the price.
v1 beta browser · 3 tokens
Call it
POST https://tembrica.com/v1/tools/video-compress/runs
Authorization: Bearer $TIMBRICA_KEY
Idempotency-Key: <your retry-safe key>
Content-Type: application/json
Input
| Field | Type | Required | Notes |
|---|---|---|---|
codec | string | no |
Video codec. Omit to let the page choose. VP9 is deliberately absent — it crashes FFmpeg-WASM.
one of: h264, av1 |
Browser recipe
This tool runs in your own browser. The work order you receive carries this recipe with the placeholders filled in; the selectors below are a versioned contract, not implementation detail — they do not change without a version bump.
{
"engine": "dom",
"steps": [
{
"action": "upload",
"selector": "[data-tmb-api=\"input-file\"]",
"accept": [
".mp4",
".mov",
".webm",
".mkv",
".avi",
".m4v"
]
},
{
"action": "select",
"selector": "[data-tmb-api=\"codec\"]",
"value": "{{codec}}",
"optional": true
},
{
"action": "click",
"selector": "[data-tmb-api=\"run\"]"
},
{
"action": "wait",
"selector": "[data-tmb-api=\"download\"]",
"timeout_s": 1800
},
{
"action": "click",
"selector": "[data-tmb-api=\"download\"]"
}
],
"result": {
"kind": "download",
"settles": "automatically"
}
}
Errors it can return
validation_failed
insufficient_tokens
History
- v1 — 2026-08-02 — Initial release (browser lane).
This contract cannot change without a new version and a line above: a test compares the published schema, pricing and limits against a committed lockfile and fails the build otherwise. Subscribe to /v1/changelog to be told when something moves.