Choosing renditions — what the encoder actually does
Per-domain config (PATCH /v1/domain/config):
{ "renditions": ["h264_720", "h264_1080", "av1_720", "av1_1080"] }
h264_720 is mandatory (it is the universal fallback and the source of the
progressive web.mp4). Defaults enable all four.
Things the pipeline does that are worth knowing before you file a bug:
- Quality-first, capped — not fixed bitrate. Encodes run at constant quality (CRF/CQ 23 for H.264, 24 for AV1) with maxrate ceilings (2.8 Mbps at 720p, 5 Mbps at 1080p). A screencast will come out far smaller than a confetti cannon; that is correct behavior. We never inflate a small input to hit a bitrate target.
- No upscaling, and no fake 1080p. The scale filter targets the short side and never enlarges. The 1080p pair is skipped entirely when the source's short side is under 1080 — you will not receive a rendition labeled 1080p that is actually 768p.
- Portrait is first-class. "720p" means the short side; a 720×1280 phone video stays 720×1280.
- AV1 is best-effort. AV1 halves bandwidth on modern devices, but if the AV1 encoder fails on a given worker, the video ships H.264-only rather than failing. Check the master playlist if you need to know what a video actually carries.
- Aligned keyframes. All renditions share GOP boundaries (2 s at the source frame rate), so adaptive players switch quality seamlessly.
- Duration is server-truth. The worker probes the real duration; the
value you declared at initiate is advisory. Videos exceeding the domain's
max_duration_secondsare rejected at validation with a clear reason. - Metadata is stripped (GPS, device info) except a copyright tag, which is preserved.
- Three posters, not one. Every video gets
thumbnail_1/2/3.jpg, sampled at roughly 10%, 50% and 90% of its duration and listed inthumbnail_urls. Sampling by fraction rather than at a fixed second avoids the fade-ins and title cards that a single early frame so often lands on. See the playback guide for picking one.
Outputs toggles (outputs config key): hls (always recommended), dash
(web-only players; off by default), mp4_fallback (progressive web.mp4 —
copied from the H.264 720p rung, so it reports its own
web_mp4_width/web_mp4_height, which are not the source width/height
for anything larger; it is also what an og:video card plays, for public videos
only), og_thumbnail (1200×630 share image with a play button). Optional stages:
transcript (speech recognition — a WebVTT caption track at
outputs.transcript_url plus text from GET /v1/videos/:id/transcript; can
also be requested per video with "transcript": true on initiate, which
overrides this setting either way), moderation_frames (sampled frames for
your own review tooling, served only via your API key).