mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.23k stars 573 forks source link

Using shairport-sync with Logitech Media Server on Ubuntu 14.04.1 LTS #36

Closed LoZ1974 closed 9 years ago

LoZ1974 commented 9 years ago

Hi there Mike,

I stumbled across shairport-sync whilst trying to enable airplay from my iOS device to my Logitech Media Server.

First of all I tried shairport, which I soon realised would not allow me to stream to all the devices currently managed under my LMS. I could 'see' the devices separately but could not actually play to them (not exactly sure why, but it didn't fill my requirement so I went searching again). I found your fork, but need a bit of help with configuring.

I don't want to use the 'issues' area of GitHub to post something that is, in all likelihood, a user knowledge problem. Is there a better place to get help?

Anyway, here's some detail I assume would be helpful, gleaned from reading other posts:

loz@SqueezeCenter:~/shairport-sync$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.1 LTS Release: 14.04 Codename: trusty

loz@SqueezeCenter:~/shairport-sync$ shairport-sync -vvv -t 0 & [1] 2380 loz@SqueezeCenter:~/shairport-sync$ statistics_requester status is 0. daemon status is 0. rtsp listening port is 5000. Shairport Sync player name is "Shairport Sync on SqueezeCenter". Audio Output name is "(null)". on-start action is "(null)". on-stop action is "(null)". wait-cmd status is 0. mdns backend "(null)". latency is 0. AirPlayLatency is 88200. iTunesLatency is 99400. stuffing option is "(null)". resync time is 2205. busy timeout time is 0. tolerance is 88 frames. password is "(null)". startup avahi: avahi_register. avahi: register_service.

loz@SqueezeCenter:~/shairport-sync$ /etc/init.d/shairport-sync start Daemon returned 2 as return value.

I haven't really changed anything from defaults, and I'm guessing that might be the problem!

Cheers, Loz

mikebrady commented 9 years ago

Hi Loz, and thanks for your interest in Shairport Sync.

I'm trying to visualise your situation, so please forgive me if I don't get it quite right.

If I were you, I'd build shairport-sync as suggested in the README file at https://github.com/mikebrady/shairport-sync/blob/2.2/README.md#building-and-installing. It seems pretty clear that you've done that. At the end, you'd have done sudo make install, and that would have installed the shairport-sync application, the man page and also the init script.

To launch shairport-sync via the init script you'd have to enter sudo /etc/init.d/shairport-sync start. That is, you need root permission to launch the script, and I think that accounts for the error message you got.

So, at this point, shairport-sync should be running, and it should be visible from iTunes or your iPhone on there same network. If so, that's a good milestone.

Once you've reached that milestone, you need to configure shairport-sync to display a suitable service name, to use the correct audio output device, and to use the appropriate features of the output device, as described in https://github.com/mikebrady/shairport-sync/blob/2.2/README.md#configuring-shairport-sync. There's also the man page – do man shairport-sync – that you can consult.

Let's leave the comment here for the present and let me know how you get on before going further.

LoZ1974 commented 9 years ago

Hi Mike.

Thanks for coming back to me so quickly.

So I'm with you up to and including the shairport-sync start. I think sudo was the key - apologies for the rookie mistake.

I now see "Shairport Sync on SqueezeCenter" when selecting AirPlay on my iPhone, so now I guess I need to config shairport-sync to find the correct audio output device. Which in this case is not on the server itself as it doesn't have a soundcard configured - I have it broadcasting to 3 WiFi enabled streamers: Squeezeboxes

I think the way this is supposed to happen with the original Shairport distribution is that there's a Shairtunes plugin for Logitech Media Server (backend for the Squeezebox devices):

shairtunes

I had a look over the config link you posted, and am guessing I need something along the lines of the NSLU2 examples. I'll try to fiddle around with them tomorrow.

Thanks again for helping out!

mikebrady commented 9 years ago

It good to see that you've made headway. You're right – you would need to find the correct audio output device. Shairport Sync only really works with the ALSA system, so if your audio output devices are made to appear as ALSA devices then you're in business; otherwise, I'm afraid it won't work – Shairport Sync relies on facilities provided by ALSA to do synchronisation properly.

LoZ1974 commented 9 years ago

Hey Mike,

Thanks for your help so far - I'm enough of a newb that I'm not sure whether the devices will appear as ALSA, but I'll keep digging.

I've found quite a detailed write-up describing essentially what I'm attempting to achieve, so I'll work through that. It mentions creating ALSA devices too:

http://confoundedtech.blogspot.co.uk/2012/08/airplay-to-squeezebox-touch-via-linux.html

I think, given my lack of serious Linux knowledge, it'll take me a bit of time to work through that. So please feel free to close this 'issue' off, and thanks again for your help.

mikebrady commented 9 years ago

Thanks. Feel free to reopen this to report your experiences.