Skip to content

v0.37.0 — 4K master export + watermark scale

Choose a tag to compare

@shreyaskarnik shreyaskarnik released this 05 May 23:34
· 42 commits to main since this release

Adds a 4K export path that preserves the supersampled detail captured by chromium + jpeg-stitch + `deviceScaleFactor: 2` instead of downscaling 3840×2160 back to 1080p at export time.

What's new

4K master export

Two new `export` config keys let you keep the source resolution end-to-end:

```js
export default defineConfig({
video: {
browser: 'chromium',
captureMode: 'jpeg-stitch',
deviceScaleFactor: 2, // 1920×1080 layout → 3840×2160 capture
},
export: {
outputWidth: 3840,
outputHeight: 2160, // 4K master, no downscale
},
});
```

Defaults remain `video.width` / `video.height` (current behavior) — no breaking change.

`watermark.scale`

Resamples the watermark PNG with bicubic before the overlay so the same asset stays visually-relative at any output resolution. No need to ship a fresh 2× logo for 4K renders.

```js
watermark: {
src: 'assets/logo-watermark.png',
scale: 2, // 1080p PNG, 4K-correct on screen
margin: 52, // doubled from the 1080p margin
}
```

`scaleCameraMoves` generalized

`scaleCameraMoves(moves, scaleX, scaleY)` was DSF-only; now takes generic scale factors so post-export camera moves work with any layout-to-frame ratio.

`resolveExportSize(config)` helper

Centralized precedence rule (`export.outputWidth` ?? `video.width`) shared by CLI + pipeline. Public API for tooling that needs the resolved frame size.

Showcase config

The bundled `demos/showcase.config.mjs` now ships the full 4K master config: chromium + jpeg-stitch + DSF 2 + 4K output + watermark scale 2. Frame `padding: 48` / `borderRadius: 16` left at 1080p-tuned values intentionally — the point of the 4K master is to expose more UI detail, so a tighter relative frame is the right trade-off.

Compatibility

No breaking changes. Configs that don't set `outputWidth` / `outputHeight` / `watermark.scale` get the v0.36 behavior.

PR #14 — #14