Skip to content

Commit

Permalink
README updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fduncanh committed Nov 27, 2021
1 parent 2c88d25 commit 3b51197
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 13 deletions.
10 changes: 6 additions & 4 deletions README.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 id="uxplay-1.42-airplayairplay-mirror-server-for-linux-macos-and-unix.">UxPlay 1.42: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.</h1>
<p>This project is a GPLv3 unix AirPlay server which now also works on macOS. Its main use is to act like an AppleTV for screen-mirroring (with audio) of iOS/macOS clients (iPads, iPhones, MacBooks) in a window on the server display (with the possibility of sharing that window on screen-sharing applications such as Zoom) on a host running Linux, macOS, or other unix, using Apple’s AirPlay Mirror protocol first available in iOS 5. As well as screen mirroring, when not mirroring the screen it can also play Apple Lossless (ALAC) audio streamed from the client using the audio-only Airplay protocol. (Details of what is known about the AirPlay2 protocol can be found <a href="https://github.com/SteeBono/airplayreceiver/wiki/AirPlay2-Protocol">here</a> and <a href="https://emanuelecozzi.net/docs/airplay2">here</a>).</p>
<p>The UxPlay server and its client must be on the same local area network, on which a <strong>Bonjour/Zeroconf mDNS/DNS-SD server</strong> is also running (only DNS-SD “Service Discovery” service is necessary, it is not necessary that the local network also be of the “.local” mDNS-based type). On Linux and BSD Unix servers, this is usually provided by <a href="https://www.avahi.org">Avahi</a>, through the avahi-daemon service, and is included in most Linux distributions (this service can also be provided by macOS, iOS or Windows servers).</p>
<p><em><strong>New:</strong> UxPlay &gt; 1.38 now also supports the Airplay audio-only protocol as well as AirPlay Mirror protocol, and (when the client screen is not being mirrored) can play Apple Lossless (ALAC) 44100/16/2 audio streamed from the client in 2-channel stereo without video (the accompanying cover-art and metadata is received by the server, but not displayed). The initial connection to the client can be in AirPlay audio mode, or an initial Airplay Mirror connection can be switched to Airplay audio by selecting “Stop Mirroring” in the Screen Mirroring setting (or closing the mirror window) and reconnecting in audio-only AirPlay mode (this changes back to 44100/2 “Advanced Audio Coding” (AAC-ELD) compressed (lossy) audio if screen mirroring is (re)started).</em></p>
<p><em><strong>New:</strong> UxPlay &gt; 1.38 now also supports the Airplay audio-only protocol as well as AirPlay Mirror protocol, and (when the client screen is not being mirrored) can play Apple Lossless (ALAC) 44100/16/2 audio streamed from the client in 2-channel stereo without video (the accompanying cover-art and metadata is received by the server, but not displayed). The initial connection to the client can be in AirPlay audio mode, or an initial Airplay Mirror connection can be switched to Airplay audio by selecting “Stop Mirroring” in the Screen Mirroring setting (or closing the mirror window) and reconnecting in audio-only AirPlay mode (the audio stream changes back to “Advanced Audio Coding” (AAC-ELD) compressed (lossy) format if screen mirroring is (re)started).</em></p>
<p>UxPlay is based on https://github.com/FD-/RPiPlay, with GStreamer integration from https://github.com/antimof/UxPlay. (UxPlay only uses GStreamer, and does not contain the alternative Raspberry-Pi-specific audio and video renderers also found in RPiPlay.) Tested on Ubuntu 20.04, Linux Mint 20.2, OpenSUSE 15.3, macOS 10.15, FreeBSD 13.0.</p>
<p>Features: 1. Based on Gstreamer. 2. Video and audio are supported out of the box. 3. Gstreamer decoding is plugin agnostic. Uses accelerated decoders if available. For Intel graphics, VAAPI is preferable, (but don’t use VAAPI with nVidia). 4. Automatic screen orientation.</p>
<h3 id="note-to-packagers-openssl-3.0.0-solves-gpl-v3-license-issues.">Note to packagers: OpenSSL-3.0.0 solves GPL v3 license issues.</h3>
Expand Down Expand Up @@ -44,7 +44,7 @@ <h1 id="building-this-version-macos">Building this version (macOS):</h1>
<p><strong><em>Other ways (Homebrew, MacPorts) to install GStreamer on macOS (not recommended):</em></strong></p>
<p>First make sure that pkgconfig is installed (Homebrew: “brew install pkgconfig” ; MacPorts: “sudo port install pkgconfig” ).</p>
<ol type="a">
<li><p>with Homebrew: “brew install gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav”. This appears to be functionally equivalent to using GStreamer.framework, but causes a large number of extra packages to be installed by Homebrew as dependencies.</p></li>
<li><p>with Homebrew: “brew install gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav”. This appears to be functionally equivalent to using GStreamer.framework, but causes a large number of extra packages to be installed by Homebrew as dependencies. (However, as of November 2021, Homebrew offers a build of GStreamer for Apple Silicon, which then was not yet available on the offical GStreamer site.)</p></li>
<li><p>with MacPorts: “sudo port install gstreamer1-gst-plugins-base gstreamer1-gst-plugins-good gstreamer1-gst-plugins-bad gstreamer1-gst-libav”. The MacPorts GStreamer is built to use X11, so must be run from an XQuartz terminal, can use ZOOMFIX, and needs option “-vs ximagesink”. On an older unibody MacBook Pro, the default resolution wxh = 1920x1080 was too large for the non-retina display, but using option “-s 800x600” worked; However, the GStreamer pipeline is fragile against attempts to change the X11 window size, or to rotations that switch a connected client between portrait and landscape mode while uxplay is running. Using the MacPorts X11 GStreamer is only viable if the image size is left unchanged from the initial “-s wxh” setting (also use the iPad/iPhone setting that locks the screen orientation against switching between portrait and landscape mode as the device is rotated).</p></li>
</ol>
<h1 id="troubleshooting"><strong>Troubleshooting:</strong></h1>
Expand All @@ -57,6 +57,7 @@ <h1 id="troubleshooting"><strong>Troubleshooting:</strong></h1>
<p>As other videosink choices are not affected by ZOOMFIX, they may or may not be visible to screen-sharing apps. Cairo-based windows created on Linux with “-vs gtksink” are visible to screen-sharing aps without ZOOMFIX; windows on macOS created by “-vs glimagesink” (default choice) and “-vs osximagesink” are also visible.</p>
<p>The “OpenGL renderer” window created on Linux by “-vs glimagesink” sometimes does not close properly when its “close” button is clicked. (this is a GStreamer issue). You may need to terminate uxplay with Ctrl-C to close a “zombie” OpenGl window.</p>
<p><strong>GStreamer issues:</strong> To troubleshoot GStreamer execute “export GST_DEBUG=2” to set the GStreamer debug-level environment-variable in the terminal where you will run uxplay, so that you see warning and error messages; (replace “2” by “4” to see much (much) more of what is happening inside GStreamer). Run “gst-inspect-1.0” to see which GStreamer plugins are installed on your system.</p>
<p>Some extra GStreamer packages for special plugins may need to be installed (or reinstalled: a user using a Wayland display system as an alternative to X11 reported that after reinstalling Lubuntu 18.4, UxPlay would not work until gstreamer1.0-x was installed, presumably for Wayland’s X11-compatibility mode). Different distributions may break up GStreamer 1.x into packages in different ways; the packages listed above in the build instructions should bring in other required GStreamer packages as dependencies, but will not install all possible plugins.</p>
<h1 id="usage"><strong>Usage:</strong></h1>
<p>Options:</p>
<p><strong>-n server_name</strong> (Default: UxPlay); server_name@_hostname_ will be the name that appears offering AirPlay services to your iPad, iPhone etc, where <em>hostname</em> is the name of the server running uxplay. This will also now be the name shown above the mirror display (X11) window.</p>
Expand Down Expand Up @@ -106,8 +107,9 @@ <h1 id="disclaimer">Disclaimer</h1>
<p>All the resources in this repository are written using only freely available information from the internet. The code and related resources are meant for educational purposes only. It is the responsibility of the user to make sure all local laws are adhered to.</p>
<p>This project makes use of a third-party GPL library for handling FairPlay. The legal status of that library is unclear. Should you be a representative of Apple and have any objections against the legality of the library and its use in this project, please contact me and I’ll take the appropriate steps.</p>
<p>Given the large number of third-party AirPlay receivers (mostly closed-source) available for purchase, it is my understanding that an open source implementation of the same functionality wouldn’t violate any of Apple’s rights either.</p>
<h1 id="rpiplay-authors-notes-by-florian-draschbacher-rpiplay-creator.">RPiPlay Authors (Notes by Florian Draschbacher, RPiPlay creator.)</h1>
<h1 id="notes-by-florian-draschbacher-rpiplay-creator">Notes by Florian Draschbacher, RPiPlay creator</h1>
<p>(From the https://github.com/FD-/RPiPlay.git repository.)</p>
<h2 id="rpiplay-authors">RPiPlay authors</h2>
<p>The code in this repository accumulated from various sources over time. Here is my (<strong>fdrachbacher</strong>) attempt at listing the various authors and the components they created:</p>
<ul>
<li><strong>dsafa22</strong>: Created an <a href="https://github.com/dsafa22/AirplayServer">AirPlay 2 mirroring server</a>(seems gone now) for Android based on ShairPlay. This project is basically a port of dsafa22’s code to the Raspberry Pi, utilizing OpenMAX and OpenSSL for better performance on the Pi. All code in <code>lib/</code> concerning mirroring is dsafa22’s work. License: GNU LGPLv2.1+</li>
Expand All @@ -117,7 +119,7 @@ <h1 id="rpiplay-authors-notes-by-florian-draschbacher-rpiplay-creator.">RPiPlay
<li><strong>Team XBMC</strong>: Managed to show a black background for OpenMAX video rendering. This code is used in the video renderer. License: GNU GPL</li>
<li><strong>Alex Izvorski and contributors</strong>: Wrote <a href="https://github.com/aizvorski/h264bitstream">h264bitstream</a>, a library for manipulation h264 streams. Used for reducing delay in the Raspberry Pi video pipeline. Located in the <code>renderers/h264-bitstream</code> folder. License: GNU LGPLv2.1</li>
</ul>
<h1 id="airplay-protocol-versions">AirPlay protocol versions</h1>
<h2 id="airplay-protocol-versions">AirPlay protocol versions</h2>
<p>For multiple reasons, it’s very difficult to clearly define the protocol names and versions of the components that make up the AirPlay streaming system. In fact, it seems like the AirPlay version number used for marketing differs from that used in the actual implementation. In order to tidy up this whole mess a bit, I did a little research that I’d like to summarize here:</p>
<p>The very origin of the AirPlay protocol suite was launched as AirTunes sometime around 2004. It allowed to stream audio from iTunes to an AirPort Express station. Internally, the name of the protocol that was used was RAOP, or Remote Audio Output Protocol. It seems already back then, the protocol involved AES encryption. A public key was needed for encrypting the audio sent to an AirPort Express, and the private key was needed for receiving the protocol (ie used in the AirPort Express to decrypt the stream). Already in 2004, the public key was reverse-engineered, so that <a href="http://nanocr.eu/2004/08/11/reversing-airtunes/">third-party sender applications</a> were developed.</p>
<p>Some time <a href="https://weblog.rogueamoeba.com/2008/01/10/a-tour-of-airfoil-3/">around 2008</a>, the protocol was revised and named AirTunes 2. It seems the changes primarily concerned timing. By 2009, the new protocol was <a href="https://git.zx2c4.com/Airtunes2/about/">reverse-engineered and documented</a>.</p>
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ unpack ("unzip libplist-master.zip ; cd libplist-master"), build/install
First make sure that pkgconfig is installed (Homebrew: "brew install pkgconfig" ; MacPorts: "sudo port install pkgconfig" ).

(a) with Homebrew: "brew install gst-plugins-base gst-plugins-good gst-plugins-bad gst-libav". This appears to be functionally equivalent
to using GStreamer.framework, but causes a large number of extra packages to be installed by Homebrew as dependencies.
to using GStreamer.framework, but causes a large number of extra packages to be installed by Homebrew as dependencies. (However, as of November 2021,
Homebrew offers a build of GStreamer for Apple Silicon, which then was not yet available on the offical GStreamer site.)

(b) with MacPorts: "sudo port install gstreamer1-gst-plugins-base gstreamer1-gst-plugins-good gstreamer1-gst-plugins-bad gstreamer1-gst-libav".
The MacPorts GStreamer is built to use X11, so must be run from an XQuartz terminal, can use ZOOMFIX, and needs
Expand Down Expand Up @@ -258,6 +259,11 @@ where you will run uxplay, so that you see warning and error messages;
GStreamer). Run "gst-inspect-1.0" to see which GStreamer plugins are
installed on your system.

Some extra GStreamer packages for special plugins may need to be installed (or reinstalled: a user using a Wayland display system as an alternative to X11
reported that after reinstalling Lubuntu 18.4, UxPlay would not work until gstreamer1.0-x was installed, presumably for Wayland's X11-compatibility mode).
Different distributions may break up GStreamer 1.x into packages in different ways; the packages listed above in the build instructions should bring in
other required GStreamer packages as dependencies, but will not install all possible plugins.

# **Usage:**

Options:
Expand Down Expand Up @@ -470,10 +476,11 @@ This project makes use of a third-party GPL library for handling FairPlay. The l
Given the large number of third-party AirPlay receivers (mostly closed-source) available for purchase, it is my understanding that an open source implementation of the same functionality wouldn't violate any of Apple's rights either.


# RPiPlay Authors (Notes by Florian Draschbacher, RPiPlay creator.)

# Notes by Florian Draschbacher, RPiPlay creator
(From the https://github.com/FD-/RPiPlay.git repository.)

## RPiPlay authors

The code in this repository accumulated from various sources over time. Here
is my (__fdrachbacher__) attempt at listing the various authors and the components they created:

Expand All @@ -484,7 +491,7 @@ is my (__fdrachbacher__) attempt at listing the various authors and the componen
* **Team XBMC**: Managed to show a black background for OpenMAX video rendering. This code is used in the video renderer. License: GNU GPL
* **Alex Izvorski and contributors**: Wrote [h264bitstream](https://github.com/aizvorski/h264bitstream), a library for manipulation h264 streams. Used for reducing delay in the Raspberry Pi video pipeline. Located in the `renderers/h264-bitstream` folder. License: GNU LGPLv2.1

# AirPlay protocol versions
## AirPlay protocol versions

For multiple reasons, it's very difficult to clearly define the protocol names and versions of the components that make up the AirPlay streaming system. In fact, it seems like the AirPlay version number used for marketing differs from that used in the actual implementation. In order to tidy up this whole mess a bit, I did a little research that I'd like to summarize here:

Expand Down
25 changes: 20 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ displayed). The initial connection to the client can be in AirPlay audio
mode, or an initial Airplay Mirror connection can be switched to Airplay
audio by selecting "Stop Mirroring" in the Screen Mirroring setting (or
closing the mirror window) and reconnecting in audio-only AirPlay mode
(this changes back to 44100/2 "Advanced Audio Coding" (AAC-ELD)
compressed (lossy) audio if screen mirroring is (re)started).*
(the audio stream changes back to "Advanced Audio Coding" (AAC-ELD)
compressed (lossy) format if screen mirroring is (re)started).*

UxPlay is based on https://github.com/FD-/RPiPlay, with GStreamer
integration from https://github.com/antimof/UxPlay. (UxPlay only uses
Expand Down Expand Up @@ -238,6 +238,9 @@ pkgconfig" ; MacPorts: "sudo port install pkgconfig" ).
gst-plugins-bad gst-libav". This appears to be functionally
equivalent to using GStreamer.framework, but causes a large number
of extra packages to be installed by Homebrew as dependencies.
(However, as of November 2021, Homebrew offers a build of GStreamer
for Apple Silicon, which then was not yet available on the offical
GStreamer site.)

(b) with MacPorts: "sudo port install gstreamer1-gst-plugins-base
gstreamer1-gst-plugins-good gstreamer1-gst-plugins-bad
Expand Down Expand Up @@ -327,6 +330,15 @@ error messages; (replace "2" by "4" to see much (much) more of what is
happening inside GStreamer). Run "gst-inspect-1.0" to see which
GStreamer plugins are installed on your system.

Some extra GStreamer packages for special plugins may need to be
installed (or reinstalled: a user using a Wayland display system as an
alternative to X11 reported that after reinstalling Lubuntu 18.4, UxPlay
would not work until gstreamer1.0-x was installed, presumably for
Wayland's X11-compatibility mode). Different distributions may break up
GStreamer 1.x into packages in different ways; the packages listed above
in the build instructions should bring in other required GStreamer
packages as dependencies, but will not install all possible plugins.

**Usage:**
==========

Expand Down Expand Up @@ -577,11 +589,14 @@ closed-source) available for purchase, it is my understanding that an
open source implementation of the same functionality wouldn't violate
any of Apple's rights either.

RPiPlay Authors (Notes by Florian Draschbacher, RPiPlay creator.)
=================================================================
Notes by Florian Draschbacher, RPiPlay creator
==============================================

(From the https://github.com/FD-/RPiPlay.git repository.)

RPiPlay authors
---------------

The code in this repository accumulated from various sources over time.
Here is my (**fdrachbacher**) attempt at listing the various authors and
the components they created:
Expand Down Expand Up @@ -611,7 +626,7 @@ the components they created:
`renderers/h264-bitstream` folder. License: GNU LGPLv2.1

AirPlay protocol versions
=========================
-------------------------

For multiple reasons, it's very difficult to clearly define the protocol
names and versions of the components that make up the AirPlay streaming
Expand Down

0 comments on commit 3b51197

Please sign in to comment.