Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update shairport-sync binary to publish to pipe/stdout for snapcast server #4470

Closed
foxy82 opened this issue Jun 5, 2021 · 7 comments · Fixed by #5804
Closed

Update shairport-sync binary to publish to pipe/stdout for snapcast server #4470

foxy82 opened this issue Jun 5, 2021 · 7 comments · Fixed by #5804

Comments

@foxy82
Copy link

foxy82 commented Jun 5, 2021

Creating a feature request

Is your feature request related to a problem? Please describe:

snapcast server wants shairport to publish audio to a pipe/stdout however that doens't look like it is available:

2021-06-05 11-24-59.350 [Info] (AirplayStream) (MyAirport) fatal error: Invalid audio backend "stdout" selected!

Describe the solution you'd like:

Add the following options to the compilation of shairport-sync:

--with-stdout
--with-pipe

@MichaIng
Copy link
Owner

MichaIng commented Jun 5, 2021

As Shairport Sync runs as systemd unit, stdout is done to the journal and contains startup and operational logs. Not sure how Snapcast would read an audio stream from Shairport Sync STDOUT in general, if not by redirecting it to a file, FIFO, socket, or such, so I think pipe is what we want here, which seems to work like the MPD FIFO and allows to cleanly separate process/daemon operational output from the audio stream.

I just updated the Shairport Sync packages some days ago, so it might take a while, e.g. to include the next upstream version upgrade or so.

@foxy82
Copy link
Author

foxy82 commented Jun 5, 2021

Snapcast spins up it's own copy of airport sync so will be running inside the snapcast process - I guess this is how it uses stdout.

I'll see if I can build my own in the meantime I'll try with just pipe to start with and if that is enough we can just use that.

@foxy82
Copy link
Author

foxy82 commented Jun 5, 2021

I've just tried this and it is in fact --with-stdout that we need.

I used this config line locally:

./configure --sysconfdir=/etc --with-alsa --with-soxr --with-avahi --with-ssl=openssl --with-systemd --with-metadata --with-stdout

@MichaIng what are the parameters you use when compiling?

@MichaIng
Copy link
Owner

MichaIng commented Jun 6, 2021

Currently:

--with-alsa --with-avahi --with-ssl=openssl --with-soxr --with-metadata --with-systemd --with-dbus-interface --with-mpris-interface --with-mqtt-client

Okay if Snapcast spins up an own Shairport Sync process, than this makes sense, and looks actually elegant. The only problem then is that our system service is then obsolete and might block the same network port. When when setting it up that way, the system service needs to be excluded from dietpi-services control. We need to add a include and exclude commands to the dietpi-services CLI to make this easier than navigating through the whiptail menus: dietpi-services exclude shairport-sync

@samaero
Copy link

samaero commented Apr 28, 2022

Hi there, wondering if there was any progress integrating this into dietpi? Looks like the only available backend for the bundled shairport-sync in v8.3.1 is still alsa.

@Joulinar
Copy link
Collaborator

not 100% same but there is a request on our forum to update the package to a specific version to support Airplay 2 https://dietpi.com/phpbb/viewtopic.php?t=10362

@MichaIng MichaIng added this to the v8.5 milestone May 10, 2022
@MichaIng MichaIng modified the milestones: v8.5, v8.6 May 28, 2022
@MichaIng MichaIng modified the milestones: v8.6, v8.7 Jul 2, 2022
@MichaIng MichaIng modified the milestones: v8.7, v8.8 Jul 31, 2022
@MichaIng MichaIng modified the milestones: v8.8, v8.9 Aug 29, 2022
@MichaIng MichaIng modified the milestones: v8.9, v8.10 Sep 24, 2022
@MichaIng MichaIng added Enhancement 💨 Solution available 🥂 Definite solution has been done labels Oct 15, 2022
@MichaIng
Copy link
Owner

New packages are available with pipe and stdout backend support added:

dietpi-software reinstall 37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants