Skip to content

About

No description, website, or topics provided.

Resources

Stars

412 stars

Watchers

3 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  ViewCount

Demo

Features

  • AirPlay audio and screen mirroring (FairPlay decrypt)
  • HLS video playback
  • Volume control
  • Two native playback backends: GStreamer and FFmpeg (ffplay)
  • Optional session dump (protocol + decrypted media) for debugging
  • 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 without a camera or screen capture. AAC audiotest is sent on the legacy FairPlay path; HAP/DataStream sessions are video-only today

Quick start

From source

git clone https://github.com/serezhka/java-airplay.git
cd java-airplay
./gradlew :app:gstreamer:bootRun

FFmpeg backend: ./gradlew :app:ffmpeg:bootRun.
./gradlew bootJar builds both fat jars.

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

On the phone, tablet, or Mac, 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). 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: videotest|screencapture|none  /  audiotest|none
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 and FFmpeg are separate apps. Install the native stack 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

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

Related projects

This monorepo unites the former:

License

MIT

About

No description, website, or topics provided.

Resources

Stars

412 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages