LizardByte / Sunshine

Self-hosted game stream host for Moonlight.
http://app.lizardbyte.dev/Sunshine/
GNU General Public License v3.0
15.41k stars 743 forks source link

Bump MAX_FEC_BLOCKS to 4 #2787

Open CypherGrue opened 2 days ago

CypherGrue commented 2 days ago

Description

Sunshine implementation arbitrarily limits itself to 3 FEC blocks even though the protocol supports 4. This is fine for typical use cases. However, when dealing with large payloads (low FPS, high bitrate), there is a risk that the resulting packet size exceeds the capability of the error correction code.

This change removes magic constants to make full use of the of the error correcting bandwidth defined by the protocol and supported by Moonlight.

Type of Change

Checklist

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch must be updated before it can be merged. You must also Allow edits from maintainers.

CLAassistant commented 2 days ago

CLA assistant check
All committers have signed the CLA.

cgutman commented 1 day ago

We should something like https://github.com/LizardByte/Sunshine/pull/1466 instead of this. The real problem is that our FEC groups are hardcoded rather than dynamic as they would be in that PR.

The issue is that proper FEC calculation is uncovering our longstanding issues with exhaustion of packet buffers in switches and NICs, so we need some packet pacing changes to support this properly.

radugrecu97 commented 1 day ago

Could someone please approve the workflows? I really need the Windows build, the stutters are driving me crazy.

ns6089 commented 22 hours ago

@cgutman If feedback-based packet pacing is not ready, maybe in the meantime we can hardcode 1GbE pacing? This should resolve most of the local streaming problems without adding significant amount of latency,

cgutman commented 11 hours ago

Yeah, static pacing would probably be enough to unblock https://github.com/LizardByte/Sunshine/pull/1466