No description
Find a file
Cameron Gutman 3ed3ba6253 Remove separate codec, HDR, and remote bitrate adjustments
We currently scale bitrate based on both remote vs local, SDR vs HDR, and H.264 vs
HEVC vs AV1. This has led to a lot of user confusion wondering why the bitrate
doesn't seem to match their selection in some configurations.

In H.264 local streams, we will currently overshoot the selected bitrate by about
20% due to FEC, while remote streams will be right around the selected bitrate due
to remote-specific FEC bitrate adjustments.

HEVC and AV1 streams (as configured by most clients) basically behave similarly
between local and remote, since the codec bitrate adjustment factor of 75% is nearly
the same as the FEC bitrate adjustment factor of 80%. However, this adjustment was
only performed for SDR streams so local HDR streams would overshoot like H.264.

This change cleans up all this mess by using a single non-codec-specific video
bitrate adjustment for FEC in all cases. It also allows Sunshine to perform the FEC
adjustment on its end if the default FEC value of 20% has been overridden by the
user or if we implement dynamic FEC support in the future.

The net result is HEVC and AV1 SDR streams will only see a tiny bitrate increase,
but HDR and H.264 may see noticable 20% bitrate reductions that may require the
user to adjust their bitrate setting to reach the effective value they got before.
However, the new behavior should be more intuitive for users going forward since
changing codecs, using a VPN, or enabling HDR won't cause significant changes to the
video bitrate.
2023-12-03 20:09:34 -06:00
.github/workflows Add CodeQL scanning 2023-09-12 21:46:46 -05:00
cmake Behavior changes to CMakeLists.txt 2021-04-29 17:40:47 -05:00
enet@bbfe93c248 Update ENet submodule to add ENET_NO_INSTALL option 2023-09-20 20:52:28 -05:00
reedsolomon Fix Clang warnings 2020-12-05 23:20:02 -06:00
src Remove separate codec, HDR, and remote bitrate adjustments 2023-12-03 20:09:34 -06:00
.gitignore Ignore some Visual Studio-generated files 2014-10-25 21:39:17 -07:00
.gitmodules Change to our modified ENet fork 2016-03-06 15:29:02 -08:00
appveyor.yml Disable GCC static analysis in CI until newer GCC is available in AppVeyor 2023-09-15 23:19:10 -05:00
CMakeLists.txt Enable GCC static analysis in CI 2023-09-15 22:41:37 -05:00
LICENSE.txt Add missing license 2017-05-10 10:13:06 -07:00
README.md Update readme with new URL 2018-12-03 21:37:11 -08:00

Moonlight Streaming Core Library

Moonlight-common-c contains the core GameStream client code shared between Moonlight clients, including Moonlight PC, Moonlight Android, Moonlight iOS, and Moonlight Chrome.

If you are implementing your own Moonlight game streaming client that can use a C library, you probably want the code here.

Note to Developers

Moonlight-common-c requires the specific version of ENet that is bundled as a submodule. This version has changes required for IPv6 compatibility and retransmission reliability, among other things. These are breaking API/ABI changes which make Moonlight-common-c incompatible with other versions of the ENet library. Attempting to runtime link to another libenet library will cause your client to crash when connecting to recent versions of GeForce Experience.