make -rpi be the option for framebuffer on RPi

This commit is contained in:
fduncanh
2022-04-17 04:12:12 -04:00
parent 01d46e0b10
commit b3ebf31f69
5 changed files with 36 additions and 34 deletions

View File

@@ -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 (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>
<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 -rpi</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>
@@ -96,9 +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>-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>-rpi</strong> Video settings for Raspberry Pi, for hardware h264 video decoding in the GPU and rendering by the framebuffer, for “Lite” or minimal 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> Similar to -rpi, but uses the OpenGL videosink “glimagesink” (for Raspberry Pi “Desktop” systems with X11).</p>
<p><strong>-rpiwl</strong> Similar to -rpi, but for Raspberry Pi “Desktop” 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>
@@ -138,7 +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.50 2022-04-15 Added -fs fullscreen option (for Wayland or VAAPI plugins only), Changed -rpi to be for framebuffer (“lite”) RPi systems and added -rpigl (OpenGL) and -rpiwl (Wayland) options for RPi Desktop systems. 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

@@ -94,7 +94,7 @@ This older form of the plugin should be used with the `-vd nvdec -vs glimagesi
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.
framebuffer video (such as RPi OS Bullseye "Lite") use option `uxplay -rpi` with the patched GStreamer.
On "Desktop" operating systems, use the options `uxplay -rpigl`
(for openGL video), or ``uxplay -rpiwl`` (for Wayland video).
@@ -397,15 +397,15 @@ 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.
**-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
**-rpi** Video settings for Raspberry Pi, for hardware h264 video decoding in the GPU and rendering by the
framebuffer, for "Lite" or minimal 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 videosink "kmssink".
**-rpigl** (or just **-rpi**) Similar to -rpifb, but uses the OpenGL videosink "glimagesink" (for Raspberry Pi systems
**-rpigl** Similar to -rpi, but uses the OpenGL videosink "glimagesink" (for Raspberry Pi "Desktop" systems
with X11).
**-rpiwl** Similar to -rpifb, but for Raspberry Pi systems using the Wayland video compositor (uses the
**-rpiwl** Similar to -rpi, but for Raspberry Pi "Desktop" systems using the Wayland video compositor (uses the
videosink "waylandsink".
@@ -591,7 +591,8 @@ 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.
1.50 2022-04-15 Added -fs fullscreen option (for Wayland or VAAPI plugins only), Changed -rpi to be for framebuffer ("lite") RPi
systems and added -rpigl (OpenGL) and -rpiwl (Wayland) options for RPi Desktop systems.
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.

View File

@@ -122,7 +122,7 @@ This older form of the plugin should be used with the
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
as RPi OS Bullseye "Lite") use option `uxplay -rpi` with the
patched GStreamer. On "Desktop" operating systems, use the options
`uxplay -rpigl` (for openGL video), or `uxplay -rpiwl` (for Wayland
video).
@@ -510,18 +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.
**-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
videosink "kmssink".
**-rpi** Video settings for Raspberry Pi, for hardware h264 video
decoding in the GPU and rendering by the framebuffer, for "Lite" or
minimal 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 videosink "kmssink".
**-rpigl** (or just **-rpi**) Similar to -rpifb, but uses the OpenGL
videosink "glimagesink" (for Raspberry Pi systems with X11).
**-rpigl** Similar to -rpi, but uses the OpenGL videosink "glimagesink"
(for Raspberry Pi "Desktop" systems with X11).
**-rpiwl** Similar to -rpifb, but for Raspberry Pi systems using the
Wayland video compositor (uses the videosink "waylandsink".
**-rpiwl** Similar to -rpi, but for Raspberry Pi "Desktop" 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
@@ -774,9 +774,10 @@ 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.
plugins only), Changed -rpi to be for framebuffer ("lite") RPi systems
and added -rpigl (OpenGL) and -rpiwl (Wayland) options for RPi Desktop
systems. 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

View File

@@ -5,7 +5,7 @@ uxplay \- start AirPlay server
.B uxplay
[\fI\,-n name\/\fR] [\fI\,-s wxh\/\fR] [\fI\,-p \/\fR[\fI\,n\/\fR]] [more \fI OPTIONS \/\fR ...]
.SH DESCRIPTION
UxPlay 1.49: An open\-source AirPlay mirroring server based on RPiPlay
UxPlay 1.50: An open\-source AirPlay mirroring server based on RPiPlay
.SH OPTIONS
.TP
.B
@@ -60,11 +60,11 @@ UxPlay 1.49: An open\-source AirPlay mirroring server based on RPiPlay
.TP
\fB\-vs\fR 0 Streamed audio only, with no video display window.
.TP
\fB\-rpigl\fR (or "-rpi") Raspberry Pi GPU h264 video with OpenGL.
\fB\-rpi\fR Raspberry Pi "Lite" GPU video with KMS framebuffer.
.TP
\fB\-rpiwl\fR Raspberry Pi GPU h264 video with Wayland compositor.
\fB\-rpigl\fR Raspberry Pi GPU video with OpenGL.
.TP
\fB\-rpifb\fR Raspberry Pi "Lite" video with KMS framebuffer (no X11).
\fB\-rpiwl\fR Raspberry Pi GPU video with Wayland compositor.
.TP
\fB\-avdec\fR Force software h264 video decoding with libav decoder.
.TP

View File

@@ -323,9 +323,9 @@ static void print_info (char *name) {
printf(" some choices: ximagesink,xvimagesink,vaapisink,glimagesink,\n");
printf(" gtksink,waylandsink,osximagesink,kmssink,fpsdisplaysink etc.\n");
printf("-vs 0 Streamed audio only, with no video display window\n");
printf("-rpigl (or \"-rpi\") Raspberry Pi GPU h264 video with OpenGL.\n");
printf("-rpiwl Raspberry Pi GPU h264 video with Wayland compositor.\n");
printf("-rpifb Raspberry Pi \"Lite\" video with KMS frame buffer (no X11).\n");
printf("-rpi Raspberry Pi \"Lite\" GPU video with KMS frame buffer.\n");
printf("-rpigl Raspberry Pi GPU video with OpenGL.\n");
printf("-rpiwl Raspberry Pi GPU video with Wayland compositor.\n");
printf("-avdec Force software h264 video decoding with libav decoder\n");
printf("-as ... Choose the GStreamer audiosink; default \"autoaudiosink\"\n");
printf(" choices: pulsesink,alsasink,osssink,oss4sink,osxaudiosink\n");
@@ -584,7 +584,7 @@ int main (int argc, char *argv[]) {
video_decoder = "avdec_h264";
video_converter.erase();
video_converter = "videoconvert";
} else if (arg == "-rpi" || arg == "-rpigl") {
} else if (arg == "-rpigl") {
video_parser.erase();
video_parser = "h264parse ! capssetter caps=\"video/x-h264, colorimetry=bt709\"";
video_decoder.erase();
@@ -602,7 +602,7 @@ int main (int argc, char *argv[]) {
video_converter = "v4l2convert";
videosink.erase();
videosink = "waylandsink";
} else if (arg == "-rpifb" ) {
} else if (arg == "-rpi" ) {
video_parser.erase();
video_parser = "h264parse ! capssetter caps=\"video/x-h264, colorimetry=bt709\"";
video_decoder.erase();