Airtunes emulator! Shairport is no longer maintained.
C Shell Other
Latest commit d65b8e8 Dec 9, 2014 @abrasive Mark as unmaintained.
Permalink
Failed to load latest commit information.
scripts Merge pull request #4 from abrasive/master Jul 2, 2014
.gitignore Build in version number at compile time. Jul 1, 2014
LICENSES Add a new mDNS backend based on tinysvcmdns Oct 21, 2013
Makefile Build in version number at compile time. Jul 1, 2014
README.md Mark as unmaintained. Dec 9, 2014
TODO TODO updates (nearly there!) Jun 20, 2013
alac.c player: avoid leaking memory Apr 1, 2013
alac.h player: avoid leaking memory Apr 1, 2013
audio.c whitespace cleanups Oct 21, 2013
audio.h audio: output selection functionality Apr 1, 2013
audio_alsa.c whitespace cleanups Oct 21, 2013
audio_ao.c audio_ao, audio_pulse: make usage indent consistent Jun 20, 2013
audio_dummy.c audio: update usage messages Jun 19, 2013
audio_pipe.c audio_pipe: don't use the name 'wait' Jun 25, 2014
audio_pulse.c remove unused variable Oct 22, 2013
audio_sndio.c typo Sep 5, 2013
common.c Clean up compile warnings and default to -Wall. Jun 24, 2014
common.h Metadata: use FIFO for output. Jul 1, 2014
configure Honour CC, CFLAGS and LDFLAGS in configure script. Jun 14, 2014
daemon.c Clean up compile warnings and default to -Wall. Jun 24, 2014
daemon.h In daemon mode, send error messages to parent to write them on stderr. Jun 21, 2013
getopt_long.c getopt_long: neater errors Jun 19, 2013
getopt_long.h add getopt_long implementation and detection Jun 19, 2013
mdns.c Add a new mDNS backend which uses mDNSResponder Oct 21, 2013
mdns.h Requesting progress and metadata in MDNS announcement. Jul 1, 2014
mdns_avahi.c Add a command-line option to force the mDNS backend Oct 21, 2013
mdns_dns_sd.c dns_sd: don't require C99 Oct 21, 2013
mdns_external.c mdns_external: move failure messages to debug level Jul 1, 2014
mdns_tinysvcmdns.c tinysvcmdns: Only append .local suffix if missing. Aug 6, 2014
metadata.c metadata: fix compile warnings Jul 1, 2014
metadata.h Metadata: use FIFO for output. Jul 1, 2014
player.c Metadata: use FIFO for output. Jul 1, 2014
player.h Improved metadata output. Jul 1, 2014
rtp.c rtp/rtsp: report control port so we actually get resent packets Jan 24, 2014
rtp.h fix IPv6 support Apr 2, 2013
rtsp.c Lowercase characters for md5 calculation of authentication digest Jul 11, 2014
rtsp.h Refactor and rewrite. Apr 1, 2013
shairport.c metadata: fix compile warnings Jul 1, 2014
tinysvcmdns.c tinysvcmdns: don't spin violently on shutdown Jan 21, 2014
tinysvcmdns.h whitespace cleanups Oct 21, 2013

README.md

ShairPort is no longer maintained

As I no longer use Shairport myself, I am no longer maintaining or supporting Shairport. Thanks to everyone who has contributed over the years; it's been a great experience. For the ongoing user, there are a great many forks and ports to choose from now, many of which are of a very high quality and well maintained.

— James

ShairPort

By James Laird (announcement)

What it is

This program emulates an AirPort Express for the purpose of streaming music from iTunes and compatible iPods and iPhones. It implements a server for the Apple RAOP protocol. ShairPort does not support AirPlay v2 (video and photo streaming).

Build Requirements

Required:

  • OpenSSL

Optionally:

  • libao
  • PulseAudio
  • avahi

Debian/Raspbian users can get the basics with apt-get install libssl-dev libavahi-client-dev libasound2-dev

Runtime Requirements

You must be running an mDNS (Bonjour) daemon. On a Mac, this will be running already. Otherwise, you must be running avahi-daemon or Howl. As an alternative, you may use the tinysvcmdns backend, which embeds a lightweight mDNS daemon. It is, however, way less robust than bonjour or avahi. Check the [mDNS Backends] section for more information.

How to get started

./configure
make
./shairport -a 'My Shairport Name'

The triangle-in-rectangle AirTunes (now AirPlay) logo will appear in the iTunes status bar of any machine on the network, or on iPod/iPhone play controls screen. Choose your access point name to start streaming to the ShairPort instance.

Audio Outputs

Shairport supports different audio backends. For a list of available backends and their options, run shairport -h. Note that options are supplied to backends at the end of the commandline, separated by --, for example:

shairport -o ao -- -d mydriver -o setting=thing

mDNS Backends

Shairport uses mDNS to advertise the service. Multiple backends are available to perform the task. For a list of available backends, run shairport -h. The backends prefixed by 'external' rely on external programs that should be present in your path. By default, shairport will try all backends, in the order they are listed by shairport -h, until one works. You can force the use of a specific backend using shairport -m tinysvcmdns for example.

Metadata

The following metadata can be output for the currently playing track:

  • artist
  • title
  • album
  • artwork
  • genre
  • comment

To enable the output of metadata, the -M <directory name> flag must be set to instruct shairport where to save the output. This directory must exist. A fifo named now_playing will be created, and records will be written to it when tracks are changed. The end of a set of metadata is delimited by a zero-length line. Cover filenames are relative to the cover directory. Files are not deleted.

An example::

artist=Arcade Fire
title=City With No Children
album=The Suburbs
artwork=cover-e6450a45ab900815e831434f5ee0499c.jpg
genre=Rock
comment=

Thanks

Big thanks to David Hammerton for releasing an ALAC decoder, which is reproduced here in full. Thanks to everyone who has worked to reverse engineer the RAOP protocol - after finding the keys, everything else was pretty much trivial. Thanks also to Apple for obfuscating the private key in the ROM image, using a scheme that made the deobfuscation code itself stand out like a flare. Thanks to Ten Thousand Free Men and their Families for having a computer and stuff. Thanks to wtbw.

Contributors to version 1.x

Contributors to version 0.x

Known Ports and Tools