Skip to main content
Hyperframes renders to 4K (3840×2160) two ways. Both produce a true 4K MP4; pick the one that matches your project.

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
The composition’s 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
Every scaffolded HTML file is patched in place: 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
Expected:

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.
This approach is intentionally simple — no composition edits, no second authoring pass. The tradeoff: 4K renders take roughly 4× as long per frame because there are 4× the pixels to capture and encode.

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 exactly . 720p → 4K would be 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.
For a 4K render of a 30-second composition, plan on a few minutes of wall time on a modern laptop. Add --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. Pick 4K (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
The resolution applies per render, not per project — your composition files are unchanged. The same constraints apply; when the producer rejects a combination, the failure surfaces in the Studio render queue. You can also drive resolution from the CLI:
  • New project: hyperframes init my-video --resolution 4k
  • Existing project: hyperframes render --resolution 4k --output 4k.mp4

See also