Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 3 123 LastLast
Results 1 to 10 of 29
  1. #1
    Member
    Join Date
    Oct 2017
    Location
    Italy
    Posts
    41

    [FreeBSD/XigmaNAS/TrueNAS] LogitechMediaServer Installation

    Hi!

    A while ago I've written a guide to compile and install LMS on *BSD based systems (here).
    But compiling everything for every update is quite tedious, the port of LMS in FreeBSD is broken and not updated and there is no package available to install.
    So I decided to make an installer/update for LogitechMediaServer to make all the procedure easy and without wasting time every time that an update comes out.

    The Perl installation is contained in LMS and separated from the system Perl, this is necessary to avoid malfunctioning every time that the system Perl is updated.
    All the Perl modules and the binaries included are usually the latest version, more updated than the official repository (here my fork)

    To install (as root):

    Code:
    pkg install curl
    curl -A "audiodigitale" -o /usr/local/bin/lms_installer https://audiodigitale.eu/repo/freebsd/lms_installer
    chmod +x /usr/local/bin/lms_installer
    lms_installer
    I usually update the installed version every time a major feature (or fix) becomes available in the stable branch of LMS. I've been maintaining the installer since the beginning of 2019.

    To report bugs write here in the thread or at info@audiodigitale.eu

    Installer Changelog:

    Code:
    (ALPHA) 18/10/2019. slimserver commit 8a9e9fb, vendor commit 8b05092. First release of installer software, tested on FreeBSD/FreeNAS >= 11 
    (ALPHA)22/10/2019. installer update to fix some bugs 
    (ALPHA) 14/12/2019. installer update to support FreeBSD 12.1-RELEASE
    (BETA) 09/01/2020. First beta released. Installer can now auto-update itself
    (BETA) 24/01/2020. Software completely rewritten in c++. Added option to choose what version of lms install.
    (STABLE) 27/06/2020. Fixed a security bug
    (STABLE) 06/07/2020. using upsampling SoX requires libogg and libiconv which are not downloaded by the installer. Fixed
    (STABLE) 23/10/2020. Update to match funcionalitites needed with the corresponding lms update.
    (STABLE) 08/02/2021. Uninstall fixes. Dependencies download fixes.
    (STABLE) 21/08/2021. Added gettext-runtime as dependecy to download
    Logitech Media Server changelog:
    Code:
    (BETA) 09/01/2020. slimserver-vendor commit 8b05092. slimserver commit 8d85ddd
    (BETA) 21/01/2020 updated to LMS 7.9.3 slimserver commit 4f7c9f49
    (STABLE-7.9.3) 24/01/2020. updated to version 1579448956
    (BETA-8.0.0) 24/01/2020. added version 1579786032
    (STABLE-7.9.3) 20/03/2020. updated to version 1582867832
    (BETA-8.0.0) 20/03/2020. updated to version 1584422335
    (BETA-8.0.0) 07/06/2020. updated to version 1591161678
    (BETA-8.0.0) 31/08/2020. updated to version 1598791476. Updated binaries
    (STABLE-7.9.4) 31/08/2020. updated to version 1598243812. Updated binaries
    (STABLE-8.0.0) 23/10/2020. update to include wavpack dsd. I decide to detach from the official slimserver-vendor repository, updating all the modules and compiling a local perl which will be shipped with LMS, this is necessary to avoid perl incompatibility issues. Support for FreeBSD 11 dropped. Support for lms 7.9.3 dropped.
    (STABLE-8.1.2) 08/02/2021. Updated all the CPAN modules. Fixed a bug which cause a memory leak when transcoding
    (STABLE-8.1.2) 12/08/2021. Binaries update. Fixed ALAC transcoding
    (STABLE-8.2.1) 21/08/2021. Update to 8.2.1
    (STABLE-8.2.1) 02/09/2021. Perl updated to 5.34. CPAN modules updated.
    (STABLE-8.2.1) 01/10/2021. LMS update. Update IO-Socket-SSL and Audio-Scan libraries.
    Last edited by Simonef; 2021-10-02 at 07:56.

  2. #2
    Senior Member sfraser's Avatar
    Join Date
    Oct 2005
    Posts
    266
    Quote Originally Posted by Simonef View Post
    Hi!

    A while ago I've written a guide to compile and install LMS on *BSD based systems (here).
    But compiling everything for every update is quite tedious, the port of LMS in FreeBSD is broken and not updated and there is no package available to install.
    So I decided to make an installer/update for LogitechMediaServer to make all the procedure easy and without wasting time every time that an update comes out.

    The Perl installation is contained in LMS and separated from the system Perl, this is necessary to avoid malfunctioning every time that the system Perl is updated.
    All the Perl modules and the binaries included are usually the latest version, more updated than the official repository (here my fork)

    To install (as root):

    Code:
    pkg install curl
    curl -A "audiodigitale" -o /usr/local/bin/lms_installer https://audiodigitale.eu/repo/freebsd/lms_installer
    chmod +x /usr/local/bin/lms_installer
    lms_installer
    I usually update the installed version every time a major feature (or fix) becomes available in the stable branch of LMS. I've been maintaining the installer since the beginning of 2019.

    To report bugs write here in the thread or at info@audiodigitale.eu





    Been trying to get this working on FreeNAS/FreeBSD for years. Got it working today thanks to you . In the late great words of Gord Downie of the Tragically Hip: "I looked up to the Lord above and said hey man! Thanks!"
    Home Office
    SB2->Benchmark DAC-1-> Bryston P-25, preamp -> Carver M1.0t Amp->PMC TB2
    Home Theater System#1
    SB2->Anthem AVM60->Bryston 9B ST -> PSB Stratus Goldi
    /Home Theater System #2/ LazyEye Bar
    Pi3 w/7" screen/HiFiBerry DAC>Outlaw 976-> Bryston 3B ->Klipsch La Scala's, 2x Bryston 4B (mono) EV 18" subwoofers
    Bedroom System
    SB2-> Sony BoomBox
    Rear Deck/Patio
    Pi3 HiFiBerry DAC --> Crown XLS 1500-> PSB Mini's,
    Kitchen
    Pi3 HifiBerry DAC --> Crown XLS 2502-> Polk Ceiling Speakers

  3. #3
    Member
    Join Date
    Oct 2017
    Location
    Italy
    Posts
    41
    Quote Originally Posted by sfraser View Post
    Been trying to get this working on FreeNAS/FreeBSD for years. Got it working today thanks to you . In the late great words of Gord Downie of the Tragically Hip: "I looked up to the Lord above and said hey man! Thanks!"
    I perfectly know how much a pain could be to make it work by doing everything by yourself, I did It for a lot of time. Then I remembered some wise words from my IT teacher "If you have to do a thing more than once, automate It!"
    Thanks for the feedback!

  4. #4

    Trickiness around LMS-specific version of faad2

    Hello Simone,

    Thank you very much for your helpful Wiki page, Logitech Media Server and FreeBSD/FreeNAS.

    It enabled my husband and me to get LMS up and happy on our spanking new TrueNAS server under FreeBSD 12.

    Everything worked so well, I was surprised when one of my Albums simply would not play. After about half a day of reading code, searching forums, and head scratching, we discovered the root cause:

    The Album was encoded in Apple ALAC format.

    There is a transcoding rule to deal with this, which sends the m4a file through faad and then through sox to create a stream that will play.

    However, the instructions you provide assume installing the latest and greatest faad will do the right thing. Alas, in 2016, a critical change was made to version 2.7 of faad2 that added ALAC support. A subsequent rewrite to the upstream version of faad never took that change, and made re-integrating that change not at all obvious.

    To those like mherger who know LMS backwards and forwards inside and outside, it's obvous, "We have our own version of faad, and it does the right thing." Learning that from swimming around in Forums and google searches is a challenge.

    Indeed, one could do a different transcoding setup using ffmpeg. The downside to doing so in that way is that ffmpeg wants to bring in elephantine quantities of other libraries. So using faad and adding in support specific to ALAC makes sense.

    I'm coming at this from the outside, and have only a partial understanding of the milieu. However, it seems to me that we should engage certain other maintainers with the following issues:

    1. Update the instructions at Logitech Media Server and FreeBSD/FreeNAS to utilize Ralph Irving's ALAC-aware fork of faad2.
    2. Reach out to the maintainers of the FreeBSD port, https://www.freshports.org/audio/logitechmediaserver/ and let them know they need to either incorporate or point to the ALAC-aware fork of faad2.
    3. Review the ALAC update to faad2 and see if getting it into upstream v2.10 is feasible, sensible so we could, longer term, eliminate the LMS-specific version. This probably involves outreach to Ralph Irving and his fork at https://github.com/ralph-irving/faad2
    4. Maybe begin discussing how to get an easier summary of current state of ports than "swim around half a day in google and forums.slimdevices". With the shift to community support, marking all the legacy wiki pages read only makes sense, as does the approach of keeping the forums as the basis of ground truth. Unfortunately, the amount of data to digest is huge.

    As the first action step, Simone, would you agree that changing the instructions to point at ralph-irvings's ALAC-aware fork of faad2 in your page makes sense?

    Oh and one more thing... (Thinking of Steve Jobs saying so, and how such a preface leads into big stuff...)

    The current stable version of LMS has moved from 8.1.2 to 8.2, so some sort of refresh is apropos. The FreeBSD port mentions 7.9.2 as its basis.
    LMS 7.9 - 2xSB2, 2xBoom, 2xKodi, Ocean Digital WR2300S, Denon AVR-X6200W, SHIELD Android TV

  5. #5
    Member
    Join Date
    Oct 2017
    Location
    Italy
    Posts
    41
    Quote Originally Posted by wcattey View Post
    Hello Simone,

    Thank you very much for your helpful Wiki page, Logitech Media Server and FreeBSD/FreeNAS.

    It enabled my husband and me to get LMS up and happy on our spanking new TrueNAS server under FreeBSD 12.

    Everything worked so well, I was surprised when one of my Albums simply would not play. After about half a day of reading code, searching forums, and head scratching, we discovered the root cause:

    The Album was encoded in Apple ALAC format.

    There is a transcoding rule to deal with this, which sends the m4a file through faad and then through sox to create a stream that will play.

    However, the instructions you provide assume installing the latest and greatest faad will do the right thing. Alas, in 2016, a critical change was made to version 2.7 of faad2 that added ALAC support. A subsequent rewrite to the upstream version of faad never took that change, and made re-integrating that change not at all obvious.

    To those like mherger who know LMS backwards and forwards inside and outside, it's obvous, "We have our own version of faad, and it does the right thing." Learning that from swimming around in Forums and google searches is a challenge.

    Indeed, one could do a different transcoding setup using ffmpeg. The downside to doing so in that way is that ffmpeg wants to bring in elephantine quantities of other libraries. So using faad and adding in support specific to ALAC makes sense.

    I'm coming at this from the outside, and have only a partial understanding of the milieu. However, it seems to me that we should engage certain other maintainers with the following issues:

    1. Update the instructions at Logitech Media Server and FreeBSD/FreeNAS to utilize Ralph Irving's ALAC-aware fork of faad2.
    2. Reach out to the maintainers of the FreeBSD port, https://www.freshports.org/audio/logitechmediaserver/ and let them know they need to either incorporate or point to the ALAC-aware fork of faad2.
    3. Review the ALAC update to faad2 and see if getting it into upstream v2.10 is feasible, sensible so we could, longer term, eliminate the LMS-specific version. This probably involves outreach to Ralph Irving and his fork at https://github.com/ralph-irving/faad2
    4. Maybe begin discussing how to get an easier summary of current state of ports than "swim around half a day in google and forums.slimdevices". With the shift to community support, marking all the legacy wiki pages read only makes sense, as does the approach of keeping the forums as the basis of ground truth. Unfortunately, the amount of data to digest is huge.

    As the first action step, Simone, would you agree that changing the instructions to point at ralph-irvings's ALAC-aware fork of faad2 in your page makes sense?

    Oh and one more thing... (Thinking of Steve Jobs saying so, and how such a preface leads into big stuff...)

    The current stable version of LMS has moved from 8.1.2 to 8.2, so some sort of refresh is apropos. The FreeBSD port mentions 7.9.2 as its basis.
    Hi wcattey, before answering to all your questions which method of installation have you used? In the guide I expose 3 methods

  6. #6

    It was the truenas plugin we used.

    Hello Simone,

    I learned from my husband what exactly was done to install LMS. He used the pre-packaged plugin with the TrueNAS 12.2 Release.

    I found the dev tree at the ix-plugin-hub on github. The checkin to Add Logitech Media Server to 12.2-RELEASE shows what the issue is:

    In logitechmediaserver.json, in the "pkgs" section, we see, "faad2" which is installing the faad2 package from the FreeBSD package repository, (which presumes the latest and greatest upstream version is canon) instead of a fork of faad2 that has the ALAC support.

    That manifest also seems to grab the FreeBSD Perl5 system, which has proven problematic. I see a comment of 26 March 2018 on your instructional page talking about how to lock in the known good Perl version.

    Do we need to work with titou386 to get these versions cooked into to the distributed plugin?

    -Bill
    LMS 7.9 - 2xSB2, 2xBoom, 2xKodi, Ocean Digital WR2300S, Denon AVR-X6200W, SHIELD Android TV

  7. #7
    Member
    Join Date
    Oct 2017
    Location
    Italy
    Posts
    41
    Quote Originally Posted by wcattey View Post
    Hello Simone,

    I learned from my husband what exactly was done to install LMS. He used the pre-packaged plugin with the TrueNAS 12.2 Release.

    I found the dev tree at the ix-plugin-hub on github. The checkin to Add Logitech Media Server to 12.2-RELEASE shows what the issue is:

    In logitechmediaserver.json, in the "pkgs" section, we see, "faad2" which is installing the faad2 package from the FreeBSD package repository, (which presumes the latest and greatest upstream version is canon) instead of a fork of faad2 that has the ALAC support.

    That manifest also seems to grab the FreeBSD Perl5 system, which has proven problematic. I see a comment of 26 March 2018 on your instructional page talking about how to lock in the known good Perl version.

    Do we need to work with titou386 to get these versions cooked into to the distributed plugin?

    -Bill
    - Thanks for reporting the bug about ALAC file transcoding. It will be fixed in the next update (ETA ~ before the 15th). The next one will be the upgrade from 8.1 to 8.2.
    - About ports: they have always been broken or severely outdated. Even when working they are still a very time consuming a fragile way to install a software. So my personal suggestion about the "current state of ports" is to just do not use them.
    - the FreeBSD perl5 version is not the real problem. The problem is that if the system-wide perl gets an update and LMS doesn't support it then LMS stops working. This is why to build a local version of perl to use with LMS and leave the system-wide for everything else.
    - I've looked on the manifest you linked me, he seems to also take a lot of perl modules that are already included in the LMS installation (slimserver-vendor repository) and the generic binaries for transcoding instead of compiling them statically linked with the options currently used for LMS. (again, available on the slimserver-vendor repository).
    - About working with titou386: it's up to you, I don't use FreeNAS and I won't develop custom solution for FreeNAS only

  8. #8
    Hello Simone,

    Thank you for the additional clarification.

    I am going to reach out to titou386, and see if I can get him to produce a better plug-in package for TrueNAS. I totally agree that it should not fall to you to create such a one-off.

    I had originally believed that titou386 had been following your build instructions to build and package logitechmediaserver.

    Since you say:

    he seems to also take a lot of perl modules that are already included in the LMS installation (slimserver-vendor repository) and the generic binaries for transcoding instead of compiling them statically linked with the options currently used for LMS. (again, available on the slimserver-vendor repository).
    He must have made his own path through the maze.

    Am I understanding that comment and your instructions correctly if I were to say to titou386:

    1. You need to bring in the CPAN subdirectory from https://github.com/Logitech/slimserver-vendor instead of using generic Perl packages because there are dependencies that will make logitechmediaserver quit working if you update Perl.
    2. You need to bring in, compile, and statically link particular local versions of helper utilities and libraries, also from https://github.com/Logitech/slimserver-vendor. To wit: flac, faad, wavpack. The known good compile/link options can be found at https://audiodigitale.eu/?p=87


    Note that your build from source instructions refer to: https://github.com/Logitech/slimserv...rchive/public/...

    There is no longer an "archive" subdirectory of slimserver-vendor, and the faad tree there has a README that sends people to https://github.com/ralph-irving/faad2

    Stuff is starting to spread out, and it is a growing challenge to chase down to the correct canonical versions.

    Indeed, as I'm composing this reply and requesting a sanity check I see that https://github.com/Logitech/slimserver-vendor contains
    alac_decoder, shine, and sox in addition to the trees you call for in your instructions.

    Do we still need the forked versions of shine and sox?

    Is alac_decoder deprecated in favor of the fork of faad2, or is it a stand-alone transcode utility that obviates need for the forked faad?

    If you can answer these questions, that would be great, but if you can't, I understand.
    LMS 7.9 - 2xSB2, 2xBoom, 2xKodi, Ocean Digital WR2300S, Denon AVR-X6200W, SHIELD Android TV

  9. #9
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,936
    Quote Originally Posted by wcattey View Post
    Indeed, as I'm composing this reply and requesting a sanity check I see that https://github.com/Logitech/slimserver-vendor contains
    alac_decoder, shine, and sox in addition to the trees you call for in your instructions.

    Do we still need the forked versions of shine and sox?
    Shine - No
    Sox - Yes

    Quote Originally Posted by wcattey View Post
    Is alac_decoder deprecated in favor of the fork of faad2, or is it a stand-alone transcode utility that obviates need for the forked faad?
    alac_decoder - Not used.
    forked faad2 - Yes. It provides the alac support, reading from stdin and the ability to start a track at any point in the song.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

  10. #10
    Member
    Join Date
    Oct 2017
    Location
    Italy
    Posts
    41
    Quote Originally Posted by wcattey
    You need to bring in the CPAN subdirectory from https://github.com/Logitech/slimserver-vendor instead of using generic Perl packages because there are dependencies that will make logitechmediaserver quit working if you update Perl.
    You need to bring in, compile, and statically link particular local versions of helper utilities and libraries, also from https://github.com/Logitech/slimserver-vendor. To wit: flac, faad, wavpack. The known good compile/link options can be found at https://audiodigitale.eu/?p=87
    Correct

    Quote Originally Posted by wcattey
    Note that your build from source instructions refer to: https://github.com/Logitech/slimserv...rchive/public/...

    There is no longer an "archive" subdirectory of slimserver-vendor, and the faad tree there has a README that sends people to https://github.com/ralph-irving/faad2

    Stuff is starting to spread out, and it is a growing challenge to chase down to the correct canonical versions.
    The slimserver vendor repository contains all the perl modules and the binaries.
    At the moment all the perl modules in the official repository are following the philosophy ""if it works don't touch it".
    While sometimes this may work I don't really share this pov. Because when something will start to not work anymore, since it will be severly outdated, it will be a real pain to fix it. Due to this a made a fork here https://github.com/simonefil/slimserver-vendor and updated pretty much all the perl modules used by LMS (and, Q.E.D., it has been a real pain).
    In the next days I will update also the source for the binaries used, faad2 included. (Both on github and in the FreeBSD package)

    For a very quick fix while I work on the update, to be able to listen to ALAC files you just need to edit the conver.conf files and change the transcoding lines for ALAC in this way:

    For alac -> wav

    Code:
    alc pcm * *
    	# FT:{START=-j %s}U:{END=-e %u}
    	[alac] $FILE$
    for alac -> mp3

    Code:
    alc mp3 * *
    	# FB:{BITRATE=--abr %B}D:{RESAMPLE=--resample %D}T:{START=-j %s}U:{END=-e %u}
    	[alac] $FILE$ | [lame] --silent -q $QUALITY$ $RESAMPLE$ $BITRATE$ - -
    for alac -> flac

    Code:
    alc flc * *
    	# FT:{START=-j %s}U:{END=-e %u}D:{RESAMPLE=-r %d}
    	[alac] $FILE$ | [sox] -q -t wav - -t flac -C 0 $RESAMPLE$ -

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •