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

No audio coming from Shairport setup #1348

Open
gerroon opened this issue Feb 11, 2025 · 7 comments
Open

No audio coming from Shairport setup #1348

gerroon opened this issue Feb 11, 2025 · 7 comments

Comments

@gerroon
Copy link

gerroon commented Feb 11, 2025

Hi

I have Snapcast mesh that works from Debian (Server) ->Debian (client) -> Windows 11 (client) -> Android (client). I can connect my Iphone 15 to the Host via BT and play audio to all other clients. However the Shairport stream doesnt produce any audio when I connect it via the Airplay protocol.

(works)
stream = pipe:///tmp/snapfifo?name=snapcast

(no audio)
stream=airplay:////usr/bin/shairport-sync?name=snapcast&devicename=snapcast&sampleformat=44100:16:2&port=7000

Debian, Snap Server/Client 0.30, IOS 18.3 Music App Airplay

Thanks

@vjdw
Copy link
Contributor

vjdw commented Feb 11, 2025

I was just struggling with similar yesterday. Try this, it worked for me:

source = airplay:////usr/bin/shairport-sync?name=snapcast&devicename=snapcast

(I'm actually using source = airplay:///shairport-sync?name=snapcast&devicename=snapcast note 3 /// not ////)

and also after connecting the iphone adjusting the volume up seemed to be necessary sometimes, and waiting 3 or 4 seconds for it to come through (there's quite a lot of latency).

@gerroon
Copy link
Author

gerroon commented Feb 11, 2025

@vjdw Thanks, that didn't work either. I can see that Snapserver spawns Shairport fine, it shows up on my Iphone as well.

I am on Pipewire and this is my PW config, I wonder if this has something to do with it. Do I need more setup on the PW side?

Edit 1: Another thing I can think of is that, it seems like SP is run as root, since SS is running as root. Root generally cant access the user space PW. I wonder if that is the issue. But that shouldn't be an issue given Snapserver doesnt play any audio, only the client does. Somehow when I play to Shairport from my phone, I don't see the player kicking in the Pulse audio panel (I have Pulse for PW enabled)

Edit 2: I can broadcast to Shairport if I start SP as my user in the terminal with whatever defautls it has, and I can use snapcast sink to play to all clients. It seems like the issue isn't on SP side.


context.modules = [
{   name = libpipewire-module-pipe-tunnel
    args = {
        node.name="snapcast"
        tunnel.mode = sink
        #tunnel.may-pause = true
        # Set the pipe name to tunnel to
        pipe.filename = "/tmp/snapfifo"
        audio.format=S16LE
        audio.rate=48000
        #audio.channels=<number of channels>
        #audio.position=<channel map>
        #target.object=<remote target node>
        stream.props = {
            # extra sink properties
        }
    }
}
]


@vjdw
Copy link
Contributor

vjdw commented Feb 11, 2025

I'm not using Pipewire in my Snapcast pipeline so I can't really say if that config is good. I'm surprised Pipewire is involved at all though, at least on the server side, shouldn't it just be something like this?

Mobile               | Server                                                  | Client
                     |                                                         |
iPhone  --AirPlay--> | ShairPort  --/tmp/snapfifo-->  snapserver  --network--> | snapclient  -->  audio out
                     |                                                         |

@gerroon
Copy link
Author

gerroon commented Feb 11, 2025

My Snapserver and snapclient are on the same PC, so the client has to play via PW. Also I am guessing that PW is needed to capture the system wide sound (as a sink) for the Snapserver broadcasting?

@vjdw
Copy link
Contributor

vjdw commented Feb 11, 2025

Just a thought, but when I installed shairport I disabled the standalone service because the snapserver starts up its own instance. So if you haven't disabled the shairport service that could be worth trying. Otherwise you might have two of them running on different ports and your iphone could connect to the one that doesn't belong to snapserver

sudo systemctl disable shairport-sync
sudo systemctl restart snapserver # to force reset of any running shairport instance

@gerroon
Copy link
Author

gerroon commented Feb 11, 2025

Thanks for the tip but I already disabled SP so that is not an issue, like I mentioned I can play to Snapserver sink if I just manually run SP on the terminal. Somehow Snapserver isn't able to capture the sound maybe when I try to let it control SP.

@badaix
Copy link
Owner

badaix commented Feb 12, 2025

Please add logs, as asked for in the issue template, everything else is just guessing.
Maybe you're client is just not listening to the shairport stream, but to the idling pipe stream.

@badaix badaix closed this as completed Feb 12, 2025
@badaix badaix reopened this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants