Convert Figma logo to code with AI

moonlight-stream logomoonlight-android

GameStream client for Android

3,935
621
3,935
251

Top Related Projects

VLC for Android, Android TV and ChromeOS

Android Client for Jellyfin

18,228

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.

108,598

Display and control your Android device

1,785

M3U Proxy for Plex DVR and Emby Live TV

Quick Overview

Moonlight-Android is an open-source Android client for NVIDIA GameStream, allowing users to stream games from their PC to Android devices. It leverages the Moonlight streaming technology to provide low-latency, high-quality game streaming over local networks or the internet.

Pros

  • Cross-platform compatibility: Works on a wide range of Android devices, including phones, tablets, and Android TV
  • Low-latency streaming: Utilizes optimized protocols for smooth and responsive gameplay
  • Free and open-source: Continuously improved by the community and transparent in its development
  • Supports various input methods: Compatible with touchscreen controls, gamepads, and keyboard/mouse input

Cons

  • Requires a compatible NVIDIA GPU: Limited to users with NVIDIA graphics cards that support GameStream
  • Network-dependent performance: Streaming quality can be affected by network conditions and bandwidth
  • Setup complexity: Initial configuration may be challenging for less tech-savvy users
  • Limited to games and applications supported by NVIDIA GameStream

Getting Started

To use Moonlight-Android:

  1. Ensure your PC has a compatible NVIDIA GPU and GameStream is enabled in the NVIDIA GeForce Experience software.
  2. Download and install the Moonlight app from the Google Play Store or build it from source.
  3. Launch the app and follow the on-screen instructions to pair with your PC.
  4. Once paired, select your PC from the list of available hosts.
  5. Choose a game or application to stream from the list of available options.
  6. Enjoy streaming your PC games on your Android device!

Note: For optimal performance, ensure both your PC and Android device are connected to a stable, high-speed network.

Competitor Comparisons

VLC for Android, Android TV and ChromeOS

Pros of VLC-Android

  • Versatile media player supporting a wide range of audio and video formats
  • Open-source with a large community and frequent updates
  • Extensive features including network streaming and subtitle support

Cons of VLC-Android

  • Larger app size due to comprehensive codec support
  • More complex user interface for basic playback tasks
  • Higher battery consumption when playing certain video formats

Code Comparison

VLC-Android (Java):

@Override
public void onPlaybackStateChanged(int state) {
    switch (state) {
        case PlaybackStateCompat.STATE_PLAYING:
            mHandler.sendEmptyMessage(SHOW_PROGRESS);
            break;
        case PlaybackStateCompat.STATE_PAUSED:
            mHandler.removeMessages(SHOW_PROGRESS);
            break;
    }
}

Moonlight-Android (Java):

@Override
public void onConnectionStarted() {
    runOnUiThread(new Runnable() {
        @Override
        public void run() {
            Toast.makeText(StreamActivity.this,
                    getResources().getString(R.string.conn_starting),
                    Toast.LENGTH_SHORT).show();
        }
    });
}

While both projects use Java, VLC-Android focuses on media playback state management, whereas Moonlight-Android handles network streaming connections. VLC-Android has a more complex codebase due to its broader feature set, while Moonlight-Android is more specialized for game streaming.

Android Client for Jellyfin

Pros of Jellyfin-android

  • Open-source media server client with a focus on user privacy and control
  • Supports a wide range of media formats and customizable user interface
  • Active community development and regular updates

Cons of Jellyfin-android

  • May require more setup and configuration compared to Moonlight-android
  • Potentially higher resource usage for media transcoding and streaming
  • Limited to Jellyfin server ecosystem, while Moonlight supports various game streaming protocols

Code Comparison

Jellyfin-android (Java):

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_webapp);
    WebView webView = findViewById(R.id.web_view);
    webView.setWebViewClient(new WebViewClient());
}

Moonlight-android (Java):

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_game);
    surfaceView = findViewById(R.id.surfaceView);
    inputCaptureProvider = InputCaptureManager.getInputCaptureProvider(this);
    streamView = findViewById(R.id.streamView);
}

Both repositories use Android's Activity lifecycle methods, but Jellyfin-android focuses on setting up a WebView for its interface, while Moonlight-android initializes components for game streaming and input capture.

18,228

Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS, tvOS and Windows.

Pros of XBMC

  • More comprehensive media center solution with support for various content types
  • Highly customizable with a wide range of add-ons and skins
  • Cross-platform compatibility (Android, Linux, Windows, macOS)

Cons of XBMC

  • Larger codebase and more complex setup compared to Moonlight Android
  • Higher system requirements due to its full-featured nature
  • Steeper learning curve for users and developers

Code Comparison

XBMC (C++):

bool CVideoPlayer::OpenDemuxStream()
{
  if (m_pDemuxer)
  {
    m_pDemuxer->Open(m_item.GetDemuxResource());
    return true;
  }
  return false;
}

Moonlight Android (Java):

public void startConnection(String host, String uniqueId, String uuid, PcCryptoProvider cryptoProvider) {
    if (running) {
        return;
    }
    running = true;
    this.host = host;
    this.cryptoProvider = cryptoProvider;
    // ... (additional code)
}

XBMC focuses on media playback and management, while Moonlight Android is specifically designed for game streaming. XBMC's codebase is more extensive, reflecting its broader functionality, whereas Moonlight Android's code is more focused on network communication and streaming protocols.

108,598

Display and control your Android device

Pros of scrcpy

  • No additional software required on the Android device
  • Works with any Android device, not limited to specific hardware or games
  • Offers lower latency for general device mirroring and control

Cons of scrcpy

  • Lacks game-specific optimizations and features
  • Doesn't support hardware encoding on the Android device
  • No built-in game controller support

Code Comparison

scrcpy uses a client-server architecture, with the server running on the Android device:

static void server_loop(void) {
    for (;;) {
        SDL_Event event;
        while (SDL_PollEvent(&event)) {
            server_handle_event(&event);
        }
    }
}

Moonlight-android focuses on game streaming and uses the NVIDIA GameStream protocol:

public class NvConnection {
    public void startApp(NvApp app, StreamConfiguration config,
                         NvConnectionListener listener) {
        // Start game streaming
    }
}

Both projects are open-source and actively maintained, but they serve different purposes. scrcpy is a general-purpose Android screen mirroring and control tool, while Moonlight-android is specifically designed for game streaming from compatible PCs to Android devices.

1,785

M3U Proxy for Plex DVR and Emby Live TV

Pros of xTeVe

  • Focuses on IPTV and M3U playlist management, offering more specialized features for TV streaming
  • Provides a web-based interface for easier configuration and management
  • Supports multiple output formats, including XMLTV and M3U

Cons of xTeVe

  • Limited to TV streaming and doesn't offer game streaming capabilities
  • May require more setup and configuration compared to Moonlight Android
  • Lacks the ability to stream from a local PC or gaming rig

Code Comparison

xTeVe (Go):

func (config *Config) loadConfig() error {
    var err error
    config.File = getConfigFile()
    err = jsonvfs.LoadJSON(config.File, &config)
    if err != nil {
        return err
    }
    return nil
}

Moonlight Android (Java):

private void startConnection(final String host, final String uniqueId, final String uuid, final boolean pair) {
    new Thread(new Runnable() {
        @Override
        public void run() {
            NvHTTP httpConn;
            String message;
            try {
                httpConn = new NvHTTP(host, uniqueId, null, PlatformBinding.getCryptoProvider(ComputerManagerService.this));
            } catch (IOException e) {
                message = e.getMessage();
                return;
            }
        }
    }).start();
}

While both projects serve different purposes, xTeVe is more focused on IPTV management, while Moonlight Android is designed for game streaming from a PC. The code snippets show xTeVe's configuration loading in Go and Moonlight Android's connection initialization in Java, reflecting their different functionalities and implementation languages.

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 Android

AppVeyor Build Status Translation Status

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

Moonlight for Android will allow you to stream your full collection of games from your Windows PC to your Android device, whether in your own home or over the internet.

Moonlight also has a PC client and iOS/tvOS client.

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

Downloads

Building

  • Install Android Studio and the Android NDK
  • Run ‘git submodule update --init --recursive’ from within moonlight-android/
  • In moonlight-android/, create a file called ‘local.properties’. Add an ‘ndk.dir=’ property to the local.properties file and set it equal to your NDK directory.
  • Build the APK using Android Studio or gradle

Authors

Moonlight is the work of students at Case Western and was started as a project at MHacks.