Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

AirPlay 2 receiver - python implementation only for testing

NotificationsYou must be signed in to change notification settings

ckdo/airplay2-receiver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Very quick python implementation of AP2 protocol usingminimalmulti-room features. For now it implements:

  • HomeKit transient pairing (SRP/Curve25519/ChaCha20-Poly1305)
  • FairPlay (v3) authentication
  • Receiving of both REALTIME and BUFFERED Airplay2 audio streams
  • Airplay2 Service publication
  • Decoding of ALAC/44100/2 or AAC/44100/2

For now it does not implement:

  • MFi Authentication / FairPlay v2 (one of them is required by iTunes/Windows)
  • Audio Sync

This code is experimental. This receiver do not expect to be a real receiver but a toolbox for learning/debugging all airplay protocols and related pairing/authentication methods.

Latest additions:

  • Implement RTP buffer (manage FLUSHBUFFERED) : play/pause/timeline/playlist

Next steps:

  • PTP (Precision Time Protocol)
  • Remove all os specific code (Soft Volume management)
  • Sender (branch-sender) - Implementation
  • Implement RSA Authentication
  • Raspbian package
  • DACP/(+MRP?) Support
  • FairPlay v2 Support

Raspberry Pi 4

Install docker and then build the image:

docker build -f docker/Dockerfile -t invano/ap2-receiver.

To run the receiver:

docker run -it --rm --device /dev/snd --net host invano/ap2-receiver

Default network device is wlan0, you can change this with AP2IFACE env variable:

docker run -it --rm --device /dev/snd --env AP2IFACE=eth0 --net host invano/ap2-receiver

macOS Catalina

To run the receiver please use Python 3 and do the following:

  • Run the following commands
brew install python3brew install portaudiovirtualenv -p /usr/local/bin/python3 protosource proto/bin/activatepip install -r requirements.txtpip install --global-option=build_ext --global-option="-I/usr/local/Cellar/portaudio/19.6.0/include" --global-option="-L/usr/local/Cellar/portaudio/19.6.0/lib" pyaudiopython ap2-receiver.py -m myap2 --netiface=en0

Windows

To run the receiver please use Python 3 and do the following:

  • Run the following commands
cd [WHERE_YOU_CLONED_AIRPLAY2_RECEIVER]virtualenv airplay2-receivercd airplay2-receiver.\Scripts\activatepip install -r requirements.txtpip install pipwinpipwin install pyaudiopython ap2-receiver.py -m myap2 -n [YOUR_INTERFACE_GUID] (looks like thisfor instance {02681AC0-AD52-4E15-9BD6-8C6A08C4F836} )
  • the AirPlay 2 receiver is announced asmyap2.

Tested on Python 3.7.5 / macOS 10.15.2 with iPhone X 13.3 and Raspberry Pi 4

Protocol notes

https://emanuelecozzi.net/docs/airplay2

About

AirPlay 2 receiver - python implementation only for testing

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python98.5%
  • Other1.5%

[8]ページ先頭

©2009-2025 Movatter.jp