Skip to content

fix(videoenc): replace "auto" profile with "none" default and expand codec profile enum - #569

Merged
srperens merged 3 commits into
mainfrom
fix/videoenc-profile-none
May 13, 2026
Merged

fix(videoenc): replace "auto" profile with "none" default and expand codec profile enum#569
srperens merged 3 commits into
mainfrom
fix/videoenc-profile-none

Conversation

@srperens

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the profile property's "auto" value (a hidden WebRTC-compatibility mapping baked into a codec property) with "none" as the new default. "none" omits the profile= field from the encoder's output capsfilter so the encoder negotiates freely with downstream — the right behavior for SRT/MPEG-TS muxers and for hardware encoders (NVENC, VA-API) that won't reconfigure to match a pinned profile.
  • Expands the enum to cover the codec profiles GStreamer encoders actually produce: H.264 adds high-4:2:2 and high-4:4:4; H.265 adds main-10, main-12, main-422-10/12, main-444/-10/-12, main-still-picture.
  • Property values verified against gst-inspect-1.0 for x264enc, x265enc, nvh264enc, nvh265enc.
  • WHEP/WebRTC pipelines now need to explicitly pick baseline (H.264) or main (H.265) — both are still in the enum.

Test plan

  • cargo test --lib blocks::builtin::videoenc::tests::test_get_codec_caps_string
  • cargo test --test openapi_test
  • Verify in UI that the Profile dropdown shows the new options and that none is the pre-selected default for new VideoEncoder blocks
  • Run a SRT/MPEG-TS output pipeline with default settings (profile=none) and confirm encoder negotiates correctly
  • Run a WHEP output pipeline with profile=baseline (H.264) and profile=main (H.265) and confirm the SDP/decoder still works on Chrome/Safari

🤖 Generated with Claude Code

srperens and others added 3 commits May 13, 2026 10:41
…codec profile enum

The "profile" property previously had an "auto" value that mapped to
H.264 baseline / H.265 main — a WebRTC-compatibility choice baked into
a codec property. That mixed protocol concerns into the codec layer and
left users guessing whether "auto" would adapt to their downstream (it
did not — it was hardcoded).

Replace with "none" (new default) which omits the profile field from
the capsfilter, letting the encoder negotiate freely with downstream.
This is the right default for SRT/MPEG-TS muxers and for hardware
encoders (NVENC, VA-API) that won't reconfigure to match a pinned
profile. WHEP/WebRTC pipelines now explicitly pick "baseline" / "main".

Expand the enum to cover the codec profiles GStreamer encoders actually
produce: H.264 adds high-4:2:2 and high-4:4:4; H.265 adds main-10,
main-12, main-422-10/12, main-444/-10/-12, main-still-picture.

Verified accepted values via gst-inspect-1.0 on x264enc, x265enc,
nvh264enc and nvh265enc.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…fault

Introduce a typed Profile enum in strom-types as the single source of
truth for the videoenc block's profile property. The enum drives the
GStreamer caps string, the BlockDefinition's EnumValue list, the default
value, and the UI label — so renaming or extending profiles only
requires editing one place.

The backend parser parse_profile() follows the same shape as the
existing parse_encoder_preference / parse_rate_control helpers:
unknown or missing values silently fall back to Profile::default()
(Profile::None) and log a warn. This means stray "auto" values in
saved flows.json (from the brief 0.5.0 window when "auto" was the
default) are normalised on load — no migration required, no invalid
strings ever reach a capsfilter.

Per project rule, shared/API-visible enum values live in strom-types
rather than the backend.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@srperens
srperens merged commit d13af21 into main May 13, 2026
7 checks passed
@srperens
srperens deleted the fix/videoenc-profile-none branch May 13, 2026 09:30
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