mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
feat(cli): expose png-sequence format
The producer already supports `format: "png-sequence"` end-to-end (see RenderConfig in renderOrchestrator.ts), but the CLI's VALID_FORMAT validator rejects it before the flag reaches the producer. Surface it the same way `mov` and `webm` are surfaced. Behaviour: - `--format png-sequence` accepted alongside mp4/webm/mov. - Auto-output path uses no extension (FORMAT_EXT["png-sequence"] = "") since the producer treats outputPath as a directory of frame_NNNNNN.png. - `printRenderComplete` sums the contained file sizes when outputPath is a directory, instead of reporting the platform-dependent inode size. - DockerRenderOptions.format type extended; existing buildDockerRunArgs is unchanged because it forwards the string verbatim. Tests: - renderLocal forwards `format: "png-sequence"` to createRenderJob. - buildDockerRunArgs propagates `--format png-sequence` to the container. Docs: - Rendering guide: format flag table, format comparison table, new "PNG sequence (no encoding)" section, "How it works" extended. - CLI package docs: format flag table updated.
This commit is contained in:
@@ -181,6 +181,17 @@ describe("buildDockerRunArgs", () => {
|
||||
expect(args).toContain("compositions/intro.html");
|
||||
});
|
||||
|
||||
it("forwards --format png-sequence to the container", () => {
|
||||
const args = buildDockerRunArgs({
|
||||
...FIXED_INPUT,
|
||||
outputFilename: "frames",
|
||||
options: { ...BASE, format: "png-sequence" },
|
||||
});
|
||||
const formatIdx = args.indexOf("--format");
|
||||
expect(formatIdx).toBeGreaterThanOrEqual(0);
|
||||
expect(args[formatIdx + 1]).toBe("png-sequence");
|
||||
});
|
||||
|
||||
it("forwards --video-bitrate to the container when set", () => {
|
||||
const args = buildDockerRunArgs({
|
||||
...FIXED_INPUT,
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface DockerRunArgsInput {
|
||||
export interface DockerRenderOptions {
|
||||
fps: 24 | 30 | 60;
|
||||
quality: "draft" | "standard" | "high";
|
||||
format: "mp4" | "webm" | "mov";
|
||||
format: "mp4" | "webm" | "mov" | "png-sequence";
|
||||
workers?: number;
|
||||
gpu: boolean;
|
||||
browserGpu: boolean;
|
||||
|
||||
Reference in New Issue
Block a user