hyperframes 0.8.58 → 0.8.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +4483 -3217
- package/dist/docs/data-attributes.md +2 -1
- package/dist/fontLocalizeCli.js +73 -12
- package/dist/hyperframe-runtime.js +25 -25
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +25 -25
- package/dist/hyperframes-player.global.js +3 -3
- package/dist/registry/localSemantic.js +548 -0
- package/dist/skills/hyperframes-cli/SKILL.md +2 -2
- package/dist/skills/media-use/SKILL.md +96 -0
- package/dist/skills/media-use/audio/assets/sfx/CREDITS.md +35 -0
- package/dist/skills/media-use/audio/assets/sfx/chime.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/click-soft.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/click.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/error.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/glitch-1.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/glitch-2.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/glitch-3.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/impact-bass-1.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/impact-bass-2.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/key-press.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/manifest.json +97 -0
- package/dist/skills/media-use/audio/assets/sfx/notification.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/ping.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/pop.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/riser.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/sparkle.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/typing.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/whoosh-cinematic.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/whoosh-short.mp3 +0 -0
- package/dist/skills/media-use/audio/assets/sfx/whoosh.mp3 +0 -0
- package/dist/skills/media-use/audio/references/bgm.md +74 -0
- package/dist/skills/media-use/audio/references/captions/authoring.md +163 -0
- package/dist/skills/media-use/audio/references/captions/motion.md +87 -0
- package/dist/skills/media-use/audio/references/captions/transcript-handling.md +97 -0
- package/dist/skills/media-use/audio/references/remove-background.md +143 -0
- package/dist/skills/media-use/audio/references/requirements.md +29 -0
- package/dist/skills/media-use/audio/references/sfx.md +42 -0
- package/dist/skills/media-use/audio/references/transcribe.md +52 -0
- package/dist/skills/media-use/audio/references/tts-to-captions.md +26 -0
- package/dist/skills/media-use/audio/references/tts.md +165 -0
- package/dist/skills/media-use/audio/scripts/audio.mjs +295 -0
- package/dist/skills/media-use/audio/scripts/audio.test.mjs +49 -0
- package/dist/skills/media-use/audio/scripts/heygen-tts.mjs +121 -0
- package/dist/skills/media-use/audio/scripts/lib/audio-meta.mjs +39 -0
- package/dist/skills/media-use/audio/scripts/lib/audio-meta.test.mjs +136 -0
- package/dist/skills/media-use/audio/scripts/lib/bgm.mjs +257 -0
- package/dist/skills/media-use/audio/scripts/lib/bgm.test.mjs +30 -0
- package/dist/skills/media-use/audio/scripts/lib/concurrency.mjs +14 -0
- package/dist/skills/media-use/audio/scripts/lib/concurrency.test.mjs +41 -0
- package/dist/skills/media-use/audio/scripts/lib/heygen.mjs +156 -0
- package/dist/skills/media-use/audio/scripts/lib/heygen.test.mjs +103 -0
- package/dist/skills/media-use/audio/scripts/lib/python.mjs +63 -0
- package/dist/skills/media-use/audio/scripts/lib/python.test.mjs +68 -0
- package/dist/skills/media-use/audio/scripts/lib/sfx.mjs +143 -0
- package/dist/skills/media-use/audio/scripts/lib/sfx.test.mjs +69 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.mjs +379 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.spawn.test.mjs +158 -0
- package/dist/skills/media-use/audio/scripts/lib/tts.test.mjs +157 -0
- package/dist/skills/media-use/audio/scripts/lyria-recipe.py +136 -0
- package/dist/skills/media-use/audio/scripts/wait-bgm.mjs +171 -0
- package/dist/skills/media-use/audio/scripts/wait-bgm.test.mjs +65 -0
- package/dist/skills/media-use/luts/README.md +28 -0
- package/dist/skills/media-use/luts/index.json +57 -0
- package/dist/skills/media-use/references/audio.md +19 -0
- package/dist/skills/media-use/references/grading.md +160 -0
- package/dist/skills/media-use/references/media-treatment-recipes.md +929 -0
- package/dist/skills/media-use/references/media-treatments.md +202 -0
- package/dist/skills/media-use/references/memory.md +36 -0
- package/dist/skills/media-use/references/meta.md +61 -0
- package/dist/skills/media-use/references/operations.md +325 -0
- package/dist/skills/media-use/references/resolve.md +150 -0
- package/dist/skills/media-use/references/setup-providers.md +80 -0
- package/dist/skills/media-use/references/telemetry-dashboard.md +49 -0
- package/dist/skills/media-use/registry/localSemantic.js +548 -0
- package/dist/skills/media-use/scripts/audio-duck.mjs +113 -0
- package/dist/skills/media-use/scripts/compatibility.test.mjs +27 -0
- package/dist/skills/media-use/scripts/dither.mjs +328 -0
- package/dist/skills/media-use/scripts/dither.test.mjs +176 -0
- package/dist/skills/media-use/scripts/eval.mjs +369 -0
- package/dist/skills/media-use/scripts/lib/adopt.mjs +128 -0
- package/dist/skills/media-use/scripts/lib/adopt.test.mjs +95 -0
- package/dist/skills/media-use/scripts/lib/bgm-provider.mjs +20 -0
- package/dist/skills/media-use/scripts/lib/brand-provider.mjs +59 -0
- package/dist/skills/media-use/scripts/lib/bundled-sfx-provider.mjs +119 -0
- package/dist/skills/media-use/scripts/lib/bundled-sfx-provider.test.mjs +139 -0
- package/dist/skills/media-use/scripts/lib/cache.mjs +150 -0
- package/dist/skills/media-use/scripts/lib/candidates.mjs +91 -0
- package/dist/skills/media-use/scripts/lib/candidates.test.mjs +155 -0
- package/dist/skills/media-use/scripts/lib/codex-provider.mjs +161 -0
- package/dist/skills/media-use/scripts/lib/codex-provider.test.mjs +34 -0
- package/dist/skills/media-use/scripts/lib/coverage.test.mjs +132 -0
- package/dist/skills/media-use/scripts/lib/cube-build.mjs +181 -0
- package/dist/skills/media-use/scripts/lib/cube-build.test.mjs +80 -0
- package/dist/skills/media-use/scripts/lib/cube-validate.mjs +198 -0
- package/dist/skills/media-use/scripts/lib/cube-validate.test.mjs +125 -0
- package/dist/skills/media-use/scripts/lib/cutlist.mjs +184 -0
- package/dist/skills/media-use/scripts/lib/cutlist.test.mjs +162 -0
- package/dist/skills/media-use/scripts/lib/duck.mjs +95 -0
- package/dist/skills/media-use/scripts/lib/duck.test.mjs +153 -0
- package/dist/skills/media-use/scripts/lib/error-diffusion.mjs +230 -0
- package/dist/skills/media-use/scripts/lib/error-diffusion.test.mjs +102 -0
- package/dist/skills/media-use/scripts/lib/freeze.mjs +62 -0
- package/dist/skills/media-use/scripts/lib/freeze.test.mjs +46 -0
- package/dist/skills/media-use/scripts/lib/grade-analyzer.mjs +265 -0
- package/dist/skills/media-use/scripts/lib/grade-analyzer.test.mjs +285 -0
- package/dist/skills/media-use/scripts/lib/heygen-cli.mjs +191 -0
- package/dist/skills/media-use/scripts/lib/heygen-cli.test.mjs +301 -0
- package/dist/skills/media-use/scripts/lib/heygen-search.mjs +45 -0
- package/dist/skills/media-use/scripts/lib/heygen-search.test.mjs +49 -0
- package/dist/skills/media-use/scripts/lib/heygen-video-provider.mjs +138 -0
- package/dist/skills/media-use/scripts/lib/heygen-video-provider.test.mjs +435 -0
- package/dist/skills/media-use/scripts/lib/image-provider.mjs +44 -0
- package/dist/skills/media-use/scripts/lib/index-gen.mjs +63 -0
- package/dist/skills/media-use/scripts/lib/local-media-search.mjs +32 -0
- package/dist/skills/media-use/scripts/lib/local-models.mjs +318 -0
- package/dist/skills/media-use/scripts/lib/local-models.test.mjs +220 -0
- package/dist/skills/media-use/scripts/lib/local-run.mjs +78 -0
- package/dist/skills/media-use/scripts/lib/local-run.test.mjs +121 -0
- package/dist/skills/media-use/scripts/lib/logo-provider.mjs +223 -0
- package/dist/skills/media-use/scripts/lib/logo-provider.test.mjs +154 -0
- package/dist/skills/media-use/scripts/lib/ltx-video-provider.mjs +94 -0
- package/dist/skills/media-use/scripts/lib/ltx-video-provider.test.mjs +316 -0
- package/dist/skills/media-use/scripts/lib/lut-preset-provider.mjs +271 -0
- package/dist/skills/media-use/scripts/lib/lut-preset-provider.test.mjs +199 -0
- package/dist/skills/media-use/scripts/lib/manifest.mjs +229 -0
- package/dist/skills/media-use/scripts/lib/manifest.test.mjs +388 -0
- package/dist/skills/media-use/scripts/lib/match.mjs +47 -0
- package/dist/skills/media-use/scripts/lib/media-fetch.mjs +71 -0
- package/dist/skills/media-use/scripts/lib/media-fetch.test.mjs +169 -0
- package/dist/skills/media-use/scripts/lib/media-search.d.mts +9 -0
- package/dist/skills/media-use/scripts/lib/media-search.mjs +107 -0
- package/dist/skills/media-use/scripts/lib/mflux-provider.mjs +128 -0
- package/dist/skills/media-use/scripts/lib/mflux-provider.test.mjs +174 -0
- package/dist/skills/media-use/scripts/lib/misses.mjs +49 -0
- package/dist/skills/media-use/scripts/lib/misses.test.mjs +78 -0
- package/dist/skills/media-use/scripts/lib/npx-sync.mjs +31 -0
- package/dist/skills/media-use/scripts/lib/npx-sync.test.mjs +50 -0
- package/dist/skills/media-use/scripts/lib/parakeet-words.mjs +27 -0
- package/dist/skills/media-use/scripts/lib/parakeet-words.test.mjs +44 -0
- package/dist/skills/media-use/scripts/lib/prefs-store.mjs +180 -0
- package/dist/skills/media-use/scripts/lib/prefs-store.test.mjs +189 -0
- package/dist/skills/media-use/scripts/lib/probe.mjs +39 -0
- package/dist/skills/media-use/scripts/lib/probe.test.mjs +31 -0
- package/dist/skills/media-use/scripts/lib/providers.mjs +5 -0
- package/dist/skills/media-use/scripts/lib/recipe-store.mjs +367 -0
- package/dist/skills/media-use/scripts/lib/recipe-store.test.mjs +367 -0
- package/dist/skills/media-use/scripts/lib/registry.mjs +218 -0
- package/dist/skills/media-use/scripts/lib/registry.test.mjs +262 -0
- package/dist/skills/media-use/scripts/lib/search.mjs +24 -0
- package/dist/skills/media-use/scripts/lib/search.test.mjs +32 -0
- package/dist/skills/media-use/scripts/lib/sfx-provider.mjs +23 -0
- package/dist/skills/media-use/scripts/lib/specs.mjs +132 -0
- package/dist/skills/media-use/scripts/lib/specs.test.mjs +157 -0
- package/dist/skills/media-use/scripts/lib/stats.mjs +117 -0
- package/dist/skills/media-use/scripts/lib/stats.test.mjs +165 -0
- package/dist/skills/media-use/scripts/lib/telemetry.mjs +193 -0
- package/dist/skills/media-use/scripts/lib/telemetry.test.mjs +373 -0
- package/dist/skills/media-use/scripts/lib/tts-local-provider.mjs +92 -0
- package/dist/skills/media-use/scripts/lib/tts-local-provider.test.mjs +72 -0
- package/dist/skills/media-use/scripts/lib/usage.mjs +57 -0
- package/dist/skills/media-use/scripts/lib/usage.test.mjs +54 -0
- package/dist/skills/media-use/scripts/lib/voice-provider.mjs +57 -0
- package/dist/skills/media-use/scripts/lib/voice-provider.test.mjs +46 -0
- package/dist/skills/media-use/scripts/lib/words.mjs +18 -0
- package/dist/skills/media-use/scripts/prefs.mjs +70 -0
- package/dist/skills/media-use/scripts/recipe.mjs +103 -0
- package/dist/skills/media-use/scripts/resolve.mjs +1287 -0
- package/dist/skills/media-use/scripts/transcribe.mjs +180 -0
- package/dist/skills/media-use/scripts/transcript-cut.mjs +239 -0
- package/dist/skills/registry/localSemantic.js +548 -0
- package/dist/studio/assets/{hyperframes-player-zGyOcwwh.js → hyperframes-player-BBub3ZdI.js} +3 -3
- package/dist/studio/assets/{index-ZJaRCDYV.js → index-BxZ5Cw5w.js} +1 -1
- package/dist/studio/assets/{index-BcE2OSVA.js → index-CI7WON-E.js} +1 -1
- package/dist/studio/assets/{index-d8ferjRc.js → index-D1KNPijK.js} +190 -190
- package/dist/studio/assets/{index-DKJpHYYd.css → index-DZBHG9TW.css} +1 -1
- package/dist/studio/index.d.ts +548 -8
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +21596 -20725
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# LUT library (authoring)
|
|
2
|
+
|
|
3
|
+
`index.json` is the agent-consumed catalog of color-grade looks. Each entry resolves
|
|
4
|
+
on demand — no `.cube` bodies are committed to the repo.
|
|
5
|
+
|
|
6
|
+
Each look has:
|
|
7
|
+
|
|
8
|
+
- `id`, `description`, `tags`, `intensity` — matching + application metadata.
|
|
9
|
+
- `url` (optional) — a hosted `.cube` downloaded, validated, and frozen at resolve
|
|
10
|
+
time, exactly like bgm/image assets.
|
|
11
|
+
- `params` (optional) — a deterministic `buildCube` spec used offline (`--local-only`)
|
|
12
|
+
or as a fallback if the `url` download/validation fails.
|
|
13
|
+
|
|
14
|
+
An entry needs at least one of `url` or `params`; prefer both (CDN url with a params
|
|
15
|
+
fallback) so resolution is never blocked on the network.
|
|
16
|
+
|
|
17
|
+
## Hosting a new look (operators)
|
|
18
|
+
|
|
19
|
+
1. Generate the `.cube` (e.g. `resolve -t lut --params '{...}'` or a graded export).
|
|
20
|
+
2. Upload it to the public CDN origin bucket:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
aws s3 cp <id>.cube s3://heygen-public/luts/<id>.cube
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
It is then served at `https://static.heygen.ai/luts/<id>.cube` (CloudFront).
|
|
27
|
+
|
|
28
|
+
3. Add an entry to `index.json` with that `url` (and ideally a `params` fallback).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"notes": "Look entries resolve on-demand from a CDN .cube `url` (downloaded + frozen, like bgm/image); `params` is a deterministic buildCube fallback used offline (--local-only) or if the download/validation fails. No .cube bodies are committed. See README.md to author or host a new look.",
|
|
3
|
+
"looks": [
|
|
4
|
+
{
|
|
5
|
+
"id": "teal-orange-blockbuster",
|
|
6
|
+
"description": "Teal shadows and warm orange highlights for blockbuster-style cinematic footage.",
|
|
7
|
+
"tags": ["teal", "orange", "blockbuster", "cinematic", "split tone", "movie"],
|
|
8
|
+
"intensity": 0.85,
|
|
9
|
+
"url": "https://static.heygen.ai/luts/teal-orange-blockbuster.cube",
|
|
10
|
+
"params": {
|
|
11
|
+
"contrast": 0.18,
|
|
12
|
+
"saturation": 0.08,
|
|
13
|
+
"vibrance": 0.12,
|
|
14
|
+
"splitTone": {
|
|
15
|
+
"intensity": 0.62,
|
|
16
|
+
"balance": 0.52,
|
|
17
|
+
"shadows": [-0.04, 0.05, 0.09],
|
|
18
|
+
"highlights": [0.1, 0.04, -0.03]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "bleach-bypass",
|
|
24
|
+
"description": "High-contrast desaturated bleach bypass look with strong blacks.",
|
|
25
|
+
"tags": ["bleach", "bypass", "desaturated", "high contrast", "gritty", "film"],
|
|
26
|
+
"intensity": 0.8,
|
|
27
|
+
"url": "https://static.heygen.ai/luts/bleach-bypass.cube",
|
|
28
|
+
"params": {
|
|
29
|
+
"blacks": 0.04,
|
|
30
|
+
"shadows": -0.08,
|
|
31
|
+
"highlights": 0.08,
|
|
32
|
+
"whites": 0.18,
|
|
33
|
+
"contrast": 0.55,
|
|
34
|
+
"temperature": -0.02,
|
|
35
|
+
"saturation": -0.72,
|
|
36
|
+
"vibrance": -0.25
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "film-fade",
|
|
41
|
+
"description": "Soft faded film wash with lifted blacks and warm highlights.",
|
|
42
|
+
"tags": ["film", "fade", "faded", "wash", "warm", "vintage"],
|
|
43
|
+
"intensity": 0.75,
|
|
44
|
+
"url": "https://static.heygen.ai/luts/film-fade.cube",
|
|
45
|
+
"params": {
|
|
46
|
+
"blacks": 0.35,
|
|
47
|
+
"shadows": 0.18,
|
|
48
|
+
"highlights": 0.02,
|
|
49
|
+
"whites": -0.03,
|
|
50
|
+
"contrast": -0.28,
|
|
51
|
+
"temperature": 0.16,
|
|
52
|
+
"saturation": -0.12,
|
|
53
|
+
"vibrance": -0.08
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Audio engine — voiceover, music, SFX, captions, transcription
|
|
2
|
+
|
|
3
|
+
For a full audio pass (TTS voiceover + background music + sound effects in one
|
|
4
|
+
shot), use the shared engine at `audio/scripts/audio.mjs`. It takes a neutral
|
|
5
|
+
`audio_request.json` and writes `audio_meta.json` plus assets under
|
|
6
|
+
`.media/audio/{voice,bgm,sfx}`:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
node <SKILL_DIR>/audio/scripts/audio.mjs --request ./audio_request.json --out ./audio_meta.json
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- **Request** `{ provider?, lang?, speed?, lines: [{ id, text, sfx?: [names] }], bgm: { mode?, query?, prompt? } }`: `id` joins each line back to your model; `bgm.mode` = `retrieve | generate | none` (omit for auto). `--only tts,bgm,sfx` runs a subset and merges into an existing `--out`.
|
|
13
|
+
- **Output** `audio_meta.json` (id-keyed): `voices[].{path,duration_s,words[]}` (word timestamps for captions), `sfx[]`, `bgm`, `total_duration_s`.
|
|
14
|
+
- **HeyGen free-usage path**: HeyGen CLI auth unlocks TTS plus music/SFX retrieval. Local/provider-specific generators are explicit alternatives where installed; run `npx hyperframes media-use resolve --doctor` before assuming retrieval or TTS will work.
|
|
15
|
+
- If BGM took the generate path (`bgm_pending: true`), run `audio/scripts/wait-bgm.mjs` before final render.
|
|
16
|
+
|
|
17
|
+
Single-shot helpers: `audio/scripts/heygen-tts.mjs` (one voice file). Transcription / background removal / captions use the `hyperframes` CLI (`transcribe`, `remove-background`), see the per-topic guides in `audio/references/` (`tts.md`, `bgm.md`, `sfx.md`, `transcribe.md`, `remove-background.md`, `captions/`).
|
|
18
|
+
|
|
19
|
+
Transcription defaults to Parakeet (better than whisper.cpp: 6.05% vs 7.44% WER, 5-10x faster) via `scripts/transcribe.mjs`, with whisper.cpp auto-fallback (see `references/operations.md`).
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Color grading — grade blocks and LUTs
|
|
2
|
+
|
|
3
|
+
Use `grade` when you need a canonical HyperFrames grading/effects payload for
|
|
4
|
+
an `<img>` or `<video>`. Core presets and params-backed LUT entries resolve
|
|
5
|
+
locally; future CDN-backed LUT entries require network unless already
|
|
6
|
+
frozen. Persist a decided payload with the CLI rather than editing HTML by
|
|
7
|
+
hand:
|
|
8
|
+
|
|
9
|
+
For a vague but explicit polish request, do not jump directly from intent to a
|
|
10
|
+
preset name. Read `media-treatments.md`, choose a treatment whose subject and
|
|
11
|
+
avoid rules match the actual media, apply its conservative base with only
|
|
12
|
+
justified bounded tuning, then complete its visual verification steps. A named
|
|
13
|
+
owned treatment uses the exact preset/payload in its recipe; do not run the
|
|
14
|
+
generic grade/LUT resolver first.
|
|
15
|
+
|
|
16
|
+
Stop here and use that treatment workflow for requests such as retro, old home
|
|
17
|
+
video, camcorder, film, print, ASCII, glitch, privacy, or a media reveal. Do not
|
|
18
|
+
assemble those from a generic LUT plus handmade CSS vignette/grain/opacity.
|
|
19
|
+
|
|
20
|
+
**Never `cat`/read a `.cube` file into context.** A 3D LUT is ~size^3 lines of raw numbers (33^3 ≈ 36k lines at the default size). It bloats context and carries zero human/agent-legible signal. To understand or choose a LUT, use `hyperframes grade-compare` to see it rendered, or `cube-validate.mjs` for a one-line `{ok,size}` check. Read `.media/index.md` or `luts/index.json` for the description. Never read the LUT body itself.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx hyperframes media-use resolve --type grade --intent "warm daylight" --project . --json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Preset-first output uses the core runtime vocabulary and does not freeze a file:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"preset": "warm-daylight",
|
|
31
|
+
"intensity": 1
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Apply that payload to one unambiguous real media element:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
hyperframes media-treatment --project . --file index.html \
|
|
39
|
+
--selector '#hero' \
|
|
40
|
+
--grading '{"preset":"warm-daylight","intensity":1}' --apply --json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Use `--dry-run` before writing when scope is uncertain and `--clear` to remove
|
|
44
|
+
the treatment. The low-level persisted result is still normal HTML:
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<video
|
|
48
|
+
class="clip"
|
|
49
|
+
src="./media/scene.mp4"
|
|
50
|
+
data-color-grading='{"preset":"warm-daylight","intensity":1}'
|
|
51
|
+
></video>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Direct attribute authoring is a fallback for environments where the CLI is not
|
|
55
|
+
available, not the primary agent workflow.
|
|
56
|
+
|
|
57
|
+
To build a treatment that is not already represented by a recipe, inspect the
|
|
58
|
+
canonical toolbox first:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
hyperframes media-treatment --capabilities --json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
It reports a concise family map. Read `--capability grading` for the processing
|
|
65
|
+
order, then request only the focused family needed to get its legal controls
|
|
66
|
+
and ranges from Core. Compose one nested payload and pass it back through
|
|
67
|
+
`hyperframes media-treatment`; the command rejects unknown keys before
|
|
68
|
+
mutation. Do not generate or hand-edit a LUT merely to combine controls already
|
|
69
|
+
owned by the realtime shader.
|
|
70
|
+
|
|
71
|
+
For seek-safe effect motion, animate only the runtime-supported CSS properties
|
|
72
|
+
on that same real media element with its registered paused GSAP timeline:
|
|
73
|
+
|
|
74
|
+
| CSS property | Range |
|
|
75
|
+
| ---------------------------------- | ------- |
|
|
76
|
+
| `--hf-color-grading-intensity` | 0 to 1 |
|
|
77
|
+
| `--hf-color-grading-lut-intensity` | 0 to 1 |
|
|
78
|
+
| `--hf-color-grading-exposure` | -2 to 2 |
|
|
79
|
+
| `--hf-color-grading-blur` | 0 to 1 |
|
|
80
|
+
| `--hf-color-grading-bloom` | 0 to 3 |
|
|
81
|
+
| `--hf-color-grading-kuwahara` | 0 to 1 |
|
|
82
|
+
| `--hf-color-grading-pixelate` | 0 to 1 |
|
|
83
|
+
| `--hf-color-grading-ascii` | 0 to 1 |
|
|
84
|
+
| `--hf-color-grading-dither` | 0 to 1 |
|
|
85
|
+
|
|
86
|
+
Author the initial value directly in the media element's inline `style`, then
|
|
87
|
+
use finite `tl.to()` keyframes. Do not use a frame-zero `tl.set()`, CSS
|
|
88
|
+
animation clocks, timers, random values, or `onUpdate` callbacks. The static
|
|
89
|
+
`data-color-grading` payload remains the fallback and source of the other
|
|
90
|
+
controls.
|
|
91
|
+
|
|
92
|
+
For a reusable color transform beyond the preset vocabulary, freeze a validated
|
|
93
|
+
`.cube` under `.media/luts/` and return a block that references it:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx hyperframes media-use resolve --type grade --intent "teal orange blockbuster" --project . --json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"intensity": 1,
|
|
102
|
+
"lut": { "src": ".media/luts/grade_001.cube", "intensity": 0.85 }
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Use `lut` when you only need the reusable `.cube` file:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npx hyperframes media-use resolve --type lut --intent "teal orange blockbuster" --project .
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For a describable technical look, author an explicit parametric LUT with `--params`:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npx hyperframes media-use resolve --type lut --params '{"contrast":0.2,"temperature":-0.3}' --project .
|
|
116
|
+
npx hyperframes media-use resolve --type grade --params '{"exposure":0.2}' --project . --json
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
For a LUT generated by your own script, ingest it with `--from`; media-use validates it before registration and rejects invalid or oversized cubes:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npx hyperframes media-use resolve --type lut --from custom.cube --project .
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Parametric math (`buildCube`) cannot reproduce real film stocks or emulsion
|
|
126
|
+
transforms. Use a CDN-backed scanned `.cube` entry or ingest a real scanned
|
|
127
|
+
`.cube` for those.
|
|
128
|
+
|
|
129
|
+
For visual selection, list reusable LUT candidates with
|
|
130
|
+
`resolve --type grade --candidates`, write the promising entries to a
|
|
131
|
+
`grades.json`, run
|
|
132
|
+
`hyperframes grade-compare --for <frame> --grades grades.json`, then commit the
|
|
133
|
+
winner with `resolve -t grade` as the final `data-color-grading` block.
|
|
134
|
+
|
|
135
|
+
For media already selected in a composition, use `media-treatment --analyze`
|
|
136
|
+
when you need side-effect-free `ffmpeg`/`ffprobe` signalstats evidence. It
|
|
137
|
+
returns source metadata, HDR/unknown-LOG warnings, and a bounded `adjust`
|
|
138
|
+
suggestion without modifying the composition. The suggestion is a starting
|
|
139
|
+
point for visual review, not an automatic neutralization of intentional color.
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
hyperframes media-treatment --project . --file index.html \
|
|
143
|
+
--selector '#hero' --analyze --json
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
For an unbound source file, `resolve --type grade --for ... --analyze` remains
|
|
147
|
+
available. Without `--analyze`, that resolver records a grade candidate in
|
|
148
|
+
`.media`; use that form only when you intend to keep the candidate.
|
|
149
|
+
|
|
150
|
+
Library LUT entries live in `luts/index.json`. Each entry keeps `id`,
|
|
151
|
+
`description`, `tags`, and `intensity`, then supplies either compact `params`
|
|
152
|
+
for on-demand `buildCube(params)` generation or a direct CDN `url` for future
|
|
153
|
+
scanned `.cube` files. Do not commit generated `.cube` bodies; resolve
|
|
154
|
+
validates generated or downloaded cubes as it freezes them under
|
|
155
|
+
`.media/luts/`.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
npx hyperframes media-use resolve --type lut --intent "teal orange blockbuster" --project . --json
|
|
159
|
+
node skills/media-use/scripts/lib/cube-validate.mjs .media/luts/lut_001.cube
|
|
160
|
+
```
|