Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Summary
Follow-up to #15. When the system has no hardware H.264 Media Foundation Transform (MFT) registered (e.g. broken AMD AMF registration, missing GPU drivers, headless / no-GPU environments), OpenScreen currently fails outright. We should fall back to the Windows software H.264 encoder (mfh264enc.dll) so recording still works — slower, but functional.
Context
See #15 for the root cause analysis. Items 1 and 2 (pre-flight MFT check + better error message) are landing separately. This issue is specifically about the fallback path.
Proposed approach
- After pre-flight enumeration (per [Bug]: Failed to initialize Media Foundation encoder - MP4 recording fails on Windows 10 with AMD GPU (hr=0x80070003) #15), if no hardware H.264 encoder MFT is found, attempt to activate the software H.264 MFT explicitly.
- The software encoder is registered under the same category (MFT_CATEGORY_VIDEO_ENCODER) with a different CLSID and no MF_TRANSFORM_FLAG_HARDWARE attribute. MFTEnumEx returns both.
- Add a config flag (preferSoftwareEncoder: boolean) so users can opt in permanently (e.g. on VMs or broken-driver machines) and so the smoke tests are deterministic.
- If hardware is found but MFCreateSinkWriterFromURL still fails (the [Bug]: Failed to initialize Media Foundation encoder - MP4 recording fails on Windows 10 with AMD GPU (hr=0x80070003) #15 path), retry with the software encoder MFT explicitly selected.
- If software also fails, surface the final clear error from [Bug]: Failed to initialize Media Foundation encoder - MP4 recording fails on Windows 10 with AMD GPU (hr=0x80070003) #15.
Acceptance criteria
- On a system with no working GPU encoder, recording to MP4 still succeeds using the software encoder.
- A new config knob lets users force software encoding.
- A wgc-helper smoke test (
pm run test:wgc-helper:win) covers the software path. - No regression for systems that have a working hardware encoder.
Out of scope
- Pre-flight encoder check and improved error messages — tracked in [Bug]: Failed to initialize Media Foundation encoder - MP4 recording fails on Windows 10 with AMD GPU (hr=0x80070003) #15.
- AAC audio encoder fallback (separate issue if needed).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
fix(wgc-capture): pre-flight H.264 MFT check + actionable error
docs+ci: add public ROADMAP.md, README link, and #🗺️・roadmap auto-post
docs+ci: add public ROADMAP.md, README link, and #🗺️・roadmap auto-post
My-Denia commentedon Jul 6, 2026
PR #73 is now ready for review and available for maintainers and affected users to review/test:
#73
Local validation covered the default WGC helper path and the forced software encoder path.
I still do not have access to a real no-GPU / broken-driver / missing hardware-H.264-MFT environment, so the PR continues to use
Refs #18rather thanFixes #18.fix(wgc-capture): attribute encoder-setup failures to the correct stage
feat(recording): surface automatic software-encoder fallback in the HUD
feat(wgc-capture): fall back to software H.264 encoder
fix(wgc-capture): attribute encoder-setup failures to the correct stage
feat(recording): surface automatic software-encoder fallback in the HUD
docs(roadmap): reconcile the roadmap with what actually shipped
docs(roadmap): reconcile the roadmap with what actually shipped
docs(roadmap): the platform-parity tier described a Windows-only engine
docs(roadmap): the platform-parity tier described a Windows-only engine