Skip to content

About

Open-source AirPlay receiver for desktop — mirror, audio, HLS. GStreamer / FFmpeg / Chromium MSE jars

Topics

Resources

Stars

418 stars

Watchers

2 watching

Forks

Repository files navigation

Java AirPlay

Open-source AirPlay server in Java — receive audio, screen mirroring, and HLS video, and cast a local stream to other AirPlay devices.

CI  GitHub release  License: MIT  Java  Donate  ViewCount

Features

  • AirPlay audio and screen mirroring (FairPlay decrypt)
  • HLS video playback
  • Three playback backends: GStreamer, FFmpeg (ffplay), and browser MSE (Chromium)
  • System tray with cast picker (discover LAN receivers and send a stream)

Experimental features

  • Cast synthetic test A/V (client.video.src=videotest, client.audio.src=audiotest) to another AirPlay receiver from the tray menu — useful for end-to-end send-path checks

Quick start

From source

git clone https://github.com/serezhka/java-airplay.git
cd java-airplay

# gstreamer
./gradlew :app:gstreamer:bootRun

# ffmpeg
./gradlew :app:ffmpeg:bootRun

# mse
./gradlew :app:mse:bootRun

# builds all fat jars
./gradlew :app:gstreamer:bootJar :app:ffmpeg:bootJar :app:mse:bootJar

Pre-built jar

Download the latest release, then run one backend:

java -jar java-airplay-gstreamer-{version}.jar
java -jar java-airplay-ffmpeg-{version}.jar
java -jar java-airplay-mse-{version}.jar

Or double-click.

On the phone, tablet, or Mac in the same network open Screen Mirroring (or AirPlay from a video app) and pick the advertised name (default: JavaAirPlay)

Configuration

Each fat jar ships its own application.properties (app/gstreamer, app/ffmpeg, app/mse). Override by placing application.properties in the working directory:

# Receiver
airplay.server-name=JavaAirPlay
airplay.width=1920
airplay.height=1080
airplay.fps=60
airplay.hls-enabled=true
airplay.mdns-loopback=false
airplay.tray-enabled=true
# Cast sender (gst/ffmpeg): videotest|screencapture|none  /  audiotest|none
# MSE jar default is none/none (cast off)
client.video.src=videotest
client.audio.src=audiotest
# Dump (optional receive-side sidecar)
dump.enabled=false
dump.directory=dumps
dump.protocol=true
dump.video=true
dump.audio=true
dump.playlist=true
dump.artwork=true
dump.videoFps=60

Playback backends

GStreamer, FFmpeg, and MSE are separate apps. Install the runtime that matches the jar or bootRun task you start

GStreamer

Install: GStreamer documentation · Downloads

Known issues

On Windows 11 with Smart App Control enabled, HLS may fail to decode: the official GStreamer runtime ships unsigned plugin DLLs, and SAC blocks them when Java loads them. There is no per-app allowlist. Mirroring may still work if those plugins are already trusted; for HLS on Windows use the FFmpeg backend, turn SAC off or disable hls with airplay.hls-enabled=false

FFmpeg

Uses ffplay on PATH.

Install: FFmpeg download

MSE (Chromium)

Uses a bundled localhost page (hls.js, jmuxer, WebCodecs) inside a system Chromium class browser — no GStreamer or FFmpeg install required for receive playback.

Install a recent Google Chrome, Chromium, or Microsoft Edge, or set -Dairplay.mse.browser= to the binary path.

Session dump

Set dump.enabled=true to record beside the live player under dumps/<timestamp>_<sessionId>/:

  • protocol/ — RTSP/HTTP captures
  • media/ — decrypted .h264 / remuxed .mp4, audio .caf / .aac
  • extras/ — HLS playlists, artwork, DMAP metadata when present

Support

If this project helps you, consider a one-time donation 🍷

Donate with Stripe

Related projects

This monorepo unites the former:

Old demo

License

MIT

About

Open-source AirPlay receiver for desktop — mirror, audio, HLS. GStreamer / FFmpeg / Chromium MSE jars

Topics

Resources

Stars

418 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages