Author at 4K
Scaffold the project at 4K so the composition is laid out at 4K natively. Best when you want crisp 4K-native typography and assets.
Supersample at render
Keep your existing 1080p composition. Pass
--resolution 4k at render time and Chrome renders at 2× DPR so the screenshot lands at 4K.Quickstart
1
Render an existing project at 4K
Terminal
data-width / data-height are unchanged. Chrome’s deviceScaleFactor is set to 2, so the captured screenshot for each frame is 3840×2160. ffmpeg auto-detects the dimensions from the screenshot stream and encodes at 4K.2
Or scaffold a new project at 4K
Terminal
data-width="3840", data-height="2160", data-resolution="landscape-4k", #stage CSS dimensions, and the <meta viewport> tag.3
Verify the output is 4K
Terminal
Resolution presets
--resolution accepts these values on both init and render:
Examples:
Terminal
How --resolution works (supersampling)
The composition stays at its authored dimensions. Hyperframes computes a deviceScaleFactor from the ratio of output to composition dimensions and passes it to Chrome:
Chrome then renders the page at the higher DPR — effectively rendering each CSS pixel as 2×2 device pixels — so the captured screenshot is at the requested resolution.
What scales, what doesn’t
Supersampling re-renders the page at higher DPR. That genuinely helps anything the browser rasterizes from a vector or high-resolution source, and does nothing for content already locked to a fixed pixel grid. Knowing which is which sets correct expectations before a 4K render:
Rule of thumb: if the asset is vector or generated by the browser, supersampling helps. If it’s a bitmap with fixed pixel dimensions (video, canvas, low-res PNG), it doesn’t — author it at the target resolution instead.
Constraints
--resolution enforces three guards before any frames are captured. If any fail, the render exits before doing work.
Aspect ratio must match
The scale must be an integer
The width ratio (output ÷ composition) must be a positive integer. 1080p → 4K is exactly2×. 720p → 4K would be 3× and works. Non-integer scales like 900p → 4K (2.4×) introduce aliasing on subpixel-positioned text — Hyperframes refuses rather than producing a blurry render.
Downsampling is not supported
--resolution only supersamples. A 4K composition cannot be downsampled to 1080p with this flag — render at the composition’s native resolution and downscale separately with ffmpeg if needed.
Not yet supported with --hdr
The HDR layered compositor processes pixel buffers at composition dimensions; supersample + HDR would need parallel scaling for those buffers. The combination is rejected with a clear error message. Render in two passes if you need both: HDR at composition resolution, then upscale separately.
Performance
A 1080p → 4K supersample is roughly 4× more pixels to capture, encode, and write. Expect:- Per-frame capture: 3–4× slower (Chrome paints 4× the pixels and the screenshot transfer is 4× larger)
- Encoding: 2–3× slower (depends on codec; H.264 scales sublinearly with resolution)
- Memory: bounded — the engine’s frame data-URI cache is byte-budgeted (default 1500 MB per worker, configurable via
PRODUCER_FRAME_DATA_URI_CACHE_BYTES_MB) - Output file size: at the default CRF, expect 3–5× the file size of the 1080p render. Pass
--video-bitrate 25M(or higher) for predictable file sizes.
--workers 4 (or more) on a render box for parallel capture.
Studio support
The Renders panel in Studio includes a resolution dropdown next to the format and quality selectors. Pick4K (or 4K ↕ for portrait) and hit Export — the same supersampling path runs as the CLI flag, no composition edits required.
The dropdown defaults to Auto (render at the composition’s authored size). Available presets:
- Auto — composition’s native dimensions
- 1080p ↔ / 1080p ↕ — 1920×1080 / 1080×1920
- 4K ↔ / 4K ↕ — 3840×2160 / 2160×3840
- New project:
hyperframes init my-video --resolution 4k - Existing project:
hyperframes render --resolution 4k --output 4k.mp4
See also
renderCLI reference — every render flag including--video-bitrateand--crfinitCLI reference — the--resolutionflag at scaffold time- HDR Rendering — color pipeline guide; HDR + 4K is not yet a supported combination