Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions packages/cli/src/commands/websiteToVideoSkillContent.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// @vitest-environment node
import { readFileSync } from "node:fs";
import { join } from "node:path";
import { fileURLToPath } from "node:url";
import { describe, expect, it } from "vitest";

const REPO_ROOT = join(fileURLToPath(new URL(".", import.meta.url)), "..", "..", "..", "..");
const VALIDATION_GUIDE = readFileSync(
join(REPO_ROOT, "skills", "website-to-video", "references", "step-6-validate.md"),
"utf8",
);

describe("website-to-video validation guide", () => {
it("does not pass cloud-only dimension flags to local render", () => {
const localRenderExample = VALIDATION_GUIDE.match(
/node \/<repo-root>\/packages\/cli\/dist\/cli\.js render[\s\S]*?```/,
)?.[0];

expect(localRenderExample).toBeDefined();
expect(localRenderExample).not.toContain("--width");
expect(localRenderExample).not.toContain("--height");
expect(localRenderExample).toContain("--quality draft");
});
});
2 changes: 1 addition & 1 deletion skills-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"files": 27
},
"website-to-video": {
"hash": "e8143700c50b7469",
"hash": "623619275f0fa75b",
"files": 32
}
}
Expand Down
9 changes: 6 additions & 3 deletions skills/website-to-video/references/step-6-validate.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,16 @@ Open the Studio URL in a browser via Playwright (or another browser tool you hav
[ ] Audio audible and not clipped/peaked
```

### Path 2: Render a low-res MP4 and read it frame-by-frame
### Path 2: Render a draft MP4 and read it frame-by-frame

When Playwright isn't available, render at 540p (fast — ~30s for a 30s video) and read the MP4:
When Playwright isn't available, render at draft quality and read the MP4. Local
`hyperframes render` takes its canvas dimensions from the composition's
`data-width` / `data-height`; `--width` and `--height` are cloud-render flags and
are not supported by the local command.

```bash
node /<repo-root>/packages/cli/dist/cli.js render <project-dir> \
--width 960 --height 540 --quality medium
--quality draft
```

Then sample the resulting MP4 at minimum 5fps (use `ffmpeg -i <mp4> -r 5 frames/frame-%04d.png` if needed). Read those frames sequentially. For each SFX moment in STORYBOARD.md, find the corresponding frame and confirm the visual matches.
Expand Down
Loading