SqueezeSlave
From SqueezeboxWiki
SqueezeSlave is a software music player that allows you to play music streamed from SqueezeCenter (formerly known as SlimServer) and SqueezeNetwork.
SqueezeSlave is an alternative to SoftSqueeze. The main difference is that SqueezeSlave has no graphical interface (GUI), but rather is run from a command line. This makes SqueezeSlave useful as a player for "headless" applications (e.g., server computer without display). It's also useful as a background player where a display is not required, or as a player which uses the least computing resources.
SqueezeSlave was written by Richard Titmuss with contributions from Duane Paddock, Dominique Leroux, Graham Chapman, Ivor Bosloper, Jason Melvin, Sam Gupta and Luke Redpath.
SqueezeSlave is currently maintained by Ralph Irving http://forums.slimdevices.com/member.php?u=3484.
Executable versions for Windows, Linux, OSX and Solaris SPARC/Intel can be downloaded from SourceForge.net at: https://sourceforge.net/project/showfiles.php?group_id=105169&package_id=176494
The linux version as of May 31, 2009 supports alsa, IR remotes, USB displays and an on screen text mode display. The additional display features no longer require patching for Squeezecenter v7.4 r26720 or later. For older versions of Squeezecenter the replay gain patches below include the necessary changes for the display feature.
Version 0.9 brings replay gain support with Squeezecenter v7.4 r26720 or later. Positive dB replay gain values are ignored to prevent clipping.
Patch files squeezecenter_squeezeslave_player3-7.3.patch and squeezecenter_squeezeslave_player3-7.2.patch are included in the binary packages if that build has the features enabled for squeezecenter 7.3.3 and 7.2.2 running on linux/solaris. They are also available in the source tree under the patches subdirectory.
Contents |
Installation
Mac OS X installation
The Mac OS X version can be downloaded from SourceForge.net as an "osx-intel.tar.gz". Unpacking the file gives a folder with
- A GNU
LICENSE.txt - The
squeezeslaveexecutable - A launchd
squeezeslave.plistdescription file
A look at the plist file indicates that the executable is to be moved to /opt/local/bin/.
You might have to create the corresponding directory.
Time to open the Terminal as an administrator, navigate to the place the downloaded files are located and
mkdir -p /opt/local/bin/ mv squeezeslave /opt/local/bin/
You can now check the command line options with
/opt/local/bin/squeezeslave -h
The next step is to find out which number is associated to the output device you plan to use
/opt/local/bin/squeezeslave -L
which gave me
Output devices: 0: iSight 1: Built-in Line Input 2: Built-in Digital Input 3: Built-in Output 4: Built-in Line Output 5: Built-in Digital Output
Now try to run it. If your Squeezecenter runs on the same machine and you want to send the audio to the line output
/opt/local/bin/squeezeslave -o 4
If the Squeezecenter runs on another machine, add its host name to the command line
/opt/local/bin/squeezeslave -o 4 macmini.mynet
Now open the SqueezeCenter control webpage and look at the players list. The new Squeezeslave should have appeared.
If this works, you are ready to have Squeezeslave automatically launched at boot time.
Edit squeezeslave.plist and customize it to your installation
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>OnDemand</key> <false/> <key>RunAtLoad</key> <true/> <key>Label</key> <string>squeezeslave</string> <key>ProgramArguments</key> <array> <string>/opt/local/bin/squeezeslave</string> <string>-o 4</string> <string>macmini.mynet</string> </array> </dict> </plist>
If you intend to use more than one Squeezeslave, you will need to provide a different mac address to each
<array> <string>/opt/local/bin/squeezeslave</string> <string>-o 4</string> <string>-m 00:00:00:00:00:16</string> <string>macmini.mynet</string> </array>
For me, the lengthier command parameter --mac 00:00:00:00:00:16 didn't work properly.
Move the file to the proper place
mv squeezeslave.plist /Library/LaunchDaemons/ chown root:wheel /Library/LaunchDaemons/squeezeslave.plist
Start Squeezeslave
launchctl load /Library/LaunchDaemons/squeezeslave.plist
Check it is running
ps ax | grep squeeze
Stop it
launchctl remove squeezelave
The Squeezeslave should now automatically launch at login time.
Linux build instructions (incomplete)
The original source for squeezeslave is available via the slimdevices svn server. This source only includes protocol fixes required for squeezeslave to continue to work with newer versions of Squeezecenter. This is the source up to version 0.7.5.
svn checkout http://svn.slimdevices.com/repos/slim/7.4/trunk/softsqueeze/SlimProtoLib
The source for version 0.8 is available as a tarball at SourceForge.net: https://sourceforge.net/project/showfiles.php?group_id=105169&package_id=176494
The current source tree for squeezeslave has been moved to Google Code. The current and all previous 0.8 releases are available for checkout.
svn checkout http://squeezeslave.googlecode.com/svn/squeezeslave/trunk/squeezeslave
make -f <makefile of your os flavor>
Prebuilt versions of squeezeslave for most platforms are available on SourceForge.net.
Overview of installation for Ubuntu
These instructions install squeezeslave into your home directory. Ubuntu may have development versions of the packages available in the repository, but this uses the versions included in the SVN repository, installing them to your home directory.
- Carry out the "svn checkout ..." step above in your home directory. This will create a "squeezeslave" directory.
- In the "sources" folder there are archives containing the dependencies. You will need to install them in the order "libogg", "libvorbis", "flac", "libmad".
- Unzip the bz2 files "tar xjvf filename"
- Unzip the tar.gz files "tar zxf filename"
- In each created directory do "./configure --prefix=/home/your_user_name && make && make install"
- Install the "libasound2-dev" package: "sudo apt-get install libasound2-dev"
- Modify the file makefile.linux26-alsa:
- Add a "-I/home/your_user_name/include -I/home/your_user_name" to the INCLUDE line at the top
- Further down in the file there are several instances of "/usr/lib" - change all these to "/home/your_user_name/lib".
- Do a "make -f makefile.linux26-alsa"
- The binary is created in the "bin" folder
Command Line Switches
Command Line Switches (options) available (this list available by using the -h switch)
If you experience problems using the --longer command line options, try the one letter equivalent. For those options that require and additional argument, leave no space between the letter and the argument.
For example;
squeezeslave -r15 -o3 -m00:00:00:00:00:02 schostname
squeezeslave 0.9-65 (Windows)
- compile flags: win32 portaudio:1810 debug
- squeezeslave [options] [<squeezecenter address>]
- The SqueezeCenter address defaults to 127.0.0.1.
- Options:
- -h, --help: Prints this message.
- -a,--predelay_amplitude <val>:
- Sets the amplitude of a high-frequency tone
- The frequency is set at the source's sampling
- rate/2 and the amplitude is in absolute value.
- For 16-bit sources, the max is 32767, but values
- below 10 are likely to work. The goal is to
- produce an inaudible signal that will cause DACs
- to wake-up and lock before actual samples are
- played out. If the DAC locks using only silence,
- do not use this option (it will default to 0).
- -k, --keepalive <sec>: Controls how frequently squeezeslave sends a
- alive signal to SqueezeCenter. 6.5.x servers
- need this to avoid dropping the player's
- connection. By default, the implementation
- chooses the right value: 10s for a >=6.5.x server
- and 0s for a <6.5.xserver, which means no
- keepalive.
- -L, --list List available audio devices and exit.
- -m, --mac <mac_address>: Sets the mac address for this instance.
- Use the colon-separated notation.
- The default is 00:00:00:00:00:01.
- SqueezeCenter uses this value to distinguish
- multiple instances, allowing per-player settings.
- -e, --playerid: Pretend to be the player-type-id specified. Some
- types may require -m00:04:20:00:00:01 as well.
- softsqueeze
- squeezebox2
- transporter
- softsqueeze3
- receiver
- controller
- boom
- softboom
- squeezeplay
- -o, --output <device_id>: Sets the output device id.
- The default id is 0.
- The output device ids can be listed with -L.
- -p, --predelay <msec>: Sets a delay before any playback is started. This
- is useful if the DAC used for output is slow to
- wake-up/lock, causing the first few samples to be
- dropped.
- --retry Causes the program to retry connecting to
- SqueezeCenter until it succeeds or is stopped using
- SIGTERM or keyboard entry (see -s/--signal).
- If the connection to SqueezeCenter is lost, the
- program will poll it until it restarts. --retry
- enables retry with a 5 second delay between
- attempts.
- -r <sec> For a different retry interval use -r and the
- desired interval in seconds. (ie. -r10)
- A value is required for this option.
- -V, --version: Prints the squeezeslave version.
- -v, --volume <on|sw|off>: Enables/disables volume changes done by
- SqueezeCenter during its operation, such as when
- changing the volume through the web interface or
- when applying replay gain. Defaults to sw.
- on: volume changes performed on device.
- sw: volume changes performed in software.
- off: volume changes ignored.
- -Y, --debuglog <logfile>: Redirect debug output from stderr to <logfile>
- -d, --debug <trace_name>: Turns on debug tracing for the specified level.
- The option can be used multiple times to enable
- multiple levels.
- Available levels:
- slimproto
- slimaudio
- slimaudio_buffer
- slimaudio_buffer_v
- slimaudio_decoder
- slimaudio_decoder_v
- slimaudio_http
- slimaudio_http_v
- slimaudio_output
- slimaudio_output_v
squeezeslave 0.9-65 (Linux)
- compile flags: linux portaudio:1899 debug signals interactive
- squeezeslave [options] [<squeezecenter address>]
- The SqueezeCenter address defaults to 127.0.0.1.
- Options:
-
- -h, --help: Prints this message.
- -a,--predelay_amplitude <val>:
- Sets the amplitude of a high-frequency tone
- produced during the predelay (see --predelay).
- The frequency is set at the source's sampling
- rate/2 and the amplitude is in absolute value.
- For 16-bit sources, the max is 32767, but values
- below 10 are likely to work. The goal is to
- produce an inaudible signal that will cause DACs
- to wake-up and lock before actual samples are
- played out. If the DAC locks using only silence,
- do not use this option (it will default to 0).
- -k, --keepalive <sec>: Controls how frequently squeezeslave sends a
- alive signal to SqueezeCenter. 6.5.x servers
- need this to avoid dropping the player's
- connection. By default, the implementation
- chooses the right value: 10s for a >=6.5.x server
- and 0s for a <6.5.xserver, which means no
- keepalive.
- -l, --lcd Enable LCDd (lcdproc) text display.
- Requires LCDd running on local host.
- -i, --lirc Enable lirc remote control support.
- Requires lirc running on local host.
- -c, --lircrc <filename>: Location of lirc client configuration file.
- Default: ~/.lircrc
- -D, --display Enable slimp3 style text display and
- keyboard input.
- Keys: 0-9: 0-9
- Insert Add
- Cursor Keys Arrows
- >,< Fwd,Rew
- Home Home
- End Now Playing
- Space or P Pause
- Enter Play
- R Repeat
- S Shuffle
- ? Search
- B Browse
- F Favourites
- % Size
- Z Sleep
- +,- Vol up,down
- -w. --width <chars> Set the display width to <chars> characters
- If using LCDd, width is detected.
- -M, --daemonize <logfile> Run squeezeslave as a daemon.
- Messages written to specified file.
- -L, --list List available audio devices and exit.
- -m, --mac <mac_address>: Sets the mac address for this instance.
- Use the colon-separated notation.
- The default is 00:00:00:00:00:01.
- SqueezeCenter uses this value to distinguish
- multiple instances, allowing per-player settings.
- -e, --playerid: Pretend to be the player-type-id specified. Some
- types may require -m00:04:20:00:00:01 as well.
- softsqueeze
- squeezebox2
- transporter
- softsqueeze3
- receiver
- controller
- boom
- softboom
- squeezeplay
- -o, --output <device_id>: Sets the output device id.
- The default id is 0.
- The output device ids can be listed with -L.
- -p, --predelay <msec>: Sets a delay before any playback is started. This
- is useful if the DAC used for output is slow to
- wake-up/lock, causing the first few samples to be
- dropped.
- --retry Causes the program to retry connecting to
- SqueezeCenter until it succeeds or is stopped using
- SIGTERM or keyboard entry (see -s/--signal).
- If the connection to SqueezeCenter is lost, the
- program will poll it until it restarts. --retry
- enables retry with a 5 second delay between
- attempts.
- -r <sec> For a different retry interval use -r and the
- desired interval in seconds. (ie. -r10)
- A value is required for this option.
- -V, --version: Prints the squeezeslave version.
- -v, --volume <on|sw|off>: Enables/disables volume changes done by
- SqueezeCenter during its operation, such as when
- changing the volume through the web interface or
- when applying replay gain. Defaults to sw.
- on: volume changes performed on device.
- sw: volume changes performed in software.
- off: volume changes ignored.
- -Y, --debuglog <logfile>: Redirect debug output from stderr to <logfile>.
- -d, --debug <trace_name>: Turns on debug tracing for the specified level.
- The option can be used multiple times to enable
- multiple levels.
- Available levels:
- slimproto
- slimaudio
- slimaudio_buffer
- slimaudio_buffer_v
- slimaudio_decoder
- slimaudio_decoder_v
- slimaudio_http
- slimaudio_http_v
- slimaudio_output
- slimaudio_output_v

