Open-source AirPlay server in Java — receive audio, screen mirroring, and HLS video, and cast a local stream to other AirPlay devices.
- 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)
- 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
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:bootJarDownload 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}.jarOr 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)
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=60GStreamer, FFmpeg, and MSE are separate apps. Install the runtime that matches the jar
or bootRun task you start
Install: GStreamer documentation · Downloads
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
Uses ffplay on PATH.
Install: FFmpeg download
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.
Set dump.enabled=true to record beside the live player under
dumps/<timestamp>_<sessionId>/:
protocol/— RTSP/HTTP capturesmedia/— decrypted.h264/ remuxed.mp4, audio.caf/.aacextras/— HLS playlists, artwork, DMAP metadata when present
If this project helps you, consider a one-time donation 🍷
This monorepo unites the former: