Announcement

Collapse
No announcement yet.

My VB Replacement Recipe

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • My VB Replacement Recipe

    I started out buying a 1TB Vortexbox in 2009. As my collection grew I built two more VB’s myself. As support withered, I migrated to replicate a similar setup that works perfectly for my needs built completely on open-source components that is well-supported and maintained by the communities of each individual component. I am running Fedora 35 Server and can easily roll to each new version of Fedora as it gets released.

    Here are my basic components:

    Fedora 35. I use the default system admin web tool Cockpit to perform many of the admin tasks that the VB menus provided. It also provides many it didn’t – e.g. browser-based terminal, LVM tools, system logs, hardware status, etc.

    LMS – installed as a Docker container. This avoids all of the perl “version hell” issues that arise every time Fedora requires an update.

    Ripper – Also installed as a Docker container. This also eliminates legacy issues in the old VB package that will not allow it to migrate.

    Transmission and Plexmedia are clean installs.

    Subsonic – I migrated to the functionally-equivalent fork Airsonic which is supported/maintained while Subsonic is not. It’s free as well.

    Backup – I wrote my own simply Python script utilizing rsync. There are many Fedora-based backup packages and scripts out there most of which use rsync underneath the hood.

    These are the VB features that cover my needs.

    Many recommend a PiCorePlayer solution which is fine if your collection is relatively modest. Mine is 25K+ CD’s and would take days to rescan with a Raspberry Pi. I do use Pi’s running PiCorePlayer as clients, but not as servers.

  • #2
    Sounds like a cool setup. Have you ever considered writing a "how to" directions for setting this up? We could incorporate it into the next VortexBox release. Running CD ripping and LMS in a docker is a great idea. How did you get that working? Can post your docker file someplace?

    Comment


    • #3
      Here are my instructions to install and run LMS as a Docker container under Fedora:


      Installing LMS as a Docker Container under Fedora

      The following instructions are meant as a guide to installing and running LMS as a Docker container under Fedora. This has been run on Fedora 34 and Fedora 35. It may work on earlier (no longer unsupported) versions of Fedora as well if the relevant repo’s can be found but it has not been tested.


      1. Installing Docker on Fedora

      Enter the following commands:

      dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
      dnf makecache
      dnf install docker-ce
      systemctl enable docker.service
      systemctl start docker.service


      2. Installing LMS as a Docker Container

      docker pull lmscommunity/logitechmediaserver

      3. Sample Docker Run Script

      docker run -d \
      -v "/var/lib/sq_docker":"/config":rw \
      -v "/storage/music/flac":"/music":ro \
      -v "/storage/music/playlist":"/playlist":rw \
      -v "/etc/localtime":"/etc/localtime":ro \
      -p 9000:9000/tcp \
      -p 51415:9090/tcp \
      -p 3483:3483/tcp \
      -p 3483:3483/udp \
      -e PUID=<squeezeboxser uid> \
      -e PGID=<squeezeboxserver gid> \
      --restart always \
      lmscommunity/logitechmediaserver

      Here are annotations for each setting:

      -v "/var/lib/sq_docker":"/config":rw \

      The “/config” directory points to where LMS configuration and database files are kept. Depending on which version of LMS you have been running previously, the Docker container may not run with your existing “./prefs” directory, particularly with regard to the “./prefs/server.prefs” file. That is why you may wish to create an entirely new directory from scratch (i.e. “/var/lib/sq_docker”) and copy however much of the “./prefs” directory works comfortably. The “./cache” directory will get flushed and replaced so there is no point in trying to migrate it. Ditto for the “./logs” directory.


      -v "/storage/music/flac":"/music":ro

      The top of the tree of the music collection.

      -v "/storage/music/playlist":"/playlist":rw \

      The location of the playlist directory. Note – since the pathnames Docker LMS will know are NOT the same as native LMS

      - example -

      “/storage/music/flac/Beatles”
      vs
      “/music/Beatles”


      This may necessitate batch converting existing .m3u playlists to work under Docker. I’ve written a short Python program for that purpose which I will enclose at the bottom of this post.

      -v "/etc/localtime":"/etc/localtime":ro \

      Docker time management housekeeping

      -p 9000:9000/tcp \

      Keep LMS Docker container port 9000 mapped to physical port 9000

      -p 51415:9090/tcp \

      Map LMS Docker container port 9090 (the LMS CLI interface) to port 51415. This is because Fedora already allocates port 9090 to its Cockpit system administration web interface tool.

      -p 3483:3483/tcp \

      -p 3483:3483/udp \

      More LMS one-to-one port assignments

      -e PUID=<squeezeboxser uid> \

      -e PGID=<squeezeboxserver gid> \


      The User ID and the Group ID of the squeezeboxserver user need to be inserted here. To get these enter the command:

      id squeezeboxserver

      It returns something like this:

      uid=973(squeezeboxserver) gid=969(squeezeboxserver) groups=969(squeezeboxserver)


      If the “/var/lib/sq_docker” directory has been newly-created, please make sure it is owned by the squeezeboxserver user and group. Enter the following command:

      chown squeezeboxserver:squeezeboxserver /var/lib/sq_docker

      --restart always \

      Have Docker automatically restart the container whenever it dies and at bootup. You may wish to comment this line out while debugging.

      The first time Docker LMS is run it will rescan the entire collection and rebuild the database. If you have a large collection this will take a while and you may not wish this to happen before you enter/edit LMS settings. There is an easy trick to avoid this. At first bootup change the “/music” directory line to point to an empty directory, e.g.

      -v "/storage/music/empty_dir":"/music":ro

      Where “./empty_dir” is a newly-created empty directory. Once LMS is set up, change the line back to the root directory of the collection and restart the container.


      4. Sample Python Conversion Script

      The python script below will convert the pathnames in existing LMS playlists to the pathname convention in Docker. Cut and paste the code to create a file (e.g. convert_pl.py) Then

      chmod +x convert_pl.py

      To run, create a new directory and copy your existing .m3u files over. I created a subdirectory under my playlist directory named "xchg". Then within that directory copy the program and execute. After execution, check the .m3u files and if everything looks good replace the originals in the playlist directory.

      ./covert_pl.py

      Code follows


      #!/usr/bin/python
      import os, re
      #
      directory = os.listdir('/storage/music/playlist/xchg')
      os.chdir('/storage/music/playlist/xchg')
      #
      for file in directory:
      open_file = open(file,'r')
      read_file = open_file.read()
      regex = re.compile('/storage/music/flac')
      read_file = regex.sub('/music', read_file)
      write_file = open(file,'w')
      write_file.write(read_file)


      Last edited by chabelo; 04-23-2022, 07:43 PM.

      Comment


      • #4
        Originally posted by chabelo View Post
        I started out buying a 1TB Vortexbox in 2009. As my collection grew I built two more VB’s myself. As support withered, I migrated to replicate a similar setup that works perfectly for my needs built completely on open-source components that is well-supported and maintained by the communities of each individual component. I am running Fedora 35 Server and can easily roll to each new version of Fedora as it gets released.

        Here are my basic components:

        Fedora 35. I use the default system admin web tool Cockpit to perform many of the admin tasks that the VB menus provided. It also provides many it didn’t – e.g. browser-based terminal, LVM tools, system logs, hardware status, etc.

        LMS – installed as a Docker container. This avoids all of the perl “version hell” issues that arise every time Fedora requires an update.

        Ripper – Also installed as a Docker container. This also eliminates legacy issues in the old VB package that will not allow it to migrate.

        Transmission and Plexmedia are clean installs.

        Subsonic – I migrated to the functionally-equivalent fork Airsonic which is supported/maintained while Subsonic is not. It’s free as well.

        Backup – I wrote my own simply Python script utilizing rsync. There are many Fedora-based backup packages and scripts out there most of which use rsync underneath the hood.

        These are the VB features that cover my needs.

        Many recommend a PiCorePlayer solution which is fine if your collection is relatively modest. Mine is 25K+ CD’s and would take days to rescan with a Raspberry Pi. I do use Pi’s running PiCorePlayer as clients, but not as servers.
        I'm having similar adventures !!
        In my case I based my VB replacement around OpenMediaVault (OMV), also with Docker/Portainer. I found OMV is a perfect platform and there is so much online/Youtube support that everything u want to do u can find very understandable support for. Also OMV is extremely light on CPU resource and on RAM. Images are available for all platforms. OMV is very easy to configure with RAID, chron jobs etc if u need. It also has exceleltn dashboards for monitoring everything and a sophisticated SMART feature to keep you hard disks healthy. One of my installs is running on a Raspberry Pi 4 with 18TB hard drive, 110,000 tracks, 100's of movies and thousands of files (its also my NAS). I run LMS, Airsonic, Transmission, PLEX under Docker. Portainer (part of OMV) is a GUI front end for Docker and comes with one click installs for Airsonic, Transmission, PLEX etc etc. I use PicorePLayers with touchscreens as my Squeezebox Touch's. I installed libresonic and subsonic and these worked fine but are not really supported any longer so I just stick with Airsonic

        I also plan to write all this up as an install instruction manual in the coming days. Most of it is simply links to the Youtube etc instructionals

        Comment


        • #5
          I've made a start on writing up how to re-create VB under OMV. Here is the link to the MS Word documen explaining this

          https://docs.google.com/document/d/1...1597102&rtpof= true&sd=true

          I'll edit/add over time but its a good starter for now

          Cheers
          ​​​​​​​Sean

          Comment


          • #6
            Thanks, Sean!

            Your scheme sounds like a better solution for the VB faithful. I'll stick with mine because I'm completely running and up-to-speed and it serves my needs perfectly. Question though - on a Raspberry Pi 4 how long does it take for you to perform a complete library flush and rescan?

            Comment


            • #7
              For me, with a rPi4B, running piCorePlayer and LMS, it takes about 1 hour and 20 minutes to do a complete LMS rescan of my library of about 120,000 mostly FLAC files. The files are on a USB 3.0 drive attached directly to the USB 3.0 port of the rPi.

              Comment


              • #8
                Originally posted by garym View Post
                For me, with a rPi4B, running piCorePlayer and LMS, it takes about 1 hour and 20 minutes to do a complete LMS rescan of my library of about 120,000 mostly FLAC files. The files are on a USB 3.0 drive attached directly to the USB 3.0 port of the rPi.
                I have used PicorePlayer with LMS installed in the past. I used a 1TB SSD attached via USB and also attached a HiFiBerry DAC/AMP+ HAT. I set up the RasPi WiFi as an Access Point. I then used OrangeSqueeze on my Android phone to a select tracks etc by connecting my phone to the Access Point on the Pi. So, the Pi was both the LMS database, LMS controller and Player. The Amp+ is 40w or more class D if I recall. It was powered by a laptop 19v brick and it all worked OK, but was slow and and a little unreliable in terms of accessing Access Point. I can't recall how many tracks I had on it but it was a lot less than the number on my current OMV Pi based system; which now has 92,000 tracks. The Pi LMS box would take a very long time to rescan, almost an hour if I recall and with less than half the tracks on my current OMV Pi. I'll do a rescan on my Pi OMV when I get home this evening just to compare, but from memory I think its around 20 minutes for a rescan of the 92k tracks

                Comment


                • #9
                  in my case, the scanning of the library is a bit slow as noted, but once scanned, browsing the library from either a webGUI, iPeng on my iPhone/iPad, or from an old "Duet" CONTROLLER is very snappy. And never unreliable in terms of connection. Mine runs 24/7 and gets rebooted only every 3 or 4 months when I'm updating LMS or the piCorePlayer OS.

                  edit: a 'check for changed/new' scan is very fast (maybe less than 10 minutes). I rarely run a full 'clear and rescan' as when I add music, I just run the 'changed/new' scan. And to be clear, my setup is not a vortexbox replacement. I rip files with dbpoweramp on my windows computer, use mp3tag for post rip tagging, and don't use PLEX, etc. But this was all true when I used vortexbox servers for LMS as well.
                  Last edited by garym; 04-27-2022, 08:32 AM.

                  Comment


                  • #10
                    Originally posted by SeanMiddleton View Post
                    I've made a start on writing up how to re-create VB under OMV. Here is the link to the MS Word documen explaining this

                    https://docs.google.com/document/d/1...1597102&rtpof= true&sd=true

                    I'll edit/add over time but its a good starter for now

                    Cheers
                    Sean
                    Hi Sean
                    Unable to get to this document, msg indicates it's unavailable...
                    Got to step 3, then unable to run the script to config LMS
                    Thanks for your help!
                    ​​​​​​​Chris

                    Comment


                    • #11
                      Originally posted by Sully View Post

                      Hi Sean
                      Unable to get to this document, msg indicates it's unavailable...
                      Got to step 3, then unable to run the script to config LMS
                      Thanks for your help!
                      Chris
                      Apologies. This link should work for all.

                      https://docs.google.com/document/d/1...f=true&sd=true
                      Last edited by SeanMiddleton; 04-28-2022, 10:20 PM.

                      Comment


                      • #12
                        Originally posted by SeanMiddleton View Post

                        I'm having similar adventures !!
                        In my case I based my VB replacement around OpenMediaVault (OMV), also with Docker/Portainer. I found OMV is a perfect platform and there is so much online/Youtube support that everything u want to do u can find very understandable support for. Also OMV is extremely light on CPU resource and on RAM. Images are available for all platforms. OMV is very easy to configure with RAID, chron jobs etc if u need. It also has exceleltn dashboards for monitoring everything and a sophisticated SMART feature to keep you hard disks healthy. One of my installs is running on a Raspberry Pi 4 with 18TB hard drive, 110,000 tracks, 100's of movies and thousands of files (its also my NAS). I run LMS, Airsonic, Transmission, PLEX under Docker. Portainer (part of OMV) is a GUI front end for Docker and comes with one click installs for Airsonic, Transmission, PLEX etc etc. I use PicorePLayers with touchscreens as my Squeezebox Touch's. I installed libresonic and subsonic and these worked fine but are not really supported any longer so I just stick with Airsonic

                        I also plan to write all this up as an install instruction manual in the coming days. Most of it is simply links to the Youtube etc instructionals
                        I've moved on a bit since I wrote the above. I have built a few more OMV servers (set up with similar functions to Vortexbox) on Khardas VIM3, Rock Pi4C, Odroid N2+ and Raspberry Pi 4 SBC's now. All work very well but the Odroid N2+ works particularly well. Its a little faster than the others and runs very cool. Rasp Pi 4is also excellent. They are all passively cooled but the Odroid comes with an integral heatsink. The Rock Pi 4C is still a little bit buggy because its very new and the Armbian OS isnt completely sorted yet (but it runs well). If you are into low power consumption, small form factor Vortexbox equivalents I encourage you to have a play. Easily supports 18TB hard drives and 100k+ tracks, movies streaming , Transmission, NAS etc
                        Last edited by SeanMiddleton; 06-13-2022, 11:59 PM.

                        Comment

                        Working...
                        X