MusicIP headless on Linux
Headless MusicIP Mixer on Linux
MusicIP Mixer (MIP) (formerly known as MusicMagic) versions 1.5 and higher can run in headless mode on Linux servers. This is helpful since the GUI is unnecessary with a Squeezebox and servers without X cannot run the Java-based GUI.
Step 0 - Assumption
- A computer capable of running a GUI version of MIP (for off-server analysis)
- The music folder is shared and writeable by the computer running the GUI
- Registered version of MIP - Predixis' licensing policy is generous for the one-time fee of $20.
Step 1 - Planning
Home servers are typically underpowered compared to in-use desktops. It's not uncommon for an older desktop of the Pentium III or early Athlon vintage to be converted into an all-purpose file/proxy/DNS/Slim/etc server when it's retired from active desktop duty.
If this describes your situation running the music analysis via the GUI on a desktop (Windows, Linux, or Mac) is recommended. Those with quad Opteron servers may go to step 4.
Step 2 - Download, Install, and Configure MIP (GUI)
- Instructions reflect the Windows GUI, but should also work for Linux/Mac.
Download and install the latest version.
Copy a single song to the local hard drive to serve as a dummy file for the library (explained in step 3).
MIP prompts for a registration key when first run, enter the purchased key string.
Next, point MIP to the folder containing the dummy file. Canceling the folder selection process kills the GUI and MIP will prompt for a folder to scan everytime it's started until at least one song is in the library.
Step 3 - Caching Choices
Analysis is stored in /install_directory///default.m3lib/ which contains absolute paths and is not portable across computers unless both have the exact drive/mount point for the music.
The disk-based devices feature allows for relative paths by storing an /autoload.m3lib/ file in the root of the music folder. However, the headless mode doesn't support this feature (will in 1.7) so the alternative is to archive the analysis within the songs.
MIP writes two tags (plain-text, not binary) that are picked up by subsequent MIP scans to generate a m3lib without further analysis. This allows the headless server to quickly generate its own m3lib. Once the headless version supports disk-based devices it will be able to share the /autoload.m3lib/ with the GUI and avoid the creation of a duplicate m3lib and archiving the analysis.
Enable archiving into files by clicking File/Preferences/General/Archive analysis.
Attach the music directory from File/Devices/Scan For New Devices; select Yes when prompted for /Store cache on the device?/.
Start the analysis from Library/Start Analysis. Once analysis is complete (may take up to a week or more) continue with step 4.
Step 4 - Download, Install, and Configure MIP (Linux)
The tarball (as of version 1.5) contains zero documentation but the headless guide covers the basics, some tips:
- Once started via MusicMagicServer start the process is impossible to end from the console. To terminate MIP enter MusicMagicServer stop from another console.
- The -verbose switch doesn't work
- Send MIP to the background with MusicMagicServer start &
- Pay special attention to the step in the headless guide regarding the mmm.ini file. If this file is not copied to the .MusicMagic directory, a segmentation fault will occur when trying to start MusicMagicServer. The typcial symptom of this is that after executing the script to start the server, you will find that it isn't actually running.
In headless mode MIP is controlled via a simple webserver on port 10002. If analysis is to be run on the server enter the music path and click Add Music. Wait for the /Total songs/ line to stop increasing then click the Start Validation button; the /Songs to validate/ will slowly make it's way down to zero.
GUI users follow the same steps except that /Songs to validate/ will be equal to the number of unanalyzable tracks showed in the GUI as the headless MIP picks up the archived analysis in the songs. Click the Start Validation button and the /Songs to validate/ will quickly reach zero.
Step 5 - Configure SqueezeCenter
MIP must be launched before SqueezeCenter or it won't be detected. Click Server Settings and select Use MusicIP at the bottom of the page. After clicking the Change button SqueezeCenter will begin querying MIP. MusicIP will also be listed as a setup option in Server Settings; various settings like the number of songs in a mix playlist are editable.
Step 6 - Using MIP on a SqueezeBox
- Holding the Play button on the remote while a mixable album/track is highlighted (a small "m" appears in the upper-right of the screen) will generate a mix.
- Click the "m" icon next to songs and albums in SqueezeCenter to generate a mix.
Step 7 - Adding New Songs
If you are running the GUI (which is optional), then right-click the disk in the GUI and select Refresh Songs. Start the analysis from Library/Start Analysis.
If you are only running the headless server then open the headless webserver and click Refresh Songs. If nothing new is found re-add the root folder and click Add Music.
Step 8 - Automatically Adding New Songs
The above step requires the user to use the MusicIP server GUI to add new music to the cache (which must be done before those tracks become mixable). With a little extra work it is possible to automate this step and avoid ever having to use the MusicIP GUI or MusicIP server control web page at all. Those additional steps are available on the Automating MusicIP with GenPuid page.