Skip to content

feat(cli): render --prores-profile picks ProRes 4444, hq, 422, lt or proxy for MOV - #6581

Merged
miguel-heygen merged 3 commits into
mainfrom
feat/prores-profile
Oct 27, 2026
Merged

miguel-heygen merged 3 commits into
mainfrom
feat/prores-profile

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What changed

hyperframes render --format mov --prores-profile <4444|hq|422|lt|proxy>. 4444 is the default and unchanged (ProRes 4444, yuva444p10le, alpha). hq, 422, lt and proxy use prores_ks -profile:v 3/2/1/0 with yuv422p10le and no alpha.

  • One table, PRORES_PROFILES in the engine, owns -profile:v, pixel format and whether the profile has alpha. getEncoderPreset takes the profile, and the distributed plan now asks it instead of hard-coding 4444.
  • The profile flows through RenderConfig.proresProfile, the render request (proresProfile), the Docker run args, lambda render and the distributed plan. A plan with a non-default profile locks it in meta/encoder.json, so chunk workers rebuild the same preset. A 4444 plan is byte-identical to before (no new key).
  • An unknown name is refused with the list (4444, hq, 422, lt, proxy), and so is --prores-profile on any format but mov. One validator, validateDeliveryEncoderConfig, for the local and the distributed path.
  • A 422-family render prints one line: ProRes hq has no alpha channel: transparent areas render black. The CLI cannot know before capture whether a film is transparent, so it prints for every 422-family render.

What I measured

  • Real renders on the devbox of a 640x360 transparent fixture, ffprobe of each file: default and 4444 give prores 4444 yuva444p12le; hq gives HQ yuv422p10le; 422 gives Standard yuv422p10le; lt gives LT yuv422p10le; proxy gives Proxy yuv422p10le. A transparent corner pixel in the hq file reads rgb 0,0,0. A 641x361 hq render succeeds (HQ 641x361 yuv422p10le).
  • Refusals on the built CLI: --format mp4 --prores-profile hq and --prores-profile 422hq both exit with a usage error naming the list.
  • Unit tests, 3 runs in a row on the devbox: engine chunkEncoder (109), producer deliveryEncoder + renderConfigValidation + the mov plan test + renderRequest (29), CLI utils and render (1650).
  • fails without the fix: with chunkEncoder.ts from main the four new maps ProRes profile ... to -profile:v tests fail (4 failed, 105 passed).

What I did NOT exercise

  • A real Lambda or Cloud Run render with a 422 profile. The plan locks the profile and the worker rebuilds the preset from it (covered by the mov plan test), but no chunked encode ran.
  • The studio-server render route and the producer HTTP server do not take the option; this PR covers the CLI and the programmatic render request.
  • Playing the 422 files in an editor.

@mintlify

mintlify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Oct 27, 2026, 5:43 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · head 60b56dd1

Blocker: Comments fails (run 40552251160). RAISED comment share: packages/producer/src/services/render/stages/freezePlan.ts is 22.8% (99/434), at the base 22.7% (98/431). The new /** Set only when a MOV plan uses a non-default ProRes profile; … */ on LockedRenderConfig.proresProfile (freezePlan.ts:57) is the line that pushes it up. Cut that line, or move its meaning into the type or name. The plan.ts:976 comment already says why 4444 is omitted.

Scope

I read the whole non-test diff. One table drives every preset site: the local getEncoderPreset, distributed resolveNonMp4EncoderTriple, and renderChunk. The locked plan carries the profile only when it isn't 4444, so existing plan hashes stay the same, and an unset profile falls back to 4444 on the worker. Validation goes through validateDeliveryEncoderConfig on the local path (job.config) and the distributed path, and lambda render and render-batch get the flag through parseDeliveryFlags. requiresEvenDimensions covers only 4:2:0, which matches the 641×361 hq result. The only remaining hard-coded 4444 sites are background-removal and check-ffmpeg.sh, and both should stay 4444. CI and regression were still running when I posted. No prior reviews.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES · 1 blocker · 0 important · 0 nits · head b7d0a8e1

The Comments check is fixed. The 60b56dd1 → b7d0a8e1 delta is just the removed freezePlan.ts line, and Comments is green.

Blocker: required Typecheck fails (CI run 40554893538, job 122369568107). Typecheck on the previous head never finished because that run was cancelled, so this is the first head where it ran.

src/commands/render/plan.test.ts(175,58): error TS2353: ... '"prores-profile"' does not exist in type 'RenderCommandArgs'.
src/commands/render/plan.test.ts(178,58): same

RenderCommandArgs (cli/src/commands/render/plan.ts:70) declares "keyframe-interval", "max-bitrate" and "buffer-size" but not the new flag. The CLI still works at runtime, because citty passes the arg and parseDeliveryFlags reads it. Add "prores-profile"?: string; after "buffer-size"?: string; (plan.ts:90).

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 144 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

Unstable (1)

  • seqplainkeys-none-center-r0-root-z100: tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo false, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE · 0 blocker · 0 important · 0 nits · b7d0a8e1 → 8b425516

✅ Typecheck is fixed: "prores-profile"?: string is now in RenderCommandArgs, and that one line is the whole delta. CI, regression and Windows render are all green on this head.

@miguel-heygen
miguel-heygen added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 957df5c Oct 27, 2026
81 checks passed
@miguel-heygen
miguel-heygen deleted the feat/prores-profile branch October 27, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant