Convert Figma logo to code with AI

moonlight-stream logomoonlight-qt

GameStream client for PCs (Windows, Mac, Linux, and Steam Link)

10,016
583
10,016
342

Top Related Projects

Gamestream client for embedded systems

GameStream client for Android

GameStream client for iOS/tvOS

Quick Overview

Moonlight is an open-source implementation of NVIDIA's GameStream protocol, allowing you to stream your PC games to various devices, including smartphones, tablets, and other computers. The Moonlight-Qt project provides a Qt-based client for Moonlight, enabling seamless game streaming on a variety of platforms.

Pros

  • Cross-Platform Compatibility: Moonlight-Qt supports multiple operating systems, including Windows, macOS, and Linux, making it accessible to a wide range of users.
  • Low Latency Streaming: The project utilizes NVIDIA's GameStream protocol, which is designed for low-latency game streaming, providing a smooth and responsive gaming experience.
  • Extensive Device Support: Moonlight-Qt can be used on a variety of devices, from desktops and laptops to mobile devices, allowing you to stream your games wherever you are.
  • Open-Source: As an open-source project, Moonlight-Qt benefits from a community of contributors, ensuring ongoing development and improvements.

Cons

  • Requires NVIDIA GPU: Moonlight-Qt is dependent on NVIDIA's GameStream technology, which means it can only be used with NVIDIA-powered PCs.
  • Limited to NVIDIA Devices: While Moonlight-Qt supports a wide range of devices, it is limited to those that can run the NVIDIA GameStream protocol, excluding non-NVIDIA hardware.
  • Potential Compatibility Issues: As an open-source project, Moonlight-Qt may occasionally encounter compatibility issues with certain hardware or software configurations, which can impact the user experience.
  • Reliance on NVIDIA Services: Moonlight-Qt's functionality is dependent on NVIDIA's GameStream services, which could potentially introduce reliability or availability concerns.

Code Examples

N/A (Moonlight-Qt is not a code library)

Getting Started

To get started with Moonlight-Qt, follow these steps:

  1. Ensure that your PC has an NVIDIA GPU and is capable of running the NVIDIA GameStream protocol.
  2. Download the Moonlight-Qt client for your operating system from the official GitHub repository.
  3. Install the Moonlight-Qt client on your target device (e.g., desktop, laptop, or mobile device).
  4. On your NVIDIA-powered PC, install the NVIDIA GeForce Experience software and enable GameStream.
  5. In the Moonlight-Qt client, select "Add PC" and enter the IP address or hostname of your NVIDIA-powered PC.
  6. Follow the on-screen instructions to pair the Moonlight-Qt client with your NVIDIA-powered PC.
  7. Once paired, you can select the games you want to stream and start playing on your target device.

Refer to the Moonlight-Qt documentation for more detailed instructions and troubleshooting tips.

Competitor Comparisons

Gamestream client for embedded systems

Pros of moonlight-embedded

  • Designed for embedded systems and low-power devices, making it more efficient and suitable for a wider range of hardware.
  • Supports a broader range of platforms, including ARM-based devices and various Linux distributions.
  • Provides a more lightweight and streamlined codebase, focusing on core functionality.

Cons of moonlight-embedded

  • May have fewer features and customization options compared to the desktop-focused moonlight-qt.
  • Potentially less user-friendly interface and setup process, as it is targeted more towards developers and advanced users.
  • May have limited support for certain input devices or peripherals compared to the desktop version.

Code Comparison

moonlight-qt (desktop):

void MainWindow::on_actionConnect_triggered()
{
    if (m_client == nullptr) {
        m_client = new NvComputer(this);
        connect(m_client, &NvComputer::stateChanged, this, &MainWindow::computerStateChanged);
        connect(m_client, &NvComputer::hostInfoChanged, this, &MainWindow::hostInfoChanged);
        connect(m_client, &NvComputer::pairStateChanged, this, &MainWindow::pairStateChanged);
    }

    m_client->connectToHost();
}

moonlight-embedded (embedded):

int main(int argc, char *argv[])
{
    // Initialize the Moonlight Embedded library
    if (!ML_Init()) {
        fprintf(stderr, "Failed to initialize Moonlight Embedded\n");
        return 1;
    }

    // Perform the main game streaming loop
    ML_Loop();

    // Cleanup the Moonlight Embedded library
    ML_Cleanup();

    return 0;
}

GameStream client for Android

Pros of moonlight-android

  • Optimized for mobile devices, with a touch-friendly interface and support for mobile-specific features like gamepad input.
  • Includes built-in support for various game streaming services, including NVIDIA GameStream, Steam In-Home Streaming, and more.
  • Provides a more portable and accessible solution for game streaming on the go.

Cons of moonlight-android

  • May have limited functionality or performance compared to the desktop-focused moonlight-qt, especially for advanced features or high-resolution/high-framerate streaming.
  • Potentially more limited in terms of customization and configuration options compared to the desktop version.

Code Comparison

moonlight-qt (desktop):

void MainWindow::on_actionExit_triggered() {
    QApplication::quit();
}

moonlight-android (mobile):

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
        case android.R.id.home:
            finish();
            return true;
        default:
            return super.onOptionsItemSelected(item);
    }
}

GameStream client for iOS/tvOS

Pros of moonlight-stream/moonlight-ios

  • Optimized for iOS devices, providing a native user experience
  • Supports touch-based controls and gestures for a more intuitive interaction
  • Integrates with iOS-specific features like AirPlay and Game Center

Cons of moonlight-stream/moonlight-ios

  • Limited to iOS devices, excluding users on other platforms
  • May have fewer features or customization options compared to the desktop version
  • Potential for compatibility issues with certain iOS versions or devices

Code Comparison

moonlight-stream/moonlight-qt:

void MainWindow::updateConnectionStatus(int status) {
    switch (status) {
    case CONNECTION_STATUS_CONNECTED:
        ui->connectionStatus->setText(tr("Connected"));
        ui->connectionStatus->setStyleSheet("color: green;");
        break;
    case CONNECTION_STATUS_FAILED:
        ui->connectionStatus->setText(tr("Connection Failed"));
        ui->connectionStatus->setStyleSheet("color: red;");
        break;
    case CONNECTION_STATUS_DISCONNECTED:
        ui->connectionStatus->setText(tr("Disconnected"));
        ui->connectionStatus->setStyleSheet("color: gray;");
        break;
    }
}

moonlight-stream/moonlight-ios:

func updateConnectionStatus(_ status: Int32) {
    switch status {
    case Int32(CONNECTION_STATUS_CONNECTED):
        connectionStatusLabel.text = "Connected"
        connectionStatusLabel.textColor = .green
    case Int32(CONNECTION_STATUS_FAILED):
        connectionStatusLabel.text = "Connection Failed"
        connectionStatusLabel.textColor = .red
    case Int32(CONNECTION_STATUS_DISCONNECTED):
        connectionStatusLabel.text = "Disconnected"
        connectionStatusLabel.textColor = .gray
    default:
        break
    }
}

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Moonlight PC

Moonlight PC is an open source PC client for NVIDIA GameStream and Sunshine.

Moonlight also has mobile versions for Android and iOS.

You can follow development on our Discord server and help translate Moonlight into your language on Weblate.

AppVeyor Build Status Downloads Translation Status

Features

  • Hardware accelerated video decoding on Windows, Mac, and Linux
  • H.264, HEVC, and AV1 codec support (AV1 requires Sunshine and a supported host GPU)
  • HDR streaming support
  • 7.1 surround sound audio support
  • 10-point multitouch support (Sunshine only)
  • Gamepad support with force feedback and motion controls for up to 16 players
  • Support for both pointer capture (for games) and direct mouse control (for remote desktop)
  • Support for passing system-wide keyboard shortcuts like Alt+Tab to the host

Downloads

Special Thanks

Hosted By: Cloudsmith

Hosting for Moonlight's Debian and L4T package repositories is graciously provided for free by Cloudsmith.

Building

Windows Build Requirements

  • Qt 5.15 SDK or later. Qt 6 is also supported for x64 and ARM64 builds.
  • Visual Studio 2022 (Community edition is fine)
  • Select MSVC option during Qt installation. MinGW is not supported.
  • 7-Zip (only if building installers for non-development PCs)
  • Graphics Tools (only if running debug builds)
    • Install "Graphics Tools" in the Optional Features page of the Windows Settings app.
    • Alternatively, run dism /online /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0 and reboot.

macOS Build Requirements

  • Qt 6.4 SDK or later
  • Xcode 13 or later
  • create-dmg (only if building DMGs for use on non-development Macs)

Linux/Unix Build Requirements

  • Qt 6 is recommended, but Qt 5.9 or later is also supported (replace qmake6 with qmake when using Qt 5).
  • GCC or Clang
  • FFmpeg 4.0 or later
  • Install the required packages:
    • Debian/Ubuntu:
      • Base Requirements: libegl1-mesa-dev libgl1-mesa-dev libopus-dev libsdl2-dev libsdl2-ttf-dev libssl-dev libavcodec-dev libavformat-dev libswscale-dev libva-dev libvdpau-dev libxkbcommon-dev wayland-protocols libdrm-dev
      • Qt 6 (Recommended): qt6-base-dev qt6-declarative-dev libqt6svg6-dev qml6-module-qtquick-controls qml6-module-qtquick-templates qml6-module-qtquick-layouts qml6-module-qtqml-workerscript qml6-module-qtquick-window qml6-module-qtquick
      • Qt 5: qtbase5-dev qt5-qmake qtdeclarative5-dev qtquickcontrols2-5-dev qml-module-qtquick-controls2 qml-module-qtquick-layouts qml-module-qtquick-window2 qml-module-qtquick2 qtwayland5
    • RedHat/Fedora (RPM Fusion repo required):
      • Base Requirements: openssl-devel SDL2-devel SDL2_ttf-devel ffmpeg-devel libva-devel libvdpau-devel opus-devel pulseaudio-libs-devel alsa-lib-devel libdrm-devel
      • Qt 6 (Recommended): qt6-qtsvg-devel qt6-qtdeclarative-devel
      • Qt 5: qt5-qtsvg-devel qt5-qtquickcontrols2-devel
  • Building the Vulkan renderer requires a libplacebo-dev/libplacebo-devel version of at least v7.349.0 and FFmpeg 6.1 or later.

Steam Link Build Requirements

  • Steam Link SDK cloned on your build system
  • STEAMLINK_SDK_PATH environment variable set to the Steam Link SDK path

Build Setup Steps

  1. Install the latest Qt SDK (and optionally, the Qt Creator IDE) from https://www.qt.io/download
    • You can install Qt via Homebrew on macOS, but you will need to use brew install qt --with-debug to be able to create debug builds of Moonlight.
    • You may also use your Linux distro's package manager for the Qt SDK as long as the packages are Qt 5.9 or later.
    • This step is not required for building on Steam Link, because the Steam Link SDK includes Qt 5.14.
  2. Run git submodule update --init --recursive from within moonlight-qt/
  3. Open the project in Qt Creator or build from qmake on the command line.
    • To build a binary for use on non-development machines, use the scripts in the scripts folder.
      • For Windows builds, use scripts\build-arch.bat and scripts\generate-bundle.bat. Execute these scripts from the root of the repository within a Qt command prompt. Ensure 7-Zip binary directory is on your %PATH%.
      • For macOS builds, use scripts/generate-dmg.sh. Execute this script from the root of the repository and ensure Qt's bin folder is in your $PATH.
      • For Steam Link builds, run scripts/build-steamlink-app.sh from the root of the repository.
    • To build from the command line for development use on macOS or Linux, run qmake6 moonlight-qt.pro then make debug or make release
    • To create an embedded build for a single-purpose device, use qmake6 "CONFIG+=embedded" moonlight-qt.pro and build normally.
      • This build will lack windowed mode, Discord/Help links, and other features that don't make sense on an embedded device.
      • For platforms with poor GPU performance, add "CONFIG+=gpuslow" to prefer direct KMSDRM rendering over GL/Vulkan renderers. Direct KMSDRM rendering can use dedicated YUV/RGB conversion and scaling hardware rather than slower GPU shaders for these operations.

Contribute

  1. Fork us
  2. Write code
  3. Send Pull Requests

Check out our website for project links and information.