Files
hyperframes/docs/docs.json
T
Vance Ingalls 7a695dd296 fix(cli): forward --hdr through Docker render + HDR docs
The --hdr flag was silently dropped when combined with --docker because
renderDocker did not include it in the args passed to the in-container
hyperframes render invocation. Forwarding it produces the same HDR10 MP4
(HEVC, yuv420p10le, BT.2020 PQ, mastering display + max-cll) as a local
render — verified end-to-end with the new hdr-pq regression fixture.

This PR also fills in the documentation gaps from the HDR feature stack
(#288, #289, #290, #265, #268), which each added a slice of HDR support
without pulling it together into a single guide.

Code change:
- packages/cli/src/commands/render.ts: refactor renderDocker to use a new
  pure helper buildDockerRunArgs (packages/cli/src/utils/dockerRunArgs.ts)
  that explicitly threads every render flag — including --hdr, --gpu,
  --quiet — into the docker run argv. Snapshot-tested in dockerRunArgs.test.ts
  so any future flag drop fails loudly.

Docs:
- New docs/guides/hdr.mdx — top-level HDR guide: quickstart, how detection
  works, source media requirements (HDR video + 16-bit HDR PNG), output
  format constraints, ffprobe verification, Docker rendering, limitations,
  common pitfalls
- docs/guides/common-mistakes.mdx — "Expected HDR but got SDR" entry; --hdr
  is detection, not force; notes Docker now supports it
- docs/guides/rendering.mdx — --hdr row in flags table; HDR card under
  Next Steps
- docs/packages/cli.mdx — expanded --hdr description with link to the guide
- docs/packages/producer.mdx — HDR Output section under RenderConfig
- docs/packages/engine.mdx — HDR APIs section (color-space utilities +
  WebGPU readback runtime); now compiles because DEFAULT_HDR10_MASTERING
  and HdrMasteringMetadata are re-exported from packages/engine/src/index.ts
- docs/docs.json — register the new HDR guide in nav

Review feedback from PR #346:
- packages/engine/src/index.ts — export DEFAULT_HDR10_MASTERING and
  HdrMasteringMetadata so the engine docs example compiles
- docs/guides/hdr.mdx — drop fabricated "animated HDR images log a warning
  and use first frame" claim (not implemented); clarify that HDR <img> is
  16-bit PNG only and other formats fall back to SDR; broaden the yt-dlp
  example to bestvideo[dynamic_range=HDR]+bestaudio so AV1-HDR streams
  are also picked up; qualify the Docker render benchmark claim
- packages/producer/src/services/renderOrchestrator.ts — bump the HDR + non-mp4
  fallback from log.info to log.warn and make the message actionable

Regression test (hdr-pq):
- packages/producer/tests/hdr-regression — delete the broken sub-tree.
  The old hdr-pq composition relied on a CDN shader-transitions library
  and window.__hf injection with scenes defaulting to opacity:0, so when
  the library failed to load most of the render was invisible. The fixture
  was also nested two directories deep, so discoverTestSuites (which only
  scans direct children of tests/) never picked it up.
- packages/producer/tests/hdr-pq — new top-level fixture: 5s of an HDR10
  HEVC Main10 BT.2020 PQ source clip with a static SDR DOM overlay. Source
  is a 5s excerpt (1:18–1:23) from https://youtu.be/56hEFqjKG0s, downloaded
  via yt-dlp and re-encoded to HEVC Main10 / 1920x1080 / 30fps with HDR10
  mastering metadata. Self-contained: no external CDNs, no custom fonts,
  no animation libraries. NOTICE.md captures attribution.
- packages/producer/src/regression-harness.ts — add optional hdr boolean
  to TestMetadata.renderConfig, validate it, and forward it to
  createRenderJob so HDR fixtures actually run through the HDR pipeline.
- .github/workflows/regression.yml — exclude hdr from the fast shard and
  add a dedicated hdr shard so the new fixture runs on CI.
- .gitattributes — LFS-track packages/producer/tests/*/src/*.mp4 so source
  clips don't bloat the repo.
- packages/engine/src/services/frameCapture.ts — inject a no-op __name
  shim into every page via evaluateOnNewDocument. tsx transforms the
  engine source on the fly with esbuild's keepNames, which wraps every
  named function in __name(fn, "name"). When page.evaluate() serializes
  a callback those calls would crash with "__name is not defined" because
  the helper only exists in Node. The shim makes the engine work whether
  it's imported from compiled dist or from source via tsx.
2026-04-19 21:17:30 -07:00

208 lines
5.3 KiB
JSON

{
"$schema": "https://mintlify.com/docs.json",
"name": "HyperFrames",
"theme": "maple",
"colors": {
"primary": "#0a0a0a",
"light": "#f6f5f1",
"dark": "#0a0a0a"
},
"background": {
"color": {
"light": "#f6f5f1",
"dark": "#0a0a0a"
}
},
"fonts": {
"family": "Inter",
"heading": {
"family": "Inter"
}
},
"appearance": {
"default": "light"
},
"logo": {
"light": "/logo/light.svg",
"dark": "/logo/dark.svg"
},
"favicon": "/favicon.svg",
"contextual": {
"options": [
"copy",
"claude",
"cursor",
"vscode",
"windsurf",
"mcp",
{
"title": "Open an issue",
"description": "Report a bug or request a feature",
"icon": "github",
"iconType": "brands",
"href": "https://github.com/heygen-com/hyperframes/issues/new"
}
]
},
"navigation": {
"tabs": [
{
"tab": "Documentation",
"groups": [
{
"group": "Getting Started",
"pages": [
"introduction",
"quickstart",
"examples"
]
},
{
"group": "Concepts",
"pages": [
"concepts/compositions",
"concepts/data-attributes",
"concepts/frame-adapters",
"concepts/determinism"
]
},
{
"group": "Guides",
"pages": [
"guides/website-to-video",
"guides/prompting",
"guides/gsap-animation",
"guides/rendering",
"guides/hdr",
"guides/performance",
"guides/common-mistakes",
"guides/troubleshooting"
]
}
]
},
{
"tab": "Catalog",
"groups": [
{
"group": "Social Overlays",
"pages": [
"catalog/blocks/instagram-follow",
"catalog/blocks/macos-notification",
"catalog/blocks/reddit-post",
"catalog/blocks/spotify-card",
"catalog/blocks/tiktok-follow",
"catalog/blocks/x-post",
"catalog/blocks/yt-lower-third"
]
},
{
"group": "Shader Transitions",
"pages": [
"catalog/blocks/chromatic-radial-split",
"catalog/blocks/cinematic-zoom",
"catalog/blocks/cross-warp-morph",
"catalog/blocks/domain-warp-dissolve",
"catalog/blocks/flash-through-white",
"catalog/blocks/glitch",
"catalog/blocks/gravitational-lens",
"catalog/blocks/light-leak",
"catalog/blocks/ridged-burn",
"catalog/blocks/ripple-waves",
"catalog/blocks/sdf-iris",
"catalog/blocks/swirl-vortex",
"catalog/blocks/thermal-distortion",
"catalog/blocks/whip-pan"
]
},
{
"group": "CSS Transitions",
"pages": [
"catalog/blocks/transitions-3d",
"catalog/blocks/transitions-blur",
"catalog/blocks/transitions-cover",
"catalog/blocks/transitions-destruction",
"catalog/blocks/transitions-dissolve",
"catalog/blocks/transitions-distortion",
"catalog/blocks/transitions-grid",
"catalog/blocks/transitions-light",
"catalog/blocks/transitions-mechanical",
"catalog/blocks/transitions-other",
"catalog/blocks/transitions-push",
"catalog/blocks/transitions-radial",
"catalog/blocks/transitions-scale"
]
},
{
"group": "Showcases",
"pages": [
"catalog/blocks/app-showcase",
"catalog/blocks/ui-3d-reveal"
]
},
{
"group": "Data",
"pages": [
"catalog/blocks/data-chart"
]
},
{
"group": "Effects",
"pages": [
"catalog/components/grain-overlay",
"catalog/components/grid-pixelate-wipe",
"catalog/components/shimmer-sweep"
]
},
{
"group": "Blocks",
"pages": [
"catalog/blocks/flowchart",
"catalog/blocks/logo-outro"
]
}
]
},
{
"tab": "Packages",
"groups": [
{
"group": "Packages",
"pages": [
"packages/core",
"packages/engine",
"packages/player",
"packages/producer",
"packages/studio",
"packages/cli"
]
}
]
},
{
"tab": "Reference",
"groups": [
{
"group": "Reference",
"pages": [
"reference/html-schema"
]
},
{
"group": "Contributing",
"pages": [
"contributing",
"contributing/testing-local-changes"
]
}
]
}
]
},
"footer": {
"socials": {
"github": "https://github.com/heygen-com/hyperframes"
}
}
}