Ubuntu Linux as an Airplay "Source" / Airplay SERVER?

rwnano

Well-Known Member
Joined
Jul 21, 2022
Messages
1,027
Points
113
Location
Gurugram, Haryana, India
@mbhangui



AirPlay-Mirror and AirPlay-Audio server​


rw@rw-ThinkPad-T560:~$ uxplay
libpxbackend-1.0.so: cannot open shared object file: No such file or directory
Failed to load module: /home/rw/snap/uxplay/common/.cache/gio-modules/libgiolibproxy.so
Warning: Schema “org.gnome.system.locale” has path “/system/locale/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
g_module_open() failed for /snap/uxplay/15/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so: /snap/uxplay/15/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so: undefined symbol: rsvg_handle_get_pixbuf_and_error
UxPlay 1.72: An Open-Source AirPlay mirroring and audio-streaming server.

** (gst-plugin-scanner:109446): CRITICAL **: 22:23:17.983: _dma_fmt_to_dma_drm_fmts: assertion 'fmt != GST_VIDEO_FORMAT_UNKNOWN' failed
using system MAC address 54:ee:75:c8:0c:18
Initialized server socket(s)
*** ERROR: No DNS-SD Server found (DNSServiceRegister call returned kDNSServiceErr_Unknown)
 
uxplay -p
UxPlay 1.72: An Open-Source AirPlay mirroring and audio-streaming server.
using network ports UDP 7011 6001 6000 TCP 7100 7000 7001
using system MAC address 54:ee:75:c8:0c:18
Initialized server socket(s)
*** ERROR: No DNS-SD Server found (DNSServiceRegister call returned kDNSServiceErr_Unknown)
 
I usually stay away from snapcraft. shairport-sync provides the same functionality of turning your device into a airplay receiver.

As far as your above issue is concerned the first problem is

libpxbackend-1.0.so: cannot open shared object file: No such file or directory

Most likely your libpxbackend-1.0.so is in /usr/lib64/x86_64-linux-gnu. snap is probably expecting it in a different directory

Try this, but I'm afraid I cannot help beyond this troubleshotting ubuntu's monstrous snapcraft. Search reditt why people hate snapcraft.


Second problem is uxplay fails when it uses dns-sd. It could be related to the first problem or it could be you don't have functioning zeroconf on your ubuntu server (avahi package installed).
 
I did
sudo snap remove uxplay
then installed the APT version of uxplay
From Github link of Uxplay above:
Install uxplay on Debian-based Linux systems with "sudo apt install uxplay";

Now I have to do this:
After installation:
(On Linux and *BSD): if a firewall is active on the server hosting UxPlay, make sure the default network port (UDP 5353) for mDNS/DNS-SD queries is open (see Troubleshooting below for more details); also open three UDP and three TCP ports for Uxplay, and use the "uxplay -p <n>{=html}" option (see "man uxplay" or "uxplay -h").

Even if you install your distribution's pre-compiled uxplay binary package, you may need to read the instructions below for running UxPlay to see which of your distribution's GStreamer plugin packages you should also install.

For Audio-only mode (Apple Music, etc.) best quality is obtained with the option "uxplay -async", but there is then a 2 second latency imposed by iOS. Use option "uxplay -ca" to display any "Cover Art" that accompanies the audio.

If you are using UxPlay just to mirror the client's screen (without showing videos that need audio synchronized with video), it is best to use the option "uxplay -vsync no".

Add any UxPlay options you want to use as defaults to a startup file ~/.uxplayrc (see "man uxplay" or "uxplay -h" for format and other possible locations; the location can also be set with "uxplay -rc location"). In particular, if your system uses PipeWire audio or Wayland video systems, you may wish to add "as pipewiresink" or "vs waylandsink" as defaults to the file. (Output from terminal commands "ps waux | grep pulse" or "pactl info" will contain "pipewire" if your Linux/BSD system uses it).

For Linux systems using systemd, there is a systemd service file uxplay.service found in the UxPlay top directory of the distribution, and also installed in <DOCDIR>/uxplay/systemd/ (where DOCDIR is usually /usr/local/share/doc), that allows users to start their own instance of UxPlay as a rootless daemon: it should either be added to the directory /etc/systemd/user, or the user can just create their own systemd directory ~/.config/systemd/user/ and then copy uxplay.service into it. To save uxplay terminal output to a file ~/uxplay.log, uncomment the StandardOutput entry in uxplay.service. Then

systemctl --user [start/stop/enable/disable/status] uxplay

can be used to control the daemon. If it is enabled, the daemon will start at the user's first login and stop when they no longer have any open sessions. See https://www.baeldung.com/linux/systemd-create-user-services for more about systemd user services. If more than one user might simultaneously run uxplay this way, they should specify distinct -p and -m options (ports and deviceID) in their startup files. Note: it is NOT recommended to run UxPlay as a root service.

On Raspberry Pi: models using hardware h264 video decoding by the Broadcom GPU (models 4B and earlier) may require the uxplay option -bt709. If you use Ubuntu 22.10 or earlier, GStreamer must be patched to use hardware video decoding by the Broadcom GPU (also recommended but optional for Raspberry Pi OS (Bullseye): the patched GStreamer does not need option " -bt709`". The need for -bt709 when hardware video decoding is used seems to have reappeared starting with GStreamer-1.22.

If UxPlay is used in a public space, there are security options for requiring an AppleTV-style one-time pin (displayed on the terminal) to be entered, or a password, and for barring/permitting client access by their device ID. See options -pin, -reg, -pw, -restrict, -allow, -block.
 
rw@rw-ThinkPad-T560:~$ uxplay -p
using network ports UDP 7011 6001 6000 TCP 7100 7000 7001
using system MAC address 54:ee:75:c8:0c:18
Initialized server socket(s)
^CStopping...
rw@rw-ThinkPad-T560:~$

BTW @mbhangui Sir - the Shairport SYnc is for making Ubuntu Linux as the SINK for Airplay stream.

I am trying to make the Ubuntu Linux as the SOURCE
 
notes:
 
@mbhangui
Using Ubuntu vs a Raspbery Pi running Moode:

Is there a way to address this below?

Using an audio-focused Linux distro like Moode, Volumio etc. compared to a computer running Windows, Android or MacOS will give you better results when outputting to something like a USB DAC because there's no mixer audio stack resampling everything to a preset resolution.
 
&
the following on Ubuntu:
I use Moode and not only does it feature all the playback options I use (Spotify Connect, Airplay and local FLAC) it has CamillaDSP built in. This gives you regular 10 band EQ, Parametric EQ or full room correction using convolution files from REW.

How do I run room correction REW / or DSP for my system on my Ubuntu Macbook Pro 2010?
 
Notes for others who may read this :


Integrating Bluetooth 6.0 module Into Raspberry Pi featuring LE Audio w/ Auracast





 
Check out our special offers on Stereo Package & Bundles for all budget types.
Back
Top