A low-latency Android client for Sunshine and Apollo, built on top of Artemide (DerFlacco's latency-focused fork of Artemis, itself a fork of Moonlight).
Perigee is the point in the Moon's orbit where it is closest to Earth — the name follows the moon-themed lineage (Moonlight → Artemis → Artemide) and the goal of keeping the stream as close to the host as possible.
Perigee tracks Artemide's Artemide_Experimental_Async branch and adds the changes listed below.
Everything Artemis and Artemide already offer (custom resolutions and bitrates, virtual display and
clipboard sync with Apollo, MediaTek RFI and low-latency decoder keys, Prefer Lower Delays / LFR,
async decoding, FSR upscaling, and so on) is unchanged.
Developed and measured on a TCL G08 (MediaTek mt5896, Android 14). All of these are gated to MediaTek TV hardware and are no-ops elsewhere.
- Wi-Fi Direct latency workaround (Settings → on by default). Some MediaTek TVs keep a
background Wi-Fi Direct listen running; the radio leaves the router channel for it every
~1.15 s, causing an 80–100 ms gap on 5 GHz and a visible stutter plus an IDR request each time.
Perigee calls
WifiP2pManager.stopListening()at stream start. On the test TV the periodic ~52 spikes/minute went to zero over a 3-minute run (max RTT 19 ms). Side effect: the TV may not show up for Miracast discovery until it is used again. - TCL Game picture mode while streaming (on by default). Switches the TV to its Game picture mode through TCL's own display service when a stream starts and restores it when the last stream ends. No root, permissions or settings writes; a persisted marker restores the mode after a crash.
- MediaTek TV decoder preset. For mt5896 the first decoder configuration uses only vendor keys
that exist in the TV's codec and sets the operating rate from the stream frame rate instead of
Short.MAX_VALUE. The existing Artemide presets remain as fallbacks. - Wi-Fi HAL low-latency request. Asks the AIDL Wi-Fi HAL for low-latency mode at stream start (Android only does this when the chip advertises support). Best-effort; failures are logged and ignored.
- ADPF hint session. Reports real per-frame work (render time plus measured decode time,
excluding deliberate pacing sleeps) to
PerformanceHintManageron Android 12+, so the CPU governor can scale for the renderer and Choreographer threads. Best-effort and a no-op where the vendor HAL refuses a session. - Live display-rate tracking. The renderer used to sample the display refresh rate once at stream start. Perigee follows the display that actually hosts the stream and resets pacing when its rate changes, such as when a USB-C monitor is attached or removed (120 Hz ↔ 60 Hz) or the window moves between displays. This avoids beat patterns from stale pacing.
- High refresh rate pinning. For streams above 60 FPS the window keeps an explicit high-refresh mode request, so devices that report 120 Hz during setup and then drop to 60 Hz once rendering starts (or bounce during an HDR codec restart) stay at the high rate.
- SDR window with direct HDR playback. With direct
SurfaceViewplayback the HDR video is composed as its own layer, so the activity window is no longer forced into HDR mode on every format change. The GL upscaler path keeps the existing behavior.
- ADPF submission hints (Settings → ADPF submission hints (Experimental), off by default). For Pixel 9a with the Google AV1 decoder, replaces the rendering hints with measured app-side submission hints and includes the app-owned codec worker thread in Balanced mode. Measured submission time dropped, but no end-to-end decode latency gain has been demonstrated yet.
- Build-time experiments (off in release builds): AV1 operating-rate hint
(
-Pav1OperatingRateExperiment=true) and payload-sized AV1 block input (-Pav1BlockInputExperiment=true).
The published (perf) build strips app logging, android.util.Log, trace sections and native
logging at compile time, so a release stream does no log formatting or tracing work. The
perfDebug build type is a separate, debuggable package with logging kept.
- GitHub Releases. Use the
nonRoot_gameAPK for your device ABI (arm64-v8afor most phones,armeabi-v7afor most Android TVs). - Obtainium
Perigee installs as its own package (io.github.xtmartinez.perigee), so it can sit next to
Moonlight, Artemis or Artemide. Hosts must be paired again in Perigee.
- Install the Android SDK and NDK
27.0.12077973(the version pinned inapp/build.gradle). git submodule update --init --recursive- Create
local.propertieswithndk.dir=/path/to/ndk/27.0.12077973. ./gradlew assembleNonRoot_gamePerf
To sign with your own key, copy keystore.properties.example to keystore.properties and fill
it in. Without it, the perf build is signed with your local debug key.
- DerFlacco: Artemide, MediaTek decoder latency work, LFR, async decoding and FSR.
- ClassicOldSong: Artemis / Moonlight Noir and Apollo.
- The Moonlight authors: Cameron Gutman, Diego Waxemberg, Aaron Neyer, Andrew Hennessy.
Licensed under the GPLv3, like Moonlight. See LICENSE.txt.