All Projects → openairplay → goplay2

openairplay / goplay2

Licence: Apache-2.0 License
Airplay 2 Receiver written in Go

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to goplay2

airplayreceiver
Open source implementation of AirPlay 2 Mirroring / Audio protocol.
Stars: ✭ 84 (-62.16%)
Mutual labels:  apple, airplay, airplay-receiver, airplay2
Airplay Sdk
Airplay Receiver SDK supports Airplay Mirroring and AirPlay Casting to a receiver device.
Stars: ✭ 2,323 (+946.4%)
Mutual labels:  airplay, airplay-receiver
apple airplayer
Make your AirPlay devices as TTS speakers
Stars: ✭ 84 (-62.16%)
Mutual labels:  airplay, homepod-mini
owntone-server
OwnTone is forked-daapd's new name. Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
Stars: ✭ 1,408 (+534.23%)
Mutual labels:  airplay, airplay2
awesome-ios-developer
List of awesome iOS & Swift stuff!!
Stars: ✭ 586 (+163.96%)
Mutual labels:  apple
Geek Blog
基于Vue+Nuxt.js服务器渲染(SSR)搭建的个人博客系统
Stars: ✭ 33 (-85.14%)
Mutual labels:  apple
mac scripts
A collection of scripts used to Manage Mac OS X computers.
Stars: ✭ 38 (-82.88%)
Mutual labels:  apple
Core-NFC-Example
An example project which demonstrate the usage of iOS 11 Core NFC framework.
Stars: ✭ 19 (-91.44%)
Mutual labels:  apple
swift-algorithms-data-structs
📒 Algorithms and Data Structures in Swift. The used approach attempts to fully utilize the Swift Standard Library and Protocol-Oriented paradigm.
Stars: ✭ 42 (-81.08%)
Mutual labels:  apple
X99-Deluxe-II
Files for Asus X99 Deluxe II hackintosh.
Stars: ✭ 17 (-92.34%)
Mutual labels:  apple
drive-mobile
internxt.com
Stars: ✭ 43 (-80.63%)
Mutual labels:  apple
ManuFuzzer
Binary code-coverage fuzzer for macOS, based on libFuzzer and LLVM
Stars: ✭ 118 (-46.85%)
Mutual labels:  apple
FacePorts
Clockology ports of all the watch faces that Apple withholds from certain watch models
Stars: ✭ 27 (-87.84%)
Mutual labels:  apple
Meme-Maker-Mac
Meme Maker open source macOS app made in Swift.
Stars: ✭ 59 (-73.42%)
Mutual labels:  apple
concurrency-kit
🚄 Concurrency abstractions framework for Apple Platforms [Task, Atomic, Lock, Operation, etc.].
Stars: ✭ 17 (-92.34%)
Mutual labels:  apple
react-native-permissions-modal
Awesome & Fully Customizable Permissions Modal for React Native
Stars: ✭ 26 (-88.29%)
Mutual labels:  apple
appleauth-net
AppleAuth.NET is a simple library that facilitates the implementation of "Sign in with Apple" for .NET applications.
Stars: ✭ 23 (-89.64%)
Mutual labels:  apple
WWDC
🌈 𝐖𝐖𝐃𝐂 𝐒𝐞𝐬𝐬𝐢𝐨𝐧 𝐍𝐨𝐭𝐞𝐬 👩🏻‍💻 ✨
Stars: ✭ 31 (-86.04%)
Mutual labels:  apple
notes-app-cli
A command line interface for Notes.app on macOS.
Stars: ✭ 32 (-85.59%)
Mutual labels:  apple
AppleCache
Apple Content Cache Reverse Engineering
Stars: ✭ 82 (-63.06%)
Mutual labels:  apple

Go Play 2

This is a working Airplay 2 Speaker implementation largely inspired by airplay2-receiver
The goal is to have an Opinionated implementation, with only some features but working very well.

Features

Can

  • Play AAC 44100Hz with Apple Music (buffered audio)
  • Play/Pause/Stop/Seek
  • Homekit pairing with iPhone Home App
  • Sync with HomePod mini
  • PTP supported
  • Working on a Rasbperry 1
  • Set Volume
  • Support PulseAudio (and can select sink)

Nexts

  • P1 - Improve multi-room support (audio sync)
  • P2 - Play ALAC
  • P3 - Supports Spotify (RTP over UDP, type 96)
  • P4 - NIC hardware timestamp (linux)

Will not support

  • Windows build
  • Track information
  • Screen, Video, ... (other Airplay Features)
  • Airplay 1
  • NTP

Multi Room accuracy

  • The accuracy is around 1ms of offset between clocks.
  • Need to sync during playing (add silence of skip frames)

How to build ( works on Linux and MacOsX)

  • Clone the repository
git clone https://github.com/openairplay/goplay2.git
  • Build goplay2
go build  

Dependencies

You need to have portaudio-dev, pulseaudio and lib-fdk-aac and go runtime installed to build this program

Ubuntu 21.4 build

sudo apt install golang-go libfdk-aac-dev

Rasbpian (buster)

fdk-aac is not provided by default, you have to change your source.list (as root or using sudo)

echo "deb http://www.deb-multimedia.org buster main non-free" >> /etc/apt/sources.list
apt-get update -oAcquire::AllowInsecureRepositories=true
apt-get install deb-multimedia-keyring -y
apt-get install libfdk-aac-dev

You also need to install go from https://golang.org/dl/ as version 1.16 is not supplied by buster (they only support 1.11)

Mac os build

  • Having xcode properly installed (clang needed)
brew install portaudio fdk-aac go 

Docker image

You can build and run the image to quickly test goplay, though this is experimental right now and comes with caveats.

  • Build the image

The following platforms are supported: linux/amd64, linux/arm64, linux/arm/v7. Other platforms should also build.

You need at least docker 19.06.

To build:

docker buildx build -t you/goplay2 .

This is a multi-architecture image. If you have QEMU/Docker configured, you can target a different platform, or better, use buildctl and buildkit to produce a proper multi-architecture image.

  • Run the container

This image currently does not provide a way to run pulseaudio inside the container itself, and pulseaudio is expected to be available and running on the host for this to work.

On debian variants, this is typically as simple as:

sudo apt-get install pulseaudio
pulseaudio --start

To then run the container

export STATION_NAME="GoplaySpeaker"

mkdir -p "$(pwd)/$STATION_NAME"

docker run \
	--rm \
	--name goplay \
	--volume "$(pwd)/$STATION_NAME":/opt/"$STATION_NAME" \
	--volume /run/user/1000/pulse/native:/pulse \
	--env PULSE_SERVER=/pulse \
	--net host \
	--cap-drop=ALL \
	--cap-add=NET_BIND_SERVICE \
	--read-only \
	you/goplay2 ./goplay2 -n "$STATION_NAME"

Note that mDNS by design will only work with networking mode "host" (recommended for beginners) or (mac/ip)vlan.

Acknowledgments

Run

  • goplay2 by default run only on the ipv4 interface (because this issue on ipv6 parsing)

Linux

  • goplay2 should not be run as root to use pulseaudio server
  • goplay2 need to have special privileges to open PTP port (319,320)

to allow goplay2 to open port below 1024 you need to run

setcap 'cap_net_bind_service=+ep' ./goplay2 

nb: should be re-run every time you build goplay2

Parameters

delay (ms) is subtracted from the local "clock"
Ex: It takes around 60ms on my mac to launch the audio stream at the Anchor Time

i (interface) used to listen (by default eth0)

n (name) used as accessory name (Bonjour)

sink (pulse audio sink name) to replace default sink

Example :

./goplay2 -sink alsa_output -i en0 -n aiwa

By AlbanSeurat

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].