mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
v1.46 restore decodebin to video pipeline (revert change in 1.44)
replace with -avdec option to force software h264 decoding.
This commit is contained in:
17
README.html
17
README.html
@@ -1,4 +1,4 @@
|
||||
<h1 id="uxplay-1.45-airplayairplay-mirror-server-for-linux-macos-and-unix.">UxPlay 1.45: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.</h1>
|
||||
<h1 id="uxplay-1.46-airplayairplay-mirror-server-for-linux-macos-and-unix.">UxPlay 1.46: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.</h1>
|
||||
<p>Highlights:</p>
|
||||
<ul>
|
||||
<li>GPLv3, open source.</li>
|
||||
@@ -29,7 +29,7 @@
|
||||
<li><code>sudo apt-get install libssl-dev libplist-dev</code> (unless you need to build OpenSSL and libplist from source).</li>
|
||||
<li><code>sudo apt-get install libavahi-compat-libdnssd-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-plugins-bad</code></li>
|
||||
<li><code>sudo apt-get install gstreamer1.0-vaapi</code> (For hardware-accelerated Intel graphics, but not NVIDIA)</li>
|
||||
<li><code>sudo apt-get install libx11-dev</code> (for the “ZOOMFIX” X11_display name fix for screen-sharing with e.g., ZOOM)</li>
|
||||
<li><code>sudo apt-get install libx11-dev</code> (only needed if you invoke the “ZOOMFIX” X11 display-name fix in the next step)</li>
|
||||
<li><code>cmake .</code> (or “<code>cmake -DZOOMFIX=ON .</code>” to get a screen-sharing fix to make X11 mirror display windows visible to screen-sharing applications such as Zoom, see <a href="#improvements">Improvements</a> #3 below).</li>
|
||||
<li><code>make</code></li>
|
||||
<li><code>sudo make install</code> (you can afterwards uninstall with <code>sudo make uninstall</code> in the same directory in which this was run)</li>
|
||||
@@ -80,6 +80,7 @@
|
||||
<p><strong>-r {R|L}</strong> 90 degree Right (clockwise) or Left (counter-clockwise) rotations; these are carried out after any <strong>-f</strong> transforms.</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), 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 client’s 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>-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>
|
||||
<p><strong>-nc</strong> maintains previous UxPlay < 1.45 behavior that does <strong>not close</strong> the video window when the the client sends the “Stop Mirroring” signal. <em>This option is currently used by default in macOS, as the window created in macOS by GStreamer does not terminate correctly (it causes a segfault) if it is still open when the GStreamer pipeline is closed.</em></p>
|
||||
@@ -92,11 +93,12 @@
|
||||
<h3 id="uxplay-starts-but-stalls-after-initialized-server-sockets-appears-with-the-server-name-showing-on-the-client-but-the-client-fails-to-connect-when-the-uxplay-server-is-selected.">2. uxplay starts, but stalls after “Initialized server socket(s)” appears, <em>with the server name showing on the client</em> (but the client fails to connect when the UxPlay server is selected).</h3>
|
||||
<p>This shows that a <em>DNS-SD</em> service is working, but a firewall on the server is probably blocking the connection request from the client. (One user who insisted that the firewall had been turned off turned out to have had <em>two</em> active firewalls (<em>firewalld</em> and <em>ufw</em>) <em>both</em> running on the server!) If possible, either turn off the firewall to see if that is the problem, or get three consecutive network ports, starting at port n, all three in the range 1024-65535, opened for both tcp and udp, and use “uxplay -p n” (or open UDP 6000, 6001, 6011 TCP 7000,7001,7100 and use “uxplay -p”).</p>
|
||||
<h3 id="problems-after-the-client-server-connection-has-been-made">3. Problems <em>after</em> the client-server connection has been made:</h3>
|
||||
<p>For such problems, use “uxplay -d” (debug log option) to see what is happening: it will show how far the connection process gets before the failure occurs. You can compare your debug output to that from a successful start of UxPlay in the <a href="https://github.com/FDH2/UxPlay/wiki">UxPlay Wiki</a>.</p>
|
||||
<p><strong>Most of such problems are due to a GStreamer plugin that doesn’t work on your system</strong>: (by default, GStreamer uses the “autovideosink” algorithm to guess what is the “best” plugin to use on your system).</p>
|
||||
<p>If you do <em>not</em> see the message <code>raop_rtp_mirror starting mirroring</code>, something went wrong before the client-server negociations were finished. For such problems, use “uxplay -d” (debug log option) to see what is happening: it will show how far the connection process gets before the failure occurs. You can compare your debug output to that from a successful start of UxPlay in the <a href="https://github.com/FDH2/UxPlay/wiki">UxPlay Wiki</a>.</p>
|
||||
<p><strong>If UxPlay reports that mirroring started, but you get no video or audio, the problem is probably from a GStreamer plugin that doesn’t work on your system</strong> (by default, GStreamer uses the “autovideosink” and “autoaudiosink” algorithms to guess what are the “best” plugins to use on your system).</p>
|
||||
<p>Sometimes “autovideosink” may select the OpenGL renderer “glimagesink” which may not work correctly on your system. Try the options “-vs ximagesink” or “-vs xvimagesink” to see if using one of these fixes the problem.</p>
|
||||
<p>Other reported problems are connected to the GStreamer VAAPI plugin (for hardware-accelerated Intel graphics, but not NVIDIA or AMD graphics). Your next attempt to resolve a problem should be to find out if the gstreamer1.0-vaapi plugin is installed, and if so, uninstall it. (If this does not fix the problem, you can reinstall it.)</p>
|
||||
<p>There are some reports of other GStreamer problems with hardware-accelerated Intel graphics. One user (on Debian) solved this with “sudo apt install intel-media-va-driver-non-free”. This is a driver for 8’th (or later) generation "*-lake" Intel chips, that seems to be related to VAAPI accelerated graphics.</p>
|
||||
<p>Other reported problems are connected to the GStreamer VAAPI plugin (for hardware-accelerated Intel graphics, but not NVIDIA graphics). Use the option “-avdec” to force software h264 video decoding: this should prevent autovideosink from selecting the vaapisink videosink. Alternatively, find out if the gstreamer1.0-vaapi plugin is installed, and if so, uninstall it. (If this does not fix the problem, you can reinstall it.)</p>
|
||||
<p>There are some reports of other GStreamer problems with hardware-accelerated Intel HD graphics. One user (on Debian) solved this with “sudo apt install intel-media-va-driver-non-free”. This is a driver for 8’th (or later) generation "*-lake" Intel chips, that seems to be related to VAAPI accelerated graphics.</p>
|
||||
<p>If you <em>do</em> have Intel HD graphics, and have installed the vaapi plugin, but <code>-vs vaapisink</code> does not work, check that vaapi is not “blacklisted” in your GStreamer installation: run <code>gst-inspect-1.0 vaapi</code>, if this reports <code>0 features</code>, you need to <code>export GST_VAAPI_ALL_DRIVERS=1</code> before running uxplay, or set this in the default environment.</p>
|
||||
<p>You can try to fix audio problems by using the “-as <em>audiosink</em>” option to choose the GStreamer audiosink , rather than have autoaudiosink pick one for you. The command “gst-inspect-1.0 | grep Sink | grep Audio” " will show you which audiosinks are available on your system. (Replace “Audio” by “Video” to see videosinks). Some possible audiosinks are pulsesink, alsasink, osssink, oss4sink, and osxaudiosink (macOS).</p>
|
||||
<p>If you ran cmake with “-DZOOMFIX=ON”, check if the problem is still there without ZOOMFIX. ZOOMFIX is only applied to the default videosink choice (“autovideosink”) and the two X11 videosinks “ximagesink” and “xvimagesink”. ZOOMFIX is only designed for these last two; if autovideosink chooses a different videosink, ZOOMFIX is now ignored. If you are using the X11 windowing system (standard on Linux), and have trouble with screen-sharing on Zoom, use ZOOMFIX and “-vs xvimagesink” (or “-vs ximagesink” if the previous choice doesn’t work).</p>
|
||||
<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>
|
||||
@@ -108,6 +110,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 client’s “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 is crucial for UxPlay to declare this old value of sourceVersion, as this prompts the Apple client to use a less-encrypted “legacy” protocol needed by third-generation Apple TV’s, which are 32-bit devices that cannot run modern tvOS; it is probably not necessary for UxPlay to claim to be such an old AppleTV model.</p>
|
||||
<h1 id="changelog">ChangeLog</h1>
|
||||
<p>1.46 2022-01-20 Restore pre-1.44 behavior, using decodebin in the video pipeline; instead, introduce new option “-avdec” to force software h264 decoding by libav h264, if needed (will prevent selection of vaapisink by autovideosink). Update llhttp to v6.0.6.</p>
|
||||
<p>1.45 2022-01-10 New behavior: close video window when client requests “stop mirroring”. (A new “no close” option “-nc” is added for users who wish to retain previous behavior that does not close the video window).</p>
|
||||
<p>1.44 2021-12-13 Omit hash of aeskey with ecdh_secret for an AirMyPC client; make an internal rearrangement of where this hash is done. Fully report all initial communications between client and server in -d debug mode. Replace decodebin in GStreamer video pipeline by h264-specific elements.</p>
|
||||
<p>1.43 2021-12-07 Various internal changes, such as tests for successful decryption, uniform treatment of informational/debug messages, etc., updated README.</p>
|
||||
@@ -126,7 +129,7 @@
|
||||
<ol type="1">
|
||||
<li><p>Updates of the RAOP (AirPlay protocol) collection of codes maintained at https://github.com/FD-/RPiPlay.git so it is current as of 2021-08-01, adding all changes since the original release of UxPlay by antimof. This involved crypto updates, replacement of the included plist library by the system-installed version, and a change over to a library llhttp for http parsing.</p></li>
|
||||
<li><p>Added the -s, -o -p, -m, -r, -f, -fps -vs -as and -t options.</p></li>
|
||||
<li><p>If “<code>cmake -DZOOMFIX=ON .</code>” is run before compiling, the mirrored window is now visible to screen-sharing applications such as Zoom. To compile with ZOOMFIX=ON, the X11 development libraries must be installed. (ZOOMFIX will not be needed once the upcoming gstreamer-1.20 is available, since starting with that release, the GStreamer X11 mirror window will be natively visible for screen-sharing.) Thanks to David Ventura https://github.com/DavidVentura/UxPlay for the fix and also for getting it into gstreamer-1.20. [If uxplay was compiled after cmake was run without -DZOOMFIX=ON, and your gstreamer version is older than 1.20, you can still manually make the X11 window visible to screen-sharing apps with the X11 utility xdotool, if it is installed, with: <code>xdotool selectwindow set_window --name <name></code> (where <code><name></code> is your choice of name), and then select the uxplay window by clicking on it with the mouse.]</p></li>
|
||||
<li><p>If “<code>cmake -DZOOMFIX=ON .</code>” is run before compiling, the mirrored window is now visible to screen-sharing applications such as Zoom. (This applies only to X11 windows produced by videosinks <code>ximagesink</code> and <code>xvimagesink</code>, which are often selected by default.) To compile with ZOOMFIX=ON, the X11 development libraries must be installed. <em>(ZOOMFIX will not be needed once the upcoming gstreamer-1.20 is available, since starting with that release, the GStreamer X11 mirror window will be natively visible for screen-sharing, but it make take some time for distributions to supply this version.)</em> Thanks to David Ventura https://github.com/DavidVentura/UxPlay for the fix and also for getting it into gstreamer-1.20. [If uxplay was compiled after cmake was run without -DZOOMFIX=ON, and your gstreamer version is older than 1.20, you can still manually make the X11 window visible to screen-sharing apps with the X11 utility xdotool, if it is installed, with: <code>xdotool selectwindow set_window --name <name></code> (where <code><name></code> is your choice of name), and then select the uxplay window by clicking on it with the mouse.]</p></li>
|
||||
<li><p>The AirPlay server now terminates correctly when the gstreamer display window is closed, and is relaunched with the same settings to wait for a new connection. The program uxplay terminates when Ctrl-C is typed in the terminal window. The <strong>-t <em>timeout</em></strong> option relaunches the server after <em>timeout</em> seconds of inactivity to allow new connections to be made.</p></li>
|
||||
<li><p>In principle, multiple instances of uxplay can be run simultaneously using the <strong>-m</strong> (generate random MAC address) option to give each a different (“local” as opposed to “universal”) MAC address. If the <strong>-p [n]</strong> option is used, they also need separate network port choices. (However, there may be a large latency, and running two instances of uxplay simultaneously on the same computer may not be very useful; using the <strong>-fps</strong> option to force streaming framerates below 30fps could be helpful.)</p></li>
|
||||
<li><p>Without the <strong>-p</strong> [n] option, uxplay makes a random dynamic assignment of network ports. This will not work if most ports are closed by a firewall. With e.g., <strong>-p 45000</strong> you should open both TCP and UDP on ports 45000, 45001, 45002. Minimum allowed port is 1024, maximum is 65535. The option “<strong>-p</strong>” with no argument uses a “legacy” set of ports TCP 7100, 7000, 7001, and UDP 7011, 6000, 6001. Finer control is also possible: “<strong>-p udp n1,n2,n3 -p tcp n4,n5,n6</strong>” sets all six ports individually.</p></li>
|
||||
|
||||
40
README.md
40
README.md
@@ -1,4 +1,4 @@
|
||||
# UxPlay 1.45: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
|
||||
# UxPlay 1.46: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
|
||||
|
||||
Highlights:
|
||||
|
||||
@@ -98,7 +98,7 @@ downloaded source code ("UxPlay-\*", "\*" = "master" or the release tag for zipf
|
||||
1. `sudo apt-get install libssl-dev libplist-dev` (unless you need to build OpenSSL and libplist from source).
|
||||
2. `sudo apt-get install libavahi-compat-libdnssd-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-plugins-bad`
|
||||
3. `sudo apt-get install gstreamer1.0-vaapi` (For hardware-accelerated Intel graphics, but not NVIDIA)
|
||||
4. `sudo apt-get install libx11-dev` (for the "ZOOMFIX" X11_display name fix for screen-sharing with e.g., ZOOM)
|
||||
4. `sudo apt-get install libx11-dev` (only needed if you invoke the "ZOOMFIX" X11 display-name fix in the next step)
|
||||
5. `cmake .` (or "`cmake -DZOOMFIX=ON .`" to get a screen-sharing fix to
|
||||
make X11 mirror display windows visible to screen-sharing applications such as
|
||||
Zoom, see [Improvements](#improvements) \#3 below).
|
||||
@@ -319,6 +319,9 @@ 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.
|
||||
|
||||
**-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.
|
||||
|
||||
**-as _audiosink_** 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
|
||||
@@ -370,28 +373,34 @@ starting at port n, all three in the range 1024-65535, opened for both tcp and
|
||||
|
||||
### 3. Problems _after_ the client-server connection has been made:
|
||||
|
||||
If you do _not_ see the message ``raop_rtp_mirror starting mirroring``, something went wrong before the client-server negociations were finished.
|
||||
For such problems, use "uxplay -d " (debug log option) to see what is happening: it will show how far the connection process gets before
|
||||
the failure occurs. You can compare your debug output to
|
||||
that from a successful start of UxPlay in the [UxPlay Wiki](https://github.com/FDH2/UxPlay/wiki).
|
||||
|
||||
**Most of such problems are due to a GStreamer plugin that doesn't work on your system**: (by default,
|
||||
GStreamer uses the "autovideosink" algorithm to guess what is the "best"
|
||||
plugin to use on your system).
|
||||
**If UxPlay reports that mirroring started, but you get no video or audio, the problem is probably from a
|
||||
GStreamer plugin that doesn't work on your system** (by default,
|
||||
GStreamer uses the "autovideosink" and "autoaudiosink" algorithms
|
||||
to guess what are the "best" plugins to use on your system).
|
||||
|
||||
Sometimes "autovideosink" may select the OpenGL renderer "glimagesink" which
|
||||
may not work correctly on your system. Try the options "-vs ximagesink" or
|
||||
"-vs xvimagesink" to see if using one of these fixes the problem.
|
||||
|
||||
Other reported problems are connected to the GStreamer VAAPI plugin
|
||||
(for hardware-accelerated Intel graphics, but not NVIDIA or AMD graphics).
|
||||
Your next attempt to resolve a problem should be to find out if the
|
||||
gstreamer1.0-vaapi plugin is installed, and if so, uninstall it.
|
||||
(If this does not fix the problem, you can reinstall it.)
|
||||
(for hardware-accelerated Intel graphics, but not NVIDIA graphics).
|
||||
Use the option "-avdec"
|
||||
to force software h264 video decoding: this should prevent autovideosink from selecting the vaapisink videosink.
|
||||
Alternatively, find out if the
|
||||
gstreamer1.0-vaapi plugin is installed, and if so, uninstall it.
|
||||
(If this does not fix the problem, you can reinstall it.)
|
||||
|
||||
There are some reports of other GStreamer problems with hardware-accelerated Intel graphics. One user
|
||||
There are some reports of other GStreamer problems with hardware-accelerated Intel HD graphics. One user
|
||||
(on Debian) solved this with "sudo apt install intel-media-va-driver-non-free". This is a driver for 8'th (or later) generation
|
||||
"*-lake" Intel chips, that seems to be related to VAAPI accelerated graphics.
|
||||
|
||||
If you _do_ have Intel HD graphics, and have installed the vaapi plugin, but ``-vs vaapisink`` does not work, check that vaapi is not "blacklisted" in your GStreamer installation: run ``gst-inspect-1.0 vaapi``, if this reports ``0 features``, you need to ``export GST_VAAPI_ALL_DRIVERS=1`` before running uxplay, or set this in the default environment.
|
||||
|
||||
You can try to fix audio problems by using the "-as _audiosink_" option to choose the GStreamer audiosink , rather than
|
||||
have autoaudiosink pick one for you. The command "gst-inspect-1.0 | grep Sink | grep Audio" " will show you which audiosinks are
|
||||
available on your system. (Replace "Audio" by "Video" to see videosinks). Some possible audiosinks are pulsesink, alsasink, osssink, oss4sink,
|
||||
@@ -449,6 +458,10 @@ devices that cannot run modern tvOS; it is probably
|
||||
not necessary for UxPlay to claim to be such an old AppleTV model.
|
||||
|
||||
# ChangeLog
|
||||
1.46 2022-01-20 Restore pre-1.44 behavior, using decodebin in the video pipeline; instead, introduce new option "-avdec"
|
||||
to force software h264 decoding by libav h264, if needed (will prevent selection of vaapisink
|
||||
by autovideosink). Update llhttp to v6.0.6.
|
||||
|
||||
1.45 2022-01-10 New behavior: close video window when client requests "stop mirroring". (A new "no close" option "-nc" is added
|
||||
for users who wish to retain previous behavior that does not close the video window).
|
||||
|
||||
@@ -502,10 +515,11 @@ over to a library llhttp for http parsing.
|
||||
|
||||
3. If "`cmake -DZOOMFIX=ON .`" is run before compiling,
|
||||
the mirrored window is now visible to screen-sharing applications such as
|
||||
Zoom. To compile with ZOOMFIX=ON, the X11 development libraries must be installed.
|
||||
(ZOOMFIX will not be needed once the upcoming gstreamer-1.20 is available,
|
||||
Zoom. (This applies only to X11 windows produced by videosinks ``ximagesink`` and ``xvimagesink``, which are often
|
||||
selected by default.) To compile with ZOOMFIX=ON, the X11 development libraries must be installed.
|
||||
_(ZOOMFIX will not be needed once the upcoming gstreamer-1.20 is available,
|
||||
since starting with that release, the GStreamer X11 mirror window will be natively
|
||||
visible for screen-sharing.) Thanks to David Ventura
|
||||
visible for screen-sharing, but it make take some time for distributions to supply this version.)_ Thanks to David Ventura
|
||||
https://github.com/DavidVentura/UxPlay for the fix
|
||||
and also for getting it into gstreamer-1.20.
|
||||
[If uxplay was compiled after
|
||||
|
||||
61
README.txt
61
README.txt
@@ -1,4 +1,4 @@
|
||||
UxPlay 1.45: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
|
||||
UxPlay 1.46: AirPlay/AirPlay-Mirror server for Linux, macOS, and Unix.
|
||||
======================================================================
|
||||
|
||||
Highlights:
|
||||
@@ -128,8 +128,8 @@ downloads, "UxPlay" for "git clone" downloads), then do
|
||||
2. `sudo apt-get install libavahi-compat-libdnssd-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-plugins-bad`
|
||||
3. `sudo apt-get install gstreamer1.0-vaapi` (For hardware-accelerated
|
||||
Intel graphics, but not NVIDIA)
|
||||
4. `sudo apt-get install libx11-dev` (for the "ZOOMFIX" X11\_display
|
||||
name fix for screen-sharing with e.g., ZOOM)
|
||||
4. `sudo apt-get install libx11-dev` (only needed if you invoke the
|
||||
"ZOOMFIX" X11 display-name fix in the next step)
|
||||
5. `cmake .` (or "`cmake -DZOOMFIX=ON .`" to get a screen-sharing fix
|
||||
to make X11 mirror display windows visible to screen-sharing
|
||||
applications such as Zoom, see [Improvements](#improvements) \#3
|
||||
@@ -405,6 +405,11 @@ 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.
|
||||
|
||||
**-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.
|
||||
|
||||
**-as *audiosink*** 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
|
||||
@@ -471,15 +476,19 @@ use "uxplay -p").
|
||||
|
||||
### 3. Problems *after* the client-server connection has been made:
|
||||
|
||||
For such problems, use "uxplay -d" (debug log option) to see what is
|
||||
happening: it will show how far the connection process gets before the
|
||||
failure occurs. You can compare your debug output to that from a
|
||||
successful start of UxPlay in the [UxPlay
|
||||
If you do *not* see the message `raop_rtp_mirror starting mirroring`,
|
||||
something went wrong before the client-server negociations were
|
||||
finished. For such problems, use "uxplay -d" (debug log option) to see
|
||||
what is happening: it will show how far the connection process gets
|
||||
before the failure occurs. You can compare your debug output to that
|
||||
from a successful start of UxPlay in the [UxPlay
|
||||
Wiki](https://github.com/FDH2/UxPlay/wiki).
|
||||
|
||||
**Most of such problems are due to a GStreamer plugin that doesn't work
|
||||
on your system**: (by default, GStreamer uses the "autovideosink"
|
||||
algorithm to guess what is the "best" plugin to use on your system).
|
||||
**If UxPlay reports that mirroring started, but you get no video or
|
||||
audio, the problem is probably from a GStreamer plugin that doesn't work
|
||||
on your system** (by default, GStreamer uses the "autovideosink" and
|
||||
"autoaudiosink" algorithms to guess what are the "best" plugins to use
|
||||
on your system).
|
||||
|
||||
Sometimes "autovideosink" may select the OpenGL renderer "glimagesink"
|
||||
which may not work correctly on your system. Try the options "-vs
|
||||
@@ -487,17 +496,25 @@ ximagesink" or "-vs xvimagesink" to see if using one of these fixes the
|
||||
problem.
|
||||
|
||||
Other reported problems are connected to the GStreamer VAAPI plugin (for
|
||||
hardware-accelerated Intel graphics, but not NVIDIA or AMD graphics).
|
||||
Your next attempt to resolve a problem should be to find out if the
|
||||
gstreamer1.0-vaapi plugin is installed, and if so, uninstall it. (If
|
||||
this does not fix the problem, you can reinstall it.)
|
||||
hardware-accelerated Intel graphics, but not NVIDIA graphics). Use the
|
||||
option "-avdec" to force software h264 video decoding: this should
|
||||
prevent autovideosink from selecting the vaapisink videosink.
|
||||
Alternatively, find out if the gstreamer1.0-vaapi plugin is installed,
|
||||
and if so, uninstall it. (If this does not fix the problem, you can
|
||||
reinstall it.)
|
||||
|
||||
There are some reports of other GStreamer problems with
|
||||
hardware-accelerated Intel graphics. One user (on Debian) solved this
|
||||
hardware-accelerated Intel HD graphics. One user (on Debian) solved this
|
||||
with "sudo apt install intel-media-va-driver-non-free". This is a driver
|
||||
for 8'th (or later) generation \"\*-lake\" Intel chips, that seems to be
|
||||
related to VAAPI accelerated graphics.
|
||||
|
||||
If you *do* have Intel HD graphics, and have installed the vaapi plugin,
|
||||
but `-vs vaapisink` does not work, check that vaapi is not "blacklisted"
|
||||
in your GStreamer installation: run `gst-inspect-1.0 vaapi`, if this
|
||||
reports `0 features`, you need to `export GST_VAAPI_ALL_DRIVERS=1`
|
||||
before running uxplay, or set this in the default environment.
|
||||
|
||||
You can try to fix audio problems by using the "-as *audiosink*" option
|
||||
to choose the GStreamer audiosink , rather than have autoaudiosink pick
|
||||
one for you. The command "gst-inspect-1.0 \| grep Sink \| grep Audio" \"
|
||||
@@ -570,6 +587,11 @@ to be such an old AppleTV model.
|
||||
ChangeLog
|
||||
=========
|
||||
|
||||
1.46 2022-01-20 Restore pre-1.44 behavior, using decodebin in the video
|
||||
pipeline; instead, introduce new option "-avdec" to force software h264
|
||||
decoding by libav h264, if needed (will prevent selection of vaapisink
|
||||
by autovideosink). Update llhttp to v6.0.6.
|
||||
|
||||
1.45 2022-01-10 New behavior: close video window when client requests
|
||||
"stop mirroring". (A new "no close" option "-nc" is added for users who
|
||||
wish to retain previous behavior that does not close the video window).
|
||||
@@ -635,11 +657,14 @@ Improvements
|
||||
|
||||
3. If "`cmake -DZOOMFIX=ON .`" is run before compiling, the mirrored
|
||||
window is now visible to screen-sharing applications such as Zoom.
|
||||
To compile with ZOOMFIX=ON, the X11 development libraries must be
|
||||
installed. (ZOOMFIX will not be needed once the upcoming
|
||||
(This applies only to X11 windows produced by videosinks
|
||||
`ximagesink` and `xvimagesink`, which are often selected by
|
||||
default.) To compile with ZOOMFIX=ON, the X11 development libraries
|
||||
must be installed. *(ZOOMFIX will not be needed once the upcoming
|
||||
gstreamer-1.20 is available, since starting with that release, the
|
||||
GStreamer X11 mirror window will be natively visible for
|
||||
screen-sharing.) Thanks to David Ventura
|
||||
screen-sharing, but it make take some time for distributions to
|
||||
supply this version.)* Thanks to David Ventura
|
||||
https://github.com/DavidVentura/UxPlay for the fix and also for
|
||||
getting it into gstreamer-1.20. \[If uxplay was compiled after cmake
|
||||
was run without -DZOOMFIX=ON, and your gstreamer version is older
|
||||
|
||||
@@ -45,7 +45,7 @@ typedef enum videoflip_e {
|
||||
|
||||
typedef struct video_renderer_s video_renderer_t;
|
||||
|
||||
void video_renderer_init (logger_t *logger, const char *server_name, videoflip_t videoflip[2], const char *videosink);
|
||||
void video_renderer_init (logger_t *logger, const char *server_name, videoflip_t videoflip[2], const char *decoder, const char *videosink);
|
||||
void video_renderer_start ();
|
||||
void video_renderer_stop ();
|
||||
void video_renderer_render_buffer (raop_ntp_t *ntp, unsigned char* data, int data_len, uint64_t pts, int type);
|
||||
|
||||
@@ -104,7 +104,7 @@ void video_renderer_size(float *f_width_source, float *f_height_source, float *f
|
||||
logger_log(logger, LOGGER_DEBUG, "begin video stream wxh = %dx%d; source %dx%d", width, height, width_source, height_source);
|
||||
}
|
||||
|
||||
void video_renderer_init(logger_t *render_logger, const char *server_name, videoflip_t videoflip[2], const char *videosink) {
|
||||
void video_renderer_init(logger_t *render_logger, const char *server_name, videoflip_t videoflip[2], const char *decoder, const char *videosink) {
|
||||
GError *error = NULL;
|
||||
logger = render_logger;
|
||||
|
||||
@@ -120,8 +120,9 @@ void video_renderer_init(logger_t *render_logger, const char *server_name, vide
|
||||
|
||||
gst_init(NULL,NULL);
|
||||
|
||||
GString *launch = g_string_new("appsrc name=video_source stream-type=0 format=GST_FORMAT_TIME is-live=true !"
|
||||
"queue ! h264parse ! avdec_h264 ! videoconvert ! ");
|
||||
GString *launch = g_string_new("appsrc name=video_source stream-type=0 format=GST_FORMAT_TIME is-live=true ! queue ! ");
|
||||
g_string_append(launch, decoder);
|
||||
g_string_append(launch, " ! videoconvert ! ");
|
||||
append_videoflip(launch, &videoflip[0], &videoflip[1]);
|
||||
g_string_append(launch, videosink);
|
||||
g_string_append(launch, " name=video_sink sync=false");
|
||||
|
||||
6
uxplay.1
6
uxplay.1
@@ -1,11 +1,11 @@
|
||||
.TH UXPLAY "1" "January 2022" "1.45" "User Commands"
|
||||
.TH UXPLAY "1" "January 2022" "1.46" "User Commands"
|
||||
.SH NAME
|
||||
uxplay \- start AirPlay server
|
||||
.SH SYNOPSIS
|
||||
.B uxplay
|
||||
[\fI\,-n name\/\fR] [\fI\,-s wxh\/\fR] [\fI\,-p \/\fR[\fI\,n\/\fR]] [more \fI OPTIONS \/\fR ...]
|
||||
.SH DESCRIPTION
|
||||
UxPlay 1.45: An open\-source AirPlay mirroring server based on RPiPlay
|
||||
UxPlay 1.46: An open\-source AirPlay mirroring server based on RPiPlay
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B
|
||||
@@ -46,6 +46,8 @@ UxPlay 1.45: An open\-source AirPlay mirroring server based on RPiPlay
|
||||
.TP
|
||||
\fB\-vs\fR 0 Streamed audio only, with no video display window.
|
||||
.TP
|
||||
\fB\-avdec\fR Force software h264 video decoding with libav h264 decoder.
|
||||
.TP
|
||||
\fB\-as\fI sink\fR Choose the GStreamer audiosink; default "autoaudiosink"
|
||||
.IP
|
||||
choices: pulsesink,alsasink,osssink,oss4sink,osxaudiosink etc.
|
||||
|
||||
13
uxplay.cpp
13
uxplay.cpp
@@ -44,7 +44,7 @@
|
||||
#include "renderers/video_renderer.h"
|
||||
#include "renderers/audio_renderer.h"
|
||||
|
||||
#define VERSION "1.45"
|
||||
#define VERSION "1.46"
|
||||
|
||||
#define DEFAULT_NAME "UxPlay"
|
||||
#define DEFAULT_DEBUG_LOG false
|
||||
@@ -73,6 +73,7 @@ static unsigned char compression_type = 0;
|
||||
static std::string audiosink = "autoaudiosink";
|
||||
static bool use_audio = true;
|
||||
static bool previous_no_close_behavior = false;
|
||||
static std::string decoder = "decodebin";
|
||||
|
||||
gboolean connection_callback (gpointer loop){
|
||||
if (!connections_stopped) {
|
||||
@@ -205,6 +206,7 @@ static void print_info (char *name) {
|
||||
printf(" some choices: ximagesink,xvimagesink,vaapisink,glimagesink,\n");
|
||||
printf(" gtksink,waylandsink,osximagesink,fpsdisplaysink, etc.\n");
|
||||
printf("-vs 0 Streamed audio only, with no video display window\n");
|
||||
printf("-avdec Force software h264 video decoding with libav h264 decoder\n");
|
||||
printf("-as Choose the GStreamer audiosink; default \"autoaudiosink\"\n");
|
||||
printf(" choices: pulsesink,alsasink,osssink,oss4sink,osxaudiosink,etc.\n");
|
||||
printf("-as 0 (or -a) Turn audio off, streamed video only\n");
|
||||
@@ -427,6 +429,9 @@ int main (int argc, char *argv[]) {
|
||||
get_value(argv[++i], &server_timeout);
|
||||
} else if (arg == "-nc") {
|
||||
previous_no_close_behavior = true;
|
||||
} else if (arg == "-avdec") {
|
||||
decoder.erase();
|
||||
decoder = "h264parse ! avdec_h264";
|
||||
} else {
|
||||
LOGE("unknown option %s, stopping\n",argv[i]);
|
||||
exit(1);
|
||||
@@ -465,7 +470,7 @@ int main (int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
if (use_video) {
|
||||
video_renderer_init(render_logger, server_name.c_str(), videoflip, videosink.c_str());
|
||||
video_renderer_init(render_logger, server_name.c_str(), videoflip, decoder.c_str(), videosink.c_str());
|
||||
video_renderer_start();
|
||||
}
|
||||
|
||||
@@ -498,7 +503,7 @@ int main (int argc, char *argv[]) {
|
||||
LOGI("Re-launching server...");
|
||||
stop_raop_server();
|
||||
video_renderer_destroy();
|
||||
video_renderer_init(render_logger, server_name.c_str(), videoflip, videosink.c_str());
|
||||
video_renderer_init(render_logger, server_name.c_str(), videoflip, decoder.c_str(), videosink.c_str());
|
||||
video_renderer_start();
|
||||
goto relaunch;
|
||||
} else {
|
||||
@@ -535,7 +540,7 @@ extern "C" void conn_teardown(void *cls, bool *teardown_96, bool *teardown_110)
|
||||
if (*teardown_110 && !previous_no_close_behavior) {
|
||||
audio_renderer_stop();
|
||||
video_renderer_destroy();
|
||||
video_renderer_init(render_logger, server_name.c_str(), videoflip, videosink.c_str());
|
||||
video_renderer_init(render_logger, server_name.c_str(), videoflip, decoder.c_str(), videosink.c_str());
|
||||
video_renderer_start();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user