edit README

This commit is contained in:
fduncanh
2022-04-17 02:56:35 -04:00
parent 532d84af51
commit 01d46e0b10
3 changed files with 64 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
<h1 id="uxplay-1.49-airplayairplay-mirror-server-for-linux-macos-and-unix.">UxPlay 1.49: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.</h1>
<h1 id="uxplay-1.50-airplayairplay-mirror-server-for-linux-macos-and-unix.">UxPlay 1.50: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.</h1>
<h3 id="now-developed-at-github-site-httpsgithub.comfdh2uxplay-where-user-issues-should-be-posted.">Now developed at GitHub site <a href="https://github.com/FDH2/UxPlay">https://github.com/FDH2/UxPlay</a> (where user issues should be posted).</h3>
<p>Highlights:</p>
<ul>
@@ -21,7 +21,7 @@
<p>For NVIDIA graphics with the proprietary drivers, the <code>nvh264dec</code> plugin (included in gstreamer1.0-plugins-bad since GStreamer-1.18.0) can be used for accelerated video decoding on the NVIDIA GPU after NVIDIAs CUDA driver <code>libcuda.so</code> is installed. This plugin should be used with options <code>uxplay -vd nvh264dec -vs glimagesink</code>. For GStreamer-1.16.3 or earlier, the plugin is called <code>nvdec</code>, and must be built by the user: see <a href="https://github.com/FDH2/UxPlay/wiki/NVIDIA-nvdec-and-nvenc-plugins">these instructions</a>. This older form of the plugin should be used with the <code>-vd nvdec -vs glimagesink</code> uxplay options.</p>
<ul>
<li><p><strong>GPU Support for Raspberry Pi</strong></p>
<p>Raspberry Pi (RPi) computers can run UxPlay with software decoding of h264 video (options <code>uxplay -rpi -avdec</code>) but this usually has unacceptable latency, and hardware-accelerated decoding by the Pis built-in Broadcom GPU should be used. RPi OS (Bullseye) has abandoned the omx (OpenMAX) driver used till now for this by <a href="http://github.com/FD-/RPiPlay">RPiPlay</a>, in favor of v4l2 (Video4Linux2). The GStreamer Video4Linux2 plugin only works with UxPlay since GStreamer-1.21.0.0 on the development branch, but a (partial) backport to 1.18.4 for RPi OS (Bullseye) has already appeared in current updates. In case the full update has not yet appeared, or you are using a different distribution, you can find <a href="https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches">patching instructions</a> in the <a href="https://github.com/FDH2/UxPlay/wiki">UxPlay Wiki</a>. Use the options <code>uxplay -rpi</code> ( or <code>uxplay -rpi -vs kmssink</code> on RPi OS Lite with no X11) with the patched GStreamer. Patches for GStreamer-1.18.5 (used in Ubuntu 21.10 for RPi) and GStreamer-1.20.0 (used in Manjaro for RPi) are also available there.</p></li>
<p>Raspberry Pi (RPi) computers can run UxPlay with software decoding of h264 video (by adding <code>-avdec</code> to the uxplay options) but this usually has unacceptable latency, and hardware-accelerated decoding by the Pis built-in Broadcom GPU should be used. RPi OS (Bullseye) has abandoned the omx (OpenMAX) driver used till now for this by <a href="http://github.com/FD-/RPiPlay">RPiPlay</a>, in favor of v4l2 (Video4Linux2). The GStreamer Video4Linux2 plugin only works with UxPlay since GStreamer-1.21.0.0 on the development branch, but a (partial) backport to 1.18.4 for RPi OS (Bullseye) has already appeared in current updates. In case the full update has not yet appeared, or you are using a different distribution, you can find <a href="https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches">patching instructions</a> in the <a href="https://github.com/FDH2/UxPlay/wiki">UxPlay Wiki</a>. Patches for GStreamer-1.18.5 (used in Ubuntu 21.10 for RPi) and GStreamer-1.20.1 (used in Manjaro for RPi) are also available. On a non-“Desktop” system without X11 that uses framebuffer video (such as RPi OS Bullseye “Lite”) use option <code>uxplay -rpifb</code> with the patched GStreamer. On “Desktop” operating systems, use the options <code>uxplay -rpigl</code> (for openGL video), or <code>uxplay -rpiwl</code> (for Wayland video).</p></li>
</ul>
<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>
<p>Some Linux distributions such as Debian do not allow distribution of compiled GPL code linked to OpenSSL-1.1.1 because its “dual OpenSSL/SSLeay” license has some incompatibilities with GPL, unless all code authors have explicitly given an “exception” to allow such linking (the historical origins of UxPlay make this impossible to obtain). Other distributions treat OpenSSL as a “System Library” which the GPL allows linking to.</p>
@@ -84,6 +84,7 @@
<p><strong>-s wxh</strong> (e.g. -s 1920x1080 , which is the default ) sets the display resolution (width and height, in pixels). (This may be a request made to the AirPlay client, and perhaps will not be the final resolution you get.) w and h are whole numbers with four digits or less. Note that the <strong>height</strong> pixel size is the controlling one used by the client for determining the streaming format; the width is dynamically adjusted to the shape of the image (portrait or landscape format, depending on how an iPad is held, for example).</p>
<p><strong>-s wxh@r</strong> As above, but also informs the AirPlay client about the screen refresh rate of the display. Default is r=60 (60 Hz); r must be a whole number less than 256.</p>
<p><strong>-o</strong> turns on an “overscanned” option for the display window. This reduces the image resolution by using some of the pixels requested by option -s wxh (or their default values 1920x1080) by adding an empty boundary frame of unused pixels (which would be lost in a full-screen display that overscans, and is not displayed by gstreamer). Recommendation: <strong>dont use this option</strong> unless there is some special reason to use it.</p>
<p><strong>-fs</strong> uses fullscreen mode, but only works with Wayland or VAAPI plugins.</p>
<p><strong>-fps n</strong> sets a maximum frame rate (in frames per second) for the AirPlay client to stream video; n must be a whole number less than 256. (The client may choose to serve video at any frame rate lower than this; default is 30 fps.) A setting below 30 fps might be useful to reduce latency if you are running more than one instance of uxplay at the same time. <em>This setting is only an advisory to the client device, so setting a high value will not force a high framerate.</em> (You can test using “-vs fpsdisplaysink” to see what framerate is being received, or use the option -FPSdata which displays video-stream performance data continuously sent by the client during video-streaming.)</p>
<p><strong>-FPSdata</strong> Turns on monitoring of regular reports about video streaming performance that are sent by the client. These will be displayed in the terminal window if this option is used. The data is updated by the client at 1 second intervals.</p>
<p><strong>-m</strong> generates a random MAC address to use instead of the true hardware MAC number of the computers network card. (Different server_name, MAC addresses, and network ports are needed for each running uxplay if you attempt to run two instances of uxplay on the same computer.) If UxPlay fails to find the true MAC address of a network card, (more specifically, the MAC address used by the first active network interface detected) a random MAC address will be used even if option <strong>-m</strong> was not specifed. (Note that a random MAC address will be different each time UxPlay is started).</p>
@@ -95,7 +96,9 @@
<p><strong>-vc <em>converter</em></strong> chooses the GStreamer pipelines videoconverter element, instead of the default value “videoconvert”. When using Video4Linux2 hardware-decoding by a GPU,<code>-vc v4l2convert</code> will also use the GPU for video conversion. Using quotes “…” allows some parameters to be included with the converter name.</p>
<p><strong>-vs <em>videosink</em></strong> chooses the GStreamer videosink, instead of letting autovideosink pick it for you. Some videosink choices are: ximagesink, xvimagesink, vaapisink (for intel graphics), gtksink, glimagesink, waylandsink, osximagesink (for macOS), kmssink (for systems without X11, like Raspberry Pi OS lite) or fpsdisplaysink (which shows the streaming framerate in fps). Using quotes “…” allows some parameters to be included with the videosink name. For example, <strong>fullscreen</strong> mode is supported by the vaapisink plugin, and is obtained using <code>-vs "vaapisink fullscreen=true"</code>; this also works with <code>waylandsink</code>. The syntax of such options is specific to a given plugin, and some choices of videosink might not work on your system.</p>
<p><strong>-vs 0</strong> suppresses display of streamed video, but plays streamed audio. (The clients screen is still mirrored at a reduced rate of 1 frame per second, but is not rendered or displayed.) This feature (which streams audio in AAC audio format) is now probably unneeded, as UxPlay can now stream superior-quality Apple Lossless audio without video in Airplay non-mirror mode.</p>
<p><strong>-rpi</strong> Video settings for Raspberry Pi, for hardware h264 video decoding in the GPU (requires the video4linux2 plugin from GStreamer-1.21.0 or later, or a backported patched version of an earlier release. (If this is unavailable, use <code>uxplay -rpi -avdec</code>). Uses the glimagesink videosink.</p>
<p><strong>-rpifb</strong> Video settings for Raspberry Pi, for hardware h264 video decoding in the GPU and rendering by the framebuffer, for systems not using X11 or Wayland (requires the video4linux2 plugin from GStreamer-1.21.0 or later, or a backported patched version of an earlier release. (If this is unavailable, use <code>uxplay -rpi -avdec</code>). Uses the videosink “kmssink.</p>
<p><strong>-rpigl</strong> (or just <strong>-rpi</strong>) Similar to -rpifb, but uses the OpenGL videosink “glimagesink” (for Raspberry Pi systems with X11).</p>
<p><strong>-rpiwl</strong> Similar to -rpifb, but for Raspberry Pi systems using the Wayland video compositor (uses the videosink “waylandsink”.</p>
<p><strong>-avdec</strong> forces use of software h264 decoding using Gstreamer element avdec_h264 (libav h264 decoder). This option should prevent autovideosink choosing a hardware-accelerated videosink plugin such as vaapisink.</p>
<p><strong>-as <em>audiosink</em></strong> chooses the GStreamer audiosink, instead of letting autoaudiosink pick it for you. Some audiosink choices are: pulsesink, alsasink, osssink, oss4sink, and osxaudiosink (for macOS). Using quotes “…” might allow some parameters to be included with the audiosink name. (Some choices of audiosink might not work on your system.)</p>
<p><strong>-as 0</strong> (or just <strong>-a</strong>) suppresses playing of streamed audio, but displays streamed video.</p>
@@ -135,6 +138,7 @@
<p>This triggers an unending stream of error messages, and means that the audio decryption key (also used in video decryption) was not correctly extracted from data sent by the client. This should not happen for iOS 9.3 or later clients. However, if a client uses the same older version of the protocol that is used by the Windows-based AirPlay client emulator <em>AirMyPC</em>, the protocol can be switched to the older version by the setting <code>OLD_PROTOCOL_CLIENT_USER_AGENT_LIST</code> in lib/global.h. UxPlay reports the clients “User Agent” string when it connects. If some other client also fails to decrypt all audio and video, try adding its “User Agent” string in place of “xxx” in the entry “AirMyPC/2.0;xxx” in global.h and rebuild uxplay.</p>
<p>Note that Uxplay declares itself to be an AppleTV3,2 with a sourceVersion 220.68; this can also be changed in global.h. It had been thought that it was necessary for UxPlay to claim to be an older 32 bit AppleTV model that cannot run modern 64bit tvOS, in order for the client to use a “legacy” protocol for pairing with the server (see the <em>“Notes on AirPlay protocol versions”</em> at the end of this README). However, UxPlay still works if it declares itself as an AppleTV6,2 with sourceVersion 380.20.1 (an AppleTV 4K 1st gen, introduced 2017, running tvOS 12.2.1), so it is unclear what setting prompts the client to use the “legacy” protocol needed by UxPlay.</p>
<h1 id="changelog">ChangeLog</h1>
<p>1.50 2022-04-15 Added -fs fullscreen option (for Wayland or VAAPI plugins only), and -rpifb -rpigl -rpiwl options for RPi. Also modified timestamps from “DTS” to “PTS” for latency improvement, plus internal cleanups.</p>
<p>1.49 2022-03-28 Addded options for dumping video and/or audio to file, for debugging, etc. h264 PPS/SPS NALUs are shown with -d. Fixed video-not-working for M1 Mac clients.</p>
<p>1.48 2022-03-11 Made the GStreamer video pipeline fully configurable, for use with hardware h264 decoding. Support for Raspberry Pi.</p>
<p>1.47 2022-02-05 Added -FPSdata option to display (in the terminal) regular reports sent by the client about video streaming performance. Internal cleanups of processing of video packets received from the client. Added -reset n option to reset the connection after n ntp timeouts (also reset after “connection reset by peer” error in video stream).</p>

View File

@@ -1,4 +1,4 @@
# UxPlay 1.49: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
# UxPlay 1.50: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
### Now developed at GitHub site [https://github.com/FDH2/UxPlay](https://github.com/FDH2/UxPlay) (where user issues should be posted).
@@ -84,16 +84,19 @@ This older form of the plugin should be used with the `-vd nvdec -vs glimagesi
* **GPU Support for Raspberry Pi**
Raspberry Pi (RPi) computers can run UxPlay with software decoding of h264 video (options `uxplay -rpi -avdec`) but this usually
has unacceptable latency, and hardware-accelerated decoding by the Pi's built-in Broadcom GPU should be used.
Raspberry Pi (RPi) computers can run UxPlay with software decoding of h264 video (by adding `-avdec` to the uxplay options) but this
usually has unacceptable latency, and hardware-accelerated decoding by the Pi's built-in Broadcom GPU should be used.
RPi OS (Bullseye) has abandoned the omx (OpenMAX) driver used till now for this by [RPiPlay](http://github.com/FD-/RPiPlay), in
favor of v4l2 (Video4Linux2). The GStreamer Video4Linux2 plugin only works with UxPlay since GStreamer-1.21.0.0 on the development branch,
but a (partial) backport to 1.18.4 for RPi OS (Bullseye) has already appeared in current updates. In case the full update has not yet appeared, or you
are using a different distribution,
but a (partial) backport to 1.18.4 for RPi OS (Bullseye) has already appeared in current updates. In case the full update has not
yet appeared, or you are using a different distribution,
you can find [patching instructions](https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches) in
the [UxPlay Wiki](https://github.com/FDH2/UxPlay/wiki). Use the options `uxplay -rpi` (
or `uxplay -rpi -vs kmssink` on RPi OS Lite with no X11) with the patched GStreamer. Patches for
GStreamer-1.18.5 (used in Ubuntu 21.10 for RPi) and GStreamer-1.20.0 (used in Manjaro for RPi) are also available there.
the [UxPlay Wiki](https://github.com/FDH2/UxPlay/wiki). Patches for
GStreamer-1.18.5 (used in Ubuntu 21.10 for RPi) and GStreamer-1.20.1 (used in Manjaro for RPi) are also available.
On a non-"Desktop" system without X11 that uses
framebuffer video (such as RPi OS Bullseye "Lite") use option `uxplay -rpifb` with the patched GStreamer.
On "Desktop" operating systems, use the options `uxplay -rpigl`
(for openGL video), or ``uxplay -rpiwl`` (for Wayland video).
### Note to packagers: OpenSSL-3.0.0 solves GPL v3 license issues.
@@ -331,6 +334,8 @@ which will not work if a firewall is running.
Recommendation: **don't use this option** unless there is some special
reason to use it.
**-fs** uses fullscreen mode, but only works with Wayland or VAAPI plugins.
**-fps n** sets a maximum frame rate (in frames per second) for the AirPlay
client to stream video; n must be a whole number less than 256.
(The client may choose to serve video at any frame rate lower
@@ -392,9 +397,17 @@ Also: image transforms that had been added to RPiPlay have been ported to UxPlay
feature (which streams audio in AAC audio format) is now probably unneeded, as UxPlay can now
stream superior-quality Apple Lossless audio without video in Airplay non-mirror mode.
**-rpi** Video settings for Raspberry Pi, for hardware h264 video decoding in the GPU (requires the
**-rpifb** Video settings for Raspberry Pi, for hardware h264 video decoding in the GPU and rendering by the
framebuffer, for systems not using X11 or Wayland (requires the
video4linux2 plugin from GStreamer-1.21.0 or later, or a backported patched version of an earlier release.
(If this is unavailable, use `uxplay -rpi -avdec`). Uses the glimagesink videosink.
(If this is unavailable, use `uxplay -rpi -avdec`). Uses the videosink "kmssink".
**-rpigl** (or just **-rpi**) Similar to -rpifb, but uses the OpenGL videosink "glimagesink" (for Raspberry Pi systems
with X11).
**-rpiwl** Similar to -rpifb, but for Raspberry Pi systems using the Wayland video compositor (uses the
videosink "waylandsink".
**-avdec** forces use of software h264 decoding using Gstreamer element avdec_h264 (libav h264 decoder). This
option should prevent autovideosink choosing a hardware-accelerated videosink plugin such as vaapisink.
@@ -578,6 +591,9 @@ tvOS 12.2.1), so it is unclear what setting prompts the client
to use the "legacy" protocol needed by UxPlay.
# ChangeLog
1.50 2022-04-15 Added -fs fullscreen option (for Wayland or VAAPI plugins only), and -rpifb -rpigl -rpiwl options for RPi.
Also modified timestamps from "DTS" to "PTS" for latency improvement, plus internal cleanups.
1.49 2022-03-28 Addded options for dumping video and/or audio to file, for debugging, etc. h264 PPS/SPS NALU's are shown with -d.
Fixed video-not-working for M1 Mac clients.

View File

@@ -1,4 +1,4 @@
UxPlay 1.49: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
UxPlay 1.50: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
======================================================================
### Now developed at GitHub site <https://github.com/FDH2/UxPlay> (where user issues should be posted).
@@ -106,10 +106,10 @@ This older form of the plugin should be used with the
- **GPU Support for Raspberry Pi**
Raspberry Pi (RPi) computers can run UxPlay with software decoding
of h264 video (options `uxplay -rpi -avdec`) but this usually has
unacceptable latency, and hardware-accelerated decoding by the Pi's
built-in Broadcom GPU should be used. RPi OS (Bullseye) has
abandoned the omx (OpenMAX) driver used till now for this by
of h264 video (by adding `-avdec` to the uxplay options) but this
usually has unacceptable latency, and hardware-accelerated decoding
by the Pi's built-in Broadcom GPU should be used. RPi OS (Bullseye)
has abandoned the omx (OpenMAX) driver used till now for this by
[RPiPlay](http://github.com/FD-/RPiPlay), in favor of v4l2
(Video4Linux2). The GStreamer Video4Linux2 plugin only works with
UxPlay since GStreamer-1.21.0.0 on the development branch, but a
@@ -118,11 +118,14 @@ This older form of the plugin should be used with the
appeared, or you are using a different distribution, you can find
[patching
instructions](https://github.com/FDH2/UxPlay/wiki/Gstreamer-Video4Linux2-plugin-patches)
in the [UxPlay Wiki](https://github.com/FDH2/UxPlay/wiki). Use the
options `uxplay -rpi` ( or `uxplay -rpi -vs kmssink` on RPi OS Lite
with no X11) with the patched GStreamer. Patches for
GStreamer-1.18.5 (used in Ubuntu 21.10 for RPi) and GStreamer-1.20.0
(used in Manjaro for RPi) are also available there.
in the [UxPlay Wiki](https://github.com/FDH2/UxPlay/wiki). Patches
for GStreamer-1.18.5 (used in Ubuntu 21.10 for RPi) and
GStreamer-1.20.1 (used in Manjaro for RPi) are also available. On a
non-"Desktop" system without X11 that uses framebuffer video (such
as RPi OS Bullseye "Lite") use option `uxplay -rpifb` with the
patched GStreamer. On "Desktop" operating systems, use the options
`uxplay -rpigl` (for openGL video), or `uxplay -rpiwl` (for Wayland
video).
### Note to packagers: OpenSSL-3.0.0 solves GPL v3 license issues.
@@ -433,6 +436,9 @@ display that overscans, and is not displayed by gstreamer).
Recommendation: **don't use this option** unless there is some special
reason to use it.
**-fs** uses fullscreen mode, but only works with Wayland or VAAPI
plugins.
**-fps n** sets a maximum frame rate (in frames per second) for the
AirPlay client to stream video; n must be a whole number less than 256.
(The client may choose to serve video at any frame rate lower than this;
@@ -504,11 +510,18 @@ streams audio in AAC audio format) is now probably unneeded, as UxPlay
can now stream superior-quality Apple Lossless audio without video in
Airplay non-mirror mode.
**-rpi** Video settings for Raspberry Pi, for hardware h264 video
decoding in the GPU (requires the video4linux2 plugin from
**-rpifb** Video settings for Raspberry Pi, for hardware h264 video
decoding in the GPU and rendering by the framebuffer, for systems not
using X11 or Wayland (requires the video4linux2 plugin from
GStreamer-1.21.0 or later, or a backported patched version of an earlier
release. (If this is unavailable, use `uxplay -rpi -avdec`). Uses the
glimagesink videosink.
videosink "kmssink".
**-rpigl** (or just **-rpi**) Similar to -rpifb, but uses the OpenGL
videosink "glimagesink" (for Raspberry Pi systems with X11).
**-rpiwl** Similar to -rpifb, but for Raspberry Pi systems using the
Wayland video compositor (uses the videosink "waylandsink".
**-avdec** forces use of software h264 decoding using Gstreamer element
avdec\_h264 (libav h264 decoder). This option should prevent
@@ -760,6 +773,11 @@ the "legacy" protocol needed by UxPlay.
ChangeLog
=========
1.50 2022-04-15 Added -fs fullscreen option (for Wayland or VAAPI
plugins only), and -rpifb -rpigl -rpiwl options for RPi. Also modified
timestamps from "DTS" to "PTS" for latency improvement, plus internal
cleanups.
1.49 2022-03-28 Addded options for dumping video and/or audio to file,
for debugging, etc. h264 PPS/SPS NALU's are shown with -d. Fixed
video-not-working for M1 Mac clients.