Adds explicit validation for `amd_max_au_size` so only unset or values >= -1 are applied, matching FFmpeg/AMF expectations. Updates the web config input bounds and wording to clarify this as a last-resort FEC protection cap (H.264/HEVC only), and refreshes configuration docs with improved sizing guidance. Also expands unit coverage for codec option mapping and config parsing edge cases, including range boundaries.
800000 bits (~97 KB/frame, ~46 Mbps at 60fps) is the correct
recommended value for Wi-Fi streaming, not 6400000.
Added formula for users to calculate based on their bandwidth:
(target_bitrate_mbps / fps / 1.2) * 1000000
where 1.2 accounts for ~20% FEC overhead.
Address review feedback:
- max_au_size is in bits per FFmpeg AMF documentation, not bytes
- AV1 encoder (av1_amf) does not support max_au_size, removed
- Updated UI description, docs, and recommended value accordingly
- FFmpeg default is -1 (disabled), aligned placeholder
Add a new optional AMF encoder parameter `amd_max_au_size` that caps
the maximum encoded frame (Access Unit) size in bytes.
When the AMF encoder (especially under CQP rate control) produces
oversized frames, they can exceed the FEC shard limit
(DATA_SHARDS_MAX=255 per block, max 4 blocks). When this happens,
FEC error correction is skipped for those frames entirely
(stream.cpp line 1373). On Wi-Fi networks, these large unprotected
frames are highly susceptible to packet loss, causing visible
dropped frames, stuttering, and stream instability.
By setting `amd_max_au_size` (e.g. 800000 bytes), the hardware
encoder itself enforces the frame size cap, ensuring every frame
stays within FEC protection limits. This works with all rate
control modes (CQP, CBR, VBR) and all three codecs (H.264, HEVC,
AV1). Disabled by default (0 or empty) to preserve existing
behavior.
Tested on AMD RDNA4 (RX 9070 XT) streaming over 5GHz Wi-Fi with
CQP mode. Setting max_au_size to 800000 eliminated FEC bypass
warnings and significantly improved stream stability.
Introduces backend API endpoints for ViGEmBus status and installation, updates Windows build scripts to handle ViGEmBus versioning and installer download, and integrates ViGEmBus status and installation controls into the web UI. Removes legacy PowerShell scripts for gamepad driver management and related NSIS installer commands.