Skip to content

fix(cli): reject confirmed unsupported SDR encoders - #3679

Merged
miga-heygen merged 1 commit into
mainfrom
fix/encoder-preflight-2735
Sep 8, 2026
Merged

miga-heygen merged 1 commit into
mainfrom
fix/encoder-preflight-2735

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

An explicitly SDR MP4 render now stops before loading the producer when FFmpeg confirms that the required H.264 encoder is unavailable.

Why

The preflight catch treated a definitive unsupported-encoder result as an inconclusive probe and continued. That wasted rendering work before the same failure surfaced later.

Related: #2735

How

Distinguish confirmed encoder absence with a typed error. Keep unknown/probe-timeout results advisory. Restrict early rejection to forced SDR: auto and HDR may select HEVC after inspecting source media, so this preflight cannot safely reject those paths.

Test plan

  • Regression failed before the change: unsupported SDR render incorrectly completed.
  • 91 render/FFmpeg tests pass on current main, including unknown probe, auto/HDR, alternate format and VideoToolbox controls.
  • Independent review found no issues; lint, format, Fallow, typechecks and commit hooks pass.
  • No live full encode performed; the regression verifies rejection before producer loading.

Post-Deploy Monitoring & Validation

On the next unsupported forced-SDR render, expect an actionable encoder error before capture begins. Auto/HDR and inconclusive probes retain fallback behavior. Revert this classification if valid supported encoders are rejected.

@miga-heygen miga-heygen 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.

Typed H264EncoderUnavailableError correctly gates early rejection to force-sdr MP4 only, leaving HDR/WebM/PNG paths through. Tests cover all format and mode combinations. — Miga

@miga-heygen
miga-heygen merged commit 63182f6 into main Sep 8, 2026
49 checks passed
@miga-heygen
miga-heygen deleted the fix/encoder-preflight-2735 branch September 8, 2026 18:09
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.

2 participants