mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
Thirty-two published videos were the raw render output. One 20-second catalog preview was 60 MB at 25 Mbps — Blu-ray bitrate for a screen capture in a docs page. Nothing autoplays, so no page shipped that silently, but a reader who pressed play paid for it. Re-encoded at 1280 wide, CRF 28, faststart, keeping audio where it existed. Measured PSNR against the originals at ~38.5 dB, which is visually identical — the first check I ran returned nothing and I mistook that for a pass, so this number comes from a filter that actually worked. Worth correcting one thing I said earlier: the catalog is not systemically over-encoded. 190 videos, 0.36 GB, about 1.9 MB each. Six were over 10 MB. I found two monsters and generalised from them. Pages carrying more than 8 MB of video: 26 before, and the heaviest went from 140 MB to under 15 MB. The durable fix is in generate-catalog-previews.ts, which had no delivery encode at all — it published the render master directly. It has a web pass now, so the next preview is born small instead of being cleaned up later.
54 lines
1.9 KiB
Plaintext
54 lines
1.9 KiB
Plaintext
---
|
||
title: "Blend Difference"
|
||
description: "Auto-inverting text using mix-blend-mode: difference — flips between white and black per-pixel against the background"
|
||
---
|
||
|
||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/caption-blend-difference-v2.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/components/caption-blend-difference.png" autoPlay muted loop playsInline />
|
||
|
||
## Install
|
||
|
||
```bash Terminal
|
||
npx hyperframes add caption-blend-difference
|
||
```
|
||
|
||
That writes one file: `compositions/components/caption-blend-difference.html`.
|
||
|
||
## Paste it into your composition
|
||
|
||
Open `compositions/components/caption-blend-difference.html` and copy what is inside into your own composition.
|
||
The file opens with a comment header that walks you through it.
|
||
|
||
A component has no size or duration of its own. It takes both from the composition
|
||
you paste it into.
|
||
|
||
## Add it to a project
|
||
|
||
### Ask your agent
|
||
|
||
```text
|
||
Add the Blend Difference component from the HyperFrames Catalog to this project.
|
||
Replace the demo content with mine and match the existing design and timing.
|
||
```
|
||
|
||
### Install from the terminal
|
||
|
||
```bash
|
||
npx hyperframes add caption-blend-difference
|
||
```
|
||
|
||
## Use it
|
||
|
||
Ask your agent to apply the component to the intended element and preserve the project’s existing timing.
|
||
|
||
**Wiring it by hand.** Open `compositions/components/caption-blend-difference.html` and paste its contents into your composition. The comment header in that file contains any item-specific instructions.
|
||
|
||
## Related topics
|
||
|
||
- [Browse the complete Catalog](/catalog)
|
||
- [Add assets and Catalog items in Studio](/studio/assets-and-blocks)
|
||
- [Build a richer composition](/go-further)
|
||
|
||
{/* hf:generated-footer */}
|
||
|
||
Tagged `text` `text-effect` `effect` `blend-mode` `contrast` `inversion`.
|