Skip to content

Latest commit

 

History

History
194 lines (156 loc) · 9.53 KB

File metadata and controls

194 lines (156 loc) · 9.53 KB

Sunshine Foundation Edition

🌐 Multi-language Support

English 简体中文 Français Deutsch 日本語


A fork based on LizardByte/Sunshine, providing comprehensive documentation support Read the Docs.

Sunshine-Foundation is a self-hosted game stream host for Moonlight. This forked version introduces significant improvements over the original Sunshine, focusing on enhancing the game streaming experience for various streaming terminal devices connected to a Windows host:

🌟 Core Features

  • Full HDR Pipeline Support - Dual-format HDR10 (PQ) + HLG encoding with adaptive metadata, covering a wider range of endpoint devices
  • Virtual Display - Built-in virtual display management, allowing creation and management of virtual displays without additional software
  • Remote Microphone - Supports receiving client microphones, providing high-quality voice passthrough
  • Advanced Control Panel - Intuitive web control interface with real-time monitoring and configuration management
  • Low-Latency Transmission - Optimized encoding processing leveraging the latest hardware capabilities
  • Smart Pairing - Intelligent management of pairing devices with corresponding profiles

🎬 Full HDR Pipeline Architecture

Dual-Format HDR Encoding: HDR10 (PQ) + HLG Parallel Support

Conventional streaming solutions only support HDR10 (PQ) absolute luminance mapping, which requires the client display to precisely match the source EOTF parameters and peak brightness. When the receiving device has insufficient capabilities or mismatched brightness parameters, tone mapping artifacts such as crushed blacks and clipped highlights occur.

Foundation Sunshine introduces HLG (Hybrid Log-Gamma, ITU-R BT.2100) support at the encoding layer. This standard employs relative luminance mapping with the following technical advantages:

  • Scene-Referred Luminance Adaptation: HLG uses a relative luminance curve, allowing the display to automatically perform tone mapping based on its own peak brightness — shadow detail retention on low-brightness devices is significantly superior to PQ
  • Smooth Highlight Roll-Off: HLG's hybrid log-gamma transfer function provides gradual roll-off in highlight regions, avoiding the banding artifacts caused by PQ's hard clipping
  • Native SDR Backward Compatibility: HLG signals can be directly decoded by SDR displays as standard BT.709 content without additional tone mapping

Per-Frame Luminance Analysis and Adaptive Metadata Generation

The encoding pipeline integrates a real-time luminance analysis module on the GPU side, executing the following via Compute Shaders on each frame:

  • Per-Frame MaxFALL / MaxCLL Computation: Real-time calculation of frame-level Maximum Content Light Level (MaxCLL) and Maximum Frame-Average Light Level (MaxFALL), dynamically injected into HEVC/AV1 SEI/OBU metadata
  • Robust Outlier Filtering: Percentile-based truncation strategy to discard extreme luminance pixels (e.g., specular highlights), preventing isolated bright spots from inflating the global luminance reference and causing overall image dimming
  • Inter-Frame Exponential Smoothing: EMA (Exponential Moving Average) filtering applied to luminance statistics across consecutive frames, eliminating brightness flicker caused by abrupt metadata changes during scene transitions

Complete HDR Metadata Passthrough

Supports full passthrough of HDR10 static metadata (Mastering Display Info + Content Light Level), HDR Vivid dynamic metadata, and HLG transfer characteristic identifiers, ensuring that bitstreams output by NVENC / AMF / QSV encoders carry complete color volume and luminance information compliant with the CTA-861 specification, enabling client decoders to accurately reproduce the source HDR intent.

🖥️ Virtual Display Integration (Requires Windows 10 22H2 or newer)

  • Dynamic virtual display creation and destruction
  • Custom resolution and refresh rate support
  • Multi-display configuration management
  • Real-time configuration changes without restarting

Recommended Moonlight Clients

For the best streaming experience (activating set bonuses), it is recommended to use the following optimized Moonlight clients:

🖥️ Windows (X86_64, Arm64), macOS, Linux Clients

Moonlight-PC

📱 Android Clients

Enhanced Edition Moonlight-Android Crown Edition Moonlight-Android

📱 iOS Client

Voidlink Moonlight-iOS

🛠️ Additional Resources

awesome-sunshine

System Requirements

Warning

These tables are continuously updated. Please do not purchase hardware based solely on this information.

Minimum Requirements
Component Requirement
GPU AMD: VCE 1.0 or later, see: obs-amd hardware support
Intel: VAAPI compatible, see: VAAPI hardware support
Nvidia: Graphics card with NVENC support, see: NVENC support matrix
CPU AMD: Ryzen 3 or higher
Intel: Core i3 or higher
RAM 4GB or more
Operating System Windows: 10 22H2+ (Windows Server does not support virtual gamepads)
macOS: 12+
Linux/Debian: 12+ (bookworm)
Linux/Fedora: 39+
Linux/Ubuntu: 22.04+ (jammy)
Network Host: 5GHz, 802.11ac
Client: 5GHz, 802.11ac
4K Recommended Configuration
Component Requirement
GPU AMD: Video Coding Engine 3.1 or later
Intel: HD Graphics 510 or higher
Nvidia: GeForce GTX 1080 or higher models with multiple encoders
CPU AMD: Ryzen 5 or higher
Intel: Core i5 or higher
Network Host: CAT5e Ethernet or better
Client: CAT5e Ethernet or better

Technical Support

Troubleshooting path when encountering issues:

  1. Check the Usage Documentation LizardByte Documentation
  2. Enable detailed log level in settings to find relevant information
  3. Join the QQ group for help
  4. Use two letters!

Issue Feedback Labels:

  • hdr-support - HDR-related issues
  • virtual-display - Virtual display issues
  • config-help - Configuration-related issues

📚 Development Documentation

Join the Community

We welcome everyone to participate in discussions and contribute code! Join QQ Group

Star History

Star History Chart


Sunshine Foundation Edition - Making Game Streaming More Elegant