Windows hardware encoding (nightly 377): slow start, hang when sharing, blocky stream — turned off again #888

Open
opened 2026-11-18 09:01:22 +00:00 by charles · 1 comment
Owner

Reported by Charles, 2026-11-18, on nightly 2026.1118.377 (the first build with fluxer-voice/mf-encoder on, PR #873):

  • "Windows cannot stream anymore, everything kinda hangs"
  • "Windows client seems very slow to start and the stream is very blocky for some reason"

Action taken. The feature is turned off again in Windows builds (client manifest and xtask package), as agreed when it was turned on. #229 stays open.

To find out before it is turned on again (needs a real Windows machine, or the tester's log from 377 — flaxative.exe --debug-info and the newest log file):

  1. Slow start. What runs at startup with the feature on: DXGI adapter enumeration, MFTEnum2, the wgpu DirectX 12 adapter query for discrete/integrated, the codec probe listing H.264 as hardware. None of it may block the UI thread or delay the window; probe lazily or on a background thread, with a time bound.
  2. Hang when a share starts. crate::gpu::install_order is called inline in the publish path before the spawn_blocking plan; the self-test opens encoders (bounded at 1.5 s per transform and resolution class, but several transforms × classes add up); a hardware MFT may need a D3D device manager / async MFT event handling (METransformNeedInput/HaveOutput) rather than the synchronous ProcessInput/ProcessOutput loop; COM apartment and MFStartup on the calling thread.
  3. Blocky picture. Rate control and quality settings actually applied (CODECAPI_AVEncCommonRateControlMode, mean bitrate, AVEncCommonQuality, low-latency mode, GOP), whether the bitrate unit is right (bits vs kbit), whether the encoder was given the full target bitrate or a start-up value, B-frames off, and whether the self-test's "total size within a wide margin of the bitrate" check is too wide to notice.
  4. The self-test passed on something that then looked wrong: per the PR's own checklist that is the most important case — the validator needs a quality check (PSNR of the decoded pattern at the target bitrate), not only "decodes to the pattern within a mean difference of 12".
**Reported by Charles, 2026-11-18, on nightly 2026.1118.377** (the first build with `fluxer-voice/mf-encoder` on, PR #873): - "Windows cannot stream anymore, everything kinda hangs" - "Windows client seems very slow to start and the stream is very blocky for some reason" **Action taken.** The feature is turned off again in Windows builds (client manifest and `xtask package`), as agreed when it was turned on. #229 stays open. **To find out before it is turned on again** (needs a real Windows machine, or the tester's log from 377 — `flaxative.exe --debug-info` and the newest log file): 1. **Slow start.** What runs at startup with the feature on: DXGI adapter enumeration, `MFTEnum2`, the wgpu DirectX 12 adapter query for discrete/integrated, the codec probe listing H.264 as hardware. None of it may block the UI thread or delay the window; probe lazily or on a background thread, with a time bound. 2. **Hang when a share starts.** `crate::gpu::install_order` is called inline in the publish path before the `spawn_blocking` plan; the self-test opens encoders (bounded at 1.5 s per transform and resolution class, but several transforms × classes add up); a hardware MFT may need a D3D device manager / async MFT event handling (`METransformNeedInput`/`HaveOutput`) rather than the synchronous `ProcessInput`/`ProcessOutput` loop; COM apartment and `MFStartup` on the calling thread. 3. **Blocky picture.** Rate control and quality settings actually applied (`CODECAPI_AVEncCommonRateControlMode`, mean bitrate, `AVEncCommonQuality`, low-latency mode, GOP), whether the bitrate unit is right (bits vs kbit), whether the encoder was given the full target bitrate or a start-up value, B-frames off, and whether the self-test's "total size within a wide margin of the bitrate" check is too wide to notice. 4. The self-test passed on something that then looked wrong: per the PR's own checklist that is the most important case — the validator needs a quality check (PSNR of the decoded pattern at the target bitrate), not only "decodes to the pattern within a mean difference of 12".
Author
Owner

Nightly 2026.1118.383 is built with the Windows hardware encoder off again (commit d01fcb1). Nightlies 377 and 379 have it on. This issue stays open for the diagnosis; #229 for turning it back on.

Nightly 2026.1118.383 is built with the Windows hardware encoder off again (commit d01fcb1). Nightlies 377 and 379 have it on. This issue stays open for the diagnosis; #229 for turning it back on.
charles referenced this issue from a commit 2026-11-18 22:34:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#888
No description provided.