Skip to content

Dual Format: verify dual-canvas passthrough + fix EB/VOD save-before-launch#28

Merged
Soulhackzlol merged 2 commits into
mainfrom
dual-format-verify-and-vod-eb-fix
Jun 26, 2026
Merged

Dual Format: verify dual-canvas passthrough + fix EB/VOD save-before-launch#28
Soulhackzlol merged 2 commits into
mainfrom
dual-format-verify-and-vod-eb-fix

Conversation

@Soulhackzlol

@Soulhackzlol Soulhackzlol commented Jun 26, 2026

Copy link
Copy Markdown
Owner

What

Two related pieces of work that came out of investigating Twitch Dual Format (vertical video) support, tracked in #27.

1. Dual Format already works — add regression tests (test: commit)

Dual Format sends a horizontal + vertical canvas over one Enhanced Broadcasting RTMP connection. It turned out to need no production code changes: canvas_index lives only in the GetClientConfiguration JSON, and on the wire the vertical canvas is just additional TrackIds that the existing pass_through_multitrack path already forwards bit-faithfully.

Verified in production against real Twitch: landscape ×4 + portrait ×3 tracks received, HEVC vertical primary, multiple delay cuts stable, dashboard reported "Excellent". Also confirmed it composes with VOD audio + EB (separate pass_through_multitrack_audio flag).

New tests in src/h264.rs:

  • select_video_bytes_forwards_dual_canvas_to_twitch
  • select_video_bytes_keeps_horizontal_drops_vertical_for_non_twitch
  • is_primary_video_idr_anchors_dual_format_cuts_to_horizontal_canvas — pins the one invariant (cuts anchor to the horizontal canvas) that a future canvas-aware cut would have to revisit.

Test count bumped 197 → 200 (EN + ES READMEs).

2. Fix EB/VOD save-before-launch footgun (fix: commit)

The "Launch OBS for EB + VOD" button's visibility is driven by the live VOD checkbox, but VOD only takes effect on save — saving is what writes OBS's EnableCustomServerVodTrack gate (user.ini) and flips InstantClone's VOD-track forwarding. Clicking Launch on unsaved state spawned OBS with EB but no VOD, a silent mismatch.

launchObsWithEb() now persists the form first and only launches if the save succeeded; saveDestForm() returns a success boolean for that gate.

Testing

  • cargo test --release → 200 passed, 0 failed
  • cargo fmt --check clean, cargo clippy --release --all-targets clean
  • Dual Format forwarding verified live against Twitch (see above)

Closes #27.

Dual Format (horizontal + vertical canvas over one Enhanced Broadcasting
RTMP connection) already works through the proxy with no code changes:
canvas_index lives only in the GetClientConfiguration JSON, and on the
wire the vertical canvas is just additional TrackIds that the existing
pass_through_multitrack path forwards bit-faithfully. Verified in
production against real Twitch (landscape x4 + portrait x3, HEVC vertical
primary, cuts stable).

Add regression tests pinning the behavior:
- forwards both canvases to Twitch
- keeps horizontal, drops vertical for non-Twitch
- documents that cuts anchor to the horizontal canvas (the one invariant
  a future canvas-aware cut would have to revisit)

Bump test count 197 -> 200 (EN + ES).
The "Launch OBS for EB + VOD" button's visibility is driven by the live
VOD checkbox, but VOD only takes effect on save: saving is what writes
OBS's EnableCustomServerVodTrack gate (user.ini) and flips InstantClone's
VOD-track forwarding. Clicking Launch on unsaved state spawned OBS with
EB but no VOD - a silent mismatch.

launchObsWithEb() now persists the form first and only launches if the
save succeeded; saveDestForm() returns a success boolean for that gate.
@Soulhackzlol
Soulhackzlol force-pushed the dual-format-verify-and-vod-eb-fix branch from 4853210 to 628008e Compare June 26, 2026 13:14
@Soulhackzlol
Soulhackzlol merged commit 8901ae9 into main Jun 26, 2026
4 checks passed
@Soulhackzlol
Soulhackzlol deleted the dual-format-verify-and-vod-eb-fix branch June 26, 2026 13:28
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.

Twitch Dual Format: detect & forward Enhanced Broadcasting dual canvas (vertical)

1 participant