Monday, August 28, 2017

LogitechMediaServer - Settings Guide

I consider the LogitechMediaServer (LMS) the best music server out there.

The LMS is the server part of a very powerful client/server audio streaming environment 
and requires a compatible streaming client, such as squeezelite





Here you might find some useful information and hints for a high performance setup.



Let's start by having a look at the client/server architecture.
You can have server and client on one machine or you can run them on separate machines. 

Separation IMO is a good thing if you're e.g. running CPU hungry DSP work, such as resampling or convolution, you're working with large collections, external drives 
and if you'd have several streaming clients attached to the network. 

You basically put the server on a rather powerful (headless server) PC and let the clients run on a small SBC (single board computer), such as the RPI. 

By having the server on a standalone server you can IMO manage and administrate such a setup more convenient. 

Beside that, if you look for quality sound, it's never been a good idea to put numerous tasks and load on the streaming client.  



Some words about the LMS package.


The whole LMS package has not much - as the name would suggest - to do with the company Logitech anymore.

Logitech shut down its audio streaming business quite a long time ago - around 2012.
They still contribute server space and a little manpower (AFAIK) to keep the server project running. Quite some contributions (maintenance/features/plugins) are still made by the community. 

The project is very much alive - in 2018!

Alternatives.
The LMS approach is IMO much more sophisticated then the widely available UPNP/DLNA or MPD based streaming solutions. Non of them is giving me satisfaction.

There are commercial solutions from e.g. Roonlabs which come with tons of features at an insane pricetag ($500 !!). These IMO do not add much value either. 
You'll find that such a product is pushed by the "old school" audiophile industry and "audiophile" users. I'd highly recommend to try LMS first!

To be honest. More and more people, including me, are using WEB streaming services for casual listening, parties, etc.. 
The streaming apps of streaming providers such as  Amazon Music, Qobuz,... on the phones are pretty sophisticated and come with tons of features. These apps are also integrated with Siri and alike.  

I basically keep using LMS and squeezelite for serious listening and my local collection 
only. For sure it'll stay like that for quite some more years.


Streaming clients.

The vast majority of LMS users out there nowadays are using DIY streaming devices (e.g. RPI) with community provided open source software packages. You'll find complete OS images you can put on SD cards. These just need a bit of configuration. 

Usually such projects are a lot of fun to build and can be accomplished even without in-depth technical knowledge. 

From an audio quality and overall performance perspective these projects can compete with commercial products - usually at a fragment of cost.

There are also quite some commercial streamers out there, which are piggybacking on community built streaming software, such as squeezelite, to get their HW going. 
And then these devices are sold at breathtaking pricetags. Great business models! 

On Android and iOS you can find commercial streaming client apps, which act as squeeze-clients and are able to stream music from an LMS server.


The Logitech HW streaming clients, such as the Squeezebox Touch, as the last group are a dying art. RIP.



There are several reasons going for LMS.

1. It's well maintained

Not any software has any value if it's not maintained and enhanced. There are many examples out there showing how it shouldn't be done.

There's still a great active community behind LMS supporting it. That's key.
That's what makes e.g. the RPI SBC such a success. Most other SBCs fail
because of lack of continuous SW support.

The SW exists for more then a decade (1. slimserver -> 2. squeezeboxsrver -> 3. LogitechMediaServer )


2. It's MultiPlatform

LMS runs basically on all major OS platforms - Windows, OSX, Linux. It'll run on PCs
as well as on ARM SBCs such as RPI, on NAS asf. 


3. It's fast and stable

Handling collections of 50k albums is not a problem - at least on appropriate HW.


4. It's extremely flexible

There are all kind of plugins available. 
It can be used for convolution, converting different file formats, routing different codecs to different devices, UPNP asf. asf.


5. It's free

    LMS is open source software



More info you'll find on the LMS Wiki.



Installation 

1. Platform

I'd recommend a Linux platform like Ubuntu. You can install Ubuntu first (also as Dual Boot system) and then LMS.

Of course Windows and OSX will also work.

Meanwhile you even have options to enable LMS on ARM e.g. PicorePlayer on RPI3. 
It works. OK. But it's not my first choice. And shouldn't be yours.
The RPI is not the best platform to handle complex tasks, huge databases, much network traffic and that  all at once (the same is valid for NAS systems).  
You'll get annoyed -  sooner or later - I promise! Been there, done that.

At least from my experience I'd say the best platform is a rather powerful Intel platform. 
Even an aged PC or Notebook will do better than a PI as server.

However. Do not  believe that MPD based standalone solutions (Moode, Rune, Volumio, DietPi) do much better than LMS+squeezelite on a PI.  

If you put too much load on a SBC/RPI nothing will work satisfactory!


2. Software package

It's not that easy to find the right LMS package for download. The packages you'll find on the official site mysqueezebox.com are outdated.

A good starting point is the official download site. There you'll find the latest officially released stable releases packaged for each and every platform. 
On that site you'll also find a subfolder called nightly
There you'll find so called latest BETA packages for download.
I use these BETAs and would also recommend to do so. I never encountered any real instabilities. Actually it's usually been the opposite. By using these nightlys you'll get bug fixes, updates and new features much earlier.

Hint:
If you run or intend to run e.g. NAS systems as LMS server, you might have to live with 
quite old LMS revisions. 
I'm pretty sure they won't offer nightlys. 
Beside that the NAS usually has processing limitations. Customization might also get a bit tricky. 
So. Better think twice if to go the NAS-as-LMS server route! 




3. Installation

It's pretty straight forward on pretty much all platforms. LMS comes with all software needed to run on each platform. 
I don't want to go deeper into that here. Most of you know how to install these installation packages. Usually you just have to double-click on the downloaded package.
There are also  numerous installation HowTos, Wikis and Youtube videos available for each and every platform.


Usually the server starts automatically after installation. 
However. A reboot will always be a nice test to see if things are starting up properly at boot.

Hint: 
Make sure you've got all your music data accessible on your OS of choice  before your start the installation.


4. Access 

Now that the server is running, its user interface needs to be accessed. 
All you need is your server IP address. 

The IP address you'll find under Windows by doing this

Under Linux or OSX, just open a terminal and type "ifconfig". 
It'll list the "inet" address.  

To access LMS from any browser connected to your home network enter below line (replace the xxx.xxx.xxx.xxx with your server IP address):

http://xxx.xxx.xxx.xxx:9000


The ":9000" is the port for accessing LMS. It's a mandatory part of the URL!




If the server is NOT up'n running or if your browser-client is not on the same LAN, 
you' won't get a connection. No GUI will pop up in the browser!  
At this point trouble shooting starts! If you need help, this is the place to go.


Hint:
If you finally managed to connect to LMS and the GUI pops up - bookmark it immediately!

Now, do the basic initial configuration. I'd recommend to just skip the mysqueezebox stage!



Finally. 

It's a good idea to store the IP address of the server on your router. This way you avoid to face ever changing IP addresses for your server.
You have to login to your router to do that configuration. Pretty much all modern routers offer this option.


Configuration


While lurking around here and there and talking to this or that person (online), I figured, quite some people seem to use LMS with its default settings.  Hmmh.
They just install the package and do some minor adjustments, such as changing the path where the music data can be found. 

And that'll be it.

It'll work. However.  Doing some more adjustments might not be the worst idea. 

I do run a setup and configuration session from time to time myself. First comes the initial setup. 
Over time there are updates, upgrades. You might  add more clients. Or you might play around with this or that.
Due to whatever reason a setting gets changed and you forget to reconfigure it properly.
ll this happened to me more than once!

A good idea is to have a configuration checklist.

Checklist !?!?

Some settings might interfere with your audio listening  experience - e.g. by getting flacs converted to MP3s without noticing, some others might cause choppy handling on your favorite control app and others might keep your server unnecessarily busy. 

Bottom line. I think it's well worth to do these checks initially and once again once in a while.
It won't take you more then 5 minutes.

Below "my way" of configuring LMS.

Note: All below UI screenshots are based on LMS 7.9.1


1.  Basic Settings







It's pretty self-explaining. Media Library naming is optional. I usually use very short folder names in the root directory .



2.  Player settings





Every player gets its own player config dialog. You'd have to do the task for all your players.

The key aspect of this stage is to disable crossfading!

Note: 
The player setting dialog for a certain player is only accessible, if that player/client is online!!!


3. My Music/ mysqueezbox.com/ Interface

I leave these 3 menus alone. 

Just to mention it: I'm not using mysqueezebox.com. It just adds more complexity.
During installation you should skip the "mysqueezebox.com" step!



4. Plugins







As you can see, I have all Plugins turned off. Most off them do not add much value to the way I'm running my system. 
The idea behind it: 
Better off, then hanging around in the background and causing unwanted and uncontrolled activities.

If I add new tracks, I just run a rescan manually.



5. Advanced - File Types







File Types section IMO is a very crucial part of the settings procedure.

I always try to send PCM streams down to my clients. 

Why is that?

That keeps decoding and conversion load off my clients first of all. 
Downside: It adds some extra load on the network.

I tested all kind of scenarios. I get along best with this. 

Note: 

If you have more then one output option per input format enabled, 
it's the streaming client which defines what format gets streamed! 
You won't necessarily be able to identify the clients priority list!

This is why you can't be 100% sure what data format arrives at your client.

If you'd e.g. run squeezelite and you'd have flac and pcm enabled as output format on LMS, squeezelite would force the server to send flac.
There are two ways to get control over this, if you'd intend to send PCM.

       1. You disable flac as output format on LMS - as seen above or
       2. You start e.g. squeezelite with option "-c pcm,flac,mp3"
           The order of the codecs listed defines their priorities. 
           If you'd run above, you could have pcm and flac enabled on LMS and
           pcm would be streamed down to the client.           


6. Advanced - Performance





All the settings are pretty self explaining. For a good user experience it is good to have a fast and high performance server in place. I tried to accomplish this with above.





7. Advanced - Software Update






To not have any further activities ongoing and/or to face interference with manually installed
LMS packages, I'd recommend to  select settings as outlined above.





NOTE:  Do not forget to push "Apply" after any change you'll make!



Summary


All above is no rocket science. Still. It shouldn't be neglected.

Every time you install, you've been upgrading the server package or you have been adding a new client, you should run that checkup. 


There a some more advanced configuration options of how to handle e.g. file conversions and decoding. 
I'm also using different startup scripts. No SystemV, I use systemd. 
I'm also using different sox and flac binary (these helper binaries as supplied by LMS are not always bleeding edge).
I might cover these advanced confurations at a later point - this would be command-line work and applies to Linux based servers only.


I hope the above can give a little guidance on how to approach LMS .


Enjoy.
  









3 comments:

  1. I noticed that you disable FLAC decoder for FLAC files, just send PCM. With your setting my Rpi with Allo Piano dac play it fine but with FLAC higher than 16/44 my Osx Sqeezeplay client gives an unsupported sample rate error, it work fine if i enable FLAC decoder. What is the difference to send PCM vs FLAC?

    ReplyDelete
    Replies
    1. If flac is converted to PCM on the server and at the same time gets upsampled on the server, squeezelite requires the "-W" option to work!
      Otherwise it'll fail!
      Native samplerate flac->pcm at up to 384kHz should work, if your DAC or the DAC driver supports it.
      Make sure you have the latest server and squeezelite installed.

      Delete
  2. Hello Klaus!
    Do you know any ways for convolution with lms besides inguz?
    thanx
    Sascha

    ReplyDelete