MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / buildRenderConfig

Function buildRenderConfig

packages/cli/src/commands/cloudrun.ts:774–794  ·  view source on GitHub ↗

* Build the serializable render config from CLI flags. `variables` is resolved * separately (it differs per batch entry). Mirrors the local `hyperframes * render` flag surface so the two stay consistent.

(
  args: Record<string, unknown>,
  fps: number,
  width: number,
  height: number,
  variables: Record<string, unknown> | undefined,
)

Source from the content-addressed store, hash-verified

772 * render` flag surface so the two stay consistent.
773 */
774function buildRenderConfig(
775 args: Record<string, unknown>,
776 fps: number,
777 width: number,
778 height: number,
779 variables: Record<string, unknown> | undefined,
780): Record<string, unknown> {
781 return stripUndefined({
782 fps,
783 width,
784 height,
785 format: parseFormat(args.format),
786 codec: parseCodec(args.codec),
787 quality: parseQuality(args.quality),
788 chunkSize: parsePositiveInt(args["chunk-size"], "--chunk-size"),
789 maxParallelChunks: parsePositiveInt(args["max-parallel-chunks"], "--max-parallel-chunks"),
790 targetChunkFrames: parsePositiveInt(args["target-chunk-frames"], "--target-chunk-frames"),
791 outputResolution: parseOutputResolution(args["output-resolution"]),
792 variables,
793 });
794}
795
796/**
797 * Resolve --variables / --variables-file via the shared CLI parser (the same

Callers 2

runRenderFunction · 0.85
runRenderBatchFunction · 0.85

Calls 6

stripUndefinedFunction · 0.70
parseFormatFunction · 0.70
parseCodecFunction · 0.70
parseQualityFunction · 0.70
parsePositiveIntFunction · 0.70
parseOutputResolutionFunction · 0.70

Tested by

no test coverage detected