diff --git a/docs/configuration.md b/docs/configuration.md index 961e3e66c..030864881 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -2780,6 +2780,40 @@ editing the `conf` file in a text editor. Use the examples as reference. +### amd_max_au_size + +
| Description | ++ Maximum Access Unit (frame) size for rate control, in bits. This is a last-resort + control for capping oversized encoded frames that would otherwise exceed Sunshine's + four-block FEC capacity and be sent without FEC protection. + @note{This option only applies to H.264 and HEVC when using amdvce [encoder](#encoder). + AV1 does not support this option.} + @note{The FEC ceiling depends on the negotiated packet size and [fec_percentage](#fec_percentage), + not the average bitrate or frame rate. The approximate encoded-payload ceiling is + `4 * floor(25500 / (100 + fec_percentage)) * (packet_size - 16) * 8` bits, before + allowing for the short frame header or codec-header replacements. With 20% FEC and + 1024-byte packets, 6400000 bits provides conservative headroom.} + @warning{Setting this unnecessarily low can reduce image quality, especially for + keyframes. Leave it empty unless oversized frames are actually causing FEC to be skipped.} + | +|
| Default | +@code{} + + @endcode | +|
| Example | +@code{} + amd_max_au_size = 6400000 + @endcode | +|
| Description | -- Maximum Access Unit (frame) size for rate control, in bits. When set, the encoder - will cap the maximum encoded frame size. This prevents oversized frames from exceeding - FEC shard limits (DATA_SHARDS_MAX=255), which otherwise causes FEC to be skipped for - those frames. This is especially important for Wi-Fi streaming where packet loss on - large unprotected frames leads to dropped frames and stuttering. - @note{This option only applies to H.264 and HEVC when using amdvce [encoder](#encoder). - AV1 does not support this option.} - @note{Works with all rate control modes (CQP, CBR, VBR). Most beneficial with CQP - where frame sizes are otherwise unbounded.} - @note{Value is in bits. To calculate: (target_bitrate_mbps / fps / 1.2) × 1000000, - where 1.2 accounts for ~20% FEC overhead. Examples: 800000 for ~50 Mbps at 60fps, - 1600000 for ~100 Mbps at 60fps, 400000 for ~50 Mbps at 120fps.} - | -|
| Default | -@code{} - - @endcode | -|
| Example | -@code{} - amd_max_au_size = 800000 - @endcode | -|