Web Ready Video
The webReady recipe optimizes videos for web delivery — browser playback, embeds, and social sharing — without obvious quality loss. Xora probes the source first, then picks the cheapest path that still meets your goals.
How it decides
Section titled “How it decides”| Source condition | Strategy |
|---|---|
| H.264 video, AAC/MP3 audio, MP4/MOV container, reasonable bitrate, and faststart already present | passthrough: return your original input URL — no ffmpeg run |
| Browser-compatible source, faststart missing, no explicit encode settings | faststart_remux: stream-copy and move MP4 metadata to the front |
Unsupported codec/container, high bitrate, or explicit encode settings (crf, bitrateKbps, scaleDown, width, height) | web_encode: H.264/AAC MP4 with fast-decode settings and one keyframe per second |
Basic usage
Section titled “Basic usage”curl -X POST https://api.xora.sh/v1/jobs \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "mode": "recipe", "input": { "url": "https://example.com/upload.mov" }, "output": { "format": "mp4" }, "recipe": { "name": "webReady" } }'const response = await fetch('https://api.xora.sh/v1/jobs', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ mode: 'recipe', input: { url: 'https://example.com/upload.mov' }, output: { format: 'mp4' }, recipe: { name: 'webReady' } })});import requests
response = requests.post( "https://api.xora.sh/v1/jobs", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, json={ "mode": "recipe", "input": {"url": "https://example.com/upload.mov"}, "output": {"format": "mp4"}, "recipe": {"name": "webReady"} })Smaller web delivery (720p)
Section titled “Smaller web delivery (720p)”Setting encode options forces a re-encode even when the source is browser-compatible:
{ "mode": "recipe", "input": { "url": "https://example.com/large-upload.mp4" }, "output": { "format": "mp4" }, "recipe": { "name": "webReady", "scaleDown": true, "height": 720, "crf": 26 }}Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Must be "webReady" |
scaleDown | boolean | No | false | Downscale when re-encoding. Ignored on passthrough/remux paths. |
width | number | No | auto | Output width when scaling |
height | number | No | 720 | Output height when scaleDown is true |
crf | number | No | 26 | Quality when re-encoding (lower = higher quality) |
bitrateKbps | number | No | — | Target video bitrate; overrides CRF when set |
startSeconds | number | No | — | Optional start offset in seconds |
durationSeconds | number | No | — | Optional duration limit in seconds |
Output format
Section titled “Output format”webReady requires MP4 output:
"output": { "format": "mp4" }When to use webReady vs proxy vs compress
Section titled “When to use webReady vs proxy vs compress”Use webReady when… | Use proxy when… | Use compress when… |
|---|---|---|
| Web playback and sharing | Timeline editing and scrubbing | You always want a CRF-controlled re-encode |
| Source may already be web-ready | You always want re-encode | No passthrough/remux shortcuts |
| Optional smaller delivery via CRF/scale | Optional all-intra keyframes | Predictable encode every time |