fix(producer): wire --crf and --video-bitrate CLI overrides into encoders#372
Open
vanceingalls wants to merge 2 commits intomainfrom
Open
fix(producer): wire --crf and --video-bitrate CLI overrides into encoders#372vanceingalls wants to merge 2 commits intomainfrom
vanceingalls wants to merge 2 commits intomainfrom
Conversation
This was referenced Apr 21, 2026
Collaborator
Author
This was referenced Apr 21, 2026
Open
perf(producer): hdr benchmark harness — --tags filter, peak heap/RSS tracking, bench:hdr script
#382
Open
cc9fde6 to
cdcd0fd
Compare
bc48483 to
57d6459
Compare
cdcd0fd to
f198969
Compare
57d6459 to
9b1f281
Compare
f198969 to
19698fd
Compare
9b1f281 to
9199f7c
Compare
19698fd to
c4b1a1c
Compare
9934545 to
8418f43
Compare
1060004 to
dd57087
Compare
8418f43 to
0922d9a
Compare
vanceingalls
added a commit
that referenced
this pull request
Apr 23, 2026
Programmatic callers can construct RenderConfig directly and bypass the CLI's mutual-exclusivity guard for --crf vs --video-bitrate. Add an orchestrator-level check that logs a warning and explicitly nulls out videoBitrate when crf is also set, so the encoder gets unambiguous inputs and downstream users aren't confused by a quietly-different bitrate than they passed in. Addresses non-blocking review feedback on PR #372.
dd57087 to
9490d71
Compare
vanceingalls
added a commit
that referenced
this pull request
Apr 23, 2026
Programmatic callers can construct RenderConfig directly and bypass the CLI's mutual-exclusivity guard for --crf vs --video-bitrate. Add an orchestrator-level check that logs a warning and explicitly nulls out videoBitrate when crf is also set, so the encoder gets unambiguous inputs and downstream users aren't confused by a quietly-different bitrate than they passed in. Addresses non-blocking review feedback on PR #372.
0922d9a to
c1e9467
Compare
9490d71 to
fd205f3
Compare
c1e9467 to
ebef5d5
Compare
fd205f3 to
658ed49
Compare
ebef5d5 to
3643a05
Compare
658ed49 to
4fd6596
Compare
vanceingalls
added a commit
that referenced
this pull request
Apr 23, 2026
Programmatic callers can construct RenderConfig directly and bypass the CLI's mutual-exclusivity guard for --crf vs --video-bitrate. Add an orchestrator-level check that logs a warning and explicitly nulls out videoBitrate when crf is also set, so the encoder gets unambiguous inputs and downstream users aren't confused by a quietly-different bitrate than they passed in. Addresses non-blocking review feedback on PR #372.
3643a05 to
7468d97
Compare
4fd6596 to
0947ad8
Compare
vanceingalls
added a commit
that referenced
this pull request
Apr 23, 2026
Programmatic callers can construct RenderConfig directly and bypass the CLI's mutual-exclusivity guard for --crf vs --video-bitrate. Add an orchestrator-level check that logs a warning and explicitly nulls out videoBitrate when crf is also set, so the encoder gets unambiguous inputs and downstream users aren't confused by a quietly-different bitrate than they passed in. Addresses non-blocking review feedback on PR #372.
7468d97 to
3196e2c
Compare
b7b30c6 to
504e005
Compare
vanceingalls
added a commit
that referenced
this pull request
Apr 23, 2026
Programmatic callers can construct RenderConfig directly and bypass the CLI's mutual-exclusivity guard for --crf vs --video-bitrate. Add an orchestrator-level check that logs a warning and explicitly nulls out videoBitrate when crf is also set, so the encoder gets unambiguous inputs and downstream users aren't confused by a quietly-different bitrate than they passed in. Addresses non-blocking review feedback on PR #372.
3196e2c to
34926b3
Compare
…ders The CLI flags `--crf` and `--video-bitrate` were defined and parsed in `packages/cli/src/commands/render.ts`, validated for mutual exclusivity, and threaded into `RenderConfig.crf`/`RenderConfig.videoBitrate`, but the values were silently dropped at the encoder spawn sites in `renderOrchestrator.ts`. PR #292 originally wired these through with a `baseEncoderOpts` object using `effectiveQuality`/`effectiveBitrate`; PR #268 rewrote the encode paths and reverted to `preset.quality` only. This change re-introduces the override at the three encoder spawn sites: 1. HDR streaming encoder (rgb48le path) 2. SDR streaming encoder (jpeg/png path) 3. Disk-based encode (encodeFramesFromDir / encodeFramesChunkedConcat) At each site, `quality` defaults to `preset.quality` but is overridden by `job.config.crf` when set, and `bitrate` is set from `job.config.videoBitrate`. Mutual exclusivity is enforced upstream in the CLI, so we do not need to re-check it here. Also fixes the contradictory note in `docs/packages/cli.mdx` that claimed CRF/bitrate were now driven only by `--quality`. The flags table now lists `--crf` and `--video-bitrate` consistent with `docs/guides/rendering.mdx`.
34926b3 to
86e4952
Compare
vanceingalls
added a commit
that referenced
this pull request
Apr 23, 2026
Programmatic callers can construct RenderConfig directly and bypass the CLI's mutual-exclusivity guard for --crf vs --video-bitrate. Add an orchestrator-level check that logs a warning and explicitly nulls out videoBitrate when crf is also set, so the encoder gets unambiguous inputs and downstream users aren't confused by a quietly-different bitrate than they passed in. Addresses non-blocking review feedback on PR #372.
504e005 to
6fd9910
Compare
Programmatic callers can construct RenderConfig directly and bypass the CLI's mutual-exclusivity guard for --crf vs --video-bitrate. Add an orchestrator-level check that logs a warning and explicitly nulls out videoBitrate when crf is also set, so the encoder gets unambiguous inputs and downstream users aren't confused by a quietly-different bitrate than they passed in. Addresses non-blocking review feedback on PR #372.
86e4952 to
e7bae09
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Re-wire the
--crfand--video-bitrateCLI flags through the three encoder spawn sites inrenderOrchestrator.ts. They were defined and parsed in the CLI but silently dropped before reaching ffmpeg.Why
Chunk 10ofplans/hdr-followups.md. PR #292 originally wired these through with abaseEncoderOptsobject usingeffectiveQuality/effectiveBitrate; PR #268 rewrote the encode paths and reverted topreset.qualityonly, accidentally dropping the override. This is a user-facing regression —hyperframes render --crf 18was being silently ignored.What changed
qualitydefaults topreset.qualitybut is overridden byjob.config.crfwhen set, andbitrateis set fromjob.config.videoBitrate. Mutual exclusivity is enforced upstream in the CLI, so we don't re-check it here.docs/packages/cli.mdxthat claimed CRF/bitrate were now driven only by--quality. The flags table now lists--crfand--video-bitrateconsistent withdocs/guides/rendering.mdx.Test plan
hyperframes render --crf 18 ...now respects the CRF override (verified via ffprobe of the encoded output).hyperframes render --hdr ...still works (no behavior change at the default path).hyperframes render --helpshows all flags consistent with the docs.Stack
Chunk 10 of
plans/hdr-followups.md. Independent of all other chunks.