PDA

View Full Version : Run Squeezelite hidden on Windows 10



th00ht
2018-05-20, 03:26
Hi
Today it annoyed me that the squeezelite (tested with 1.9) command window is visible. Did a bit of encosia-ing (googling for tree huggers) and found a way to start a powershell script hidden. Adding this as a task to the Task Scheduler upon logon and I have have player that can be operated from the server site.

Unpack squeezelite in the C:\ProgramData folder.

This is the squeezelite.ps1 PowerShell Script:

Start-Process -FilePath C:\ProgramData\squeezelite-1.9.0-1098-win32\squeezelite-win.exe -ArgumentList "-s your-server-here -n your-playername-here" -WindowStyle hidden

put it anywhere you want, my scripts are stored in a folder WindowsPowerShell under the documents folder.

In Task Scheduler (Compunter Management) create a task with a trigger "Logon" and as action:
Program:
PowerShell and as parameter
-command "path-to-squeezelite.ps1" .

As there is no window there is no other way to close the contraption other than logging of or killing squeezelite by using task manager

ralphy
2018-05-20, 04:33
You could also try Greg Dawson's excellent Squeezelite-X (https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X)

th00ht
2018-05-20, 05:38
You could also try Greg Dawson's excellent Squeezelite-X (https://forums.slimdevices.com/showthread.php?108550-Announce-Squeezelite-X)

Thanks for the tip Ralphy!
But LMS (or SBS) already has an awesome web interface I use anywho for the other five S-devices I have around. The Squeezlite has a minimal footprint of less than 7kB and while I listen to random albums only I hardly ever need the web gui, and when I do I use the Squeeze Ctrl Android app.

In such a setup squeezelite is awesome.

th00ht

DJanGo
2018-05-20, 09:52
As there is no window there is no other way to close the contraption other than logging of or killing squeezelite by using task manager

Hi,
if you already using scripting...

Just add another one (cmd not ps1).

taskkill /F /IM squeezelite-win.exe

th00ht
2018-06-21, 11:18
Hi,
if you already using scripting...

Just add another one (cmd not ps1).

taskkill /F /IM squeezelite-win.exe

Ah, thanks! Sure. Good tip!

th00ht
2018-10-13, 07:36
Thought of an edit but due to the many responses felt like a response is better.

After many weeks of listening to music with this setup I realized that there are some flaws in squeezelite. Compressed tracks, be it mp3 or m4u, VBR or CBR tend to be truncated during playback. Switched back to SqueezePlay and the tracks are played formidably complete.

Maybe I missed something (a proper codec?) but I cannot be bothered at the moment experimenting

bwaldron
2018-10-13, 08:17
After many weeks of listening to music with this setup I realized that there are some flaws in squeezelite. Compressed tracks, be it mp3 or m4u, VBR or CBR tend to be truncated during playback. Switched back to SqueezePlay and the tracks are played formidably complete.

Huh. I have used squeezelite on Windows 10 for quite some time without experiencing this. My library is entirely mp3.

Who knows?!

th00ht
2018-10-13, 08:33
Huh. I have used squeezelite on Windows 10 for quite some time without experiencing this. My library is entirely mp3.

Who knows?!

Thanks for letting me know, bwaldron.
So this might indeed be a mere codec thing. Not sure how the programmers in Redmond envisioned setting up a proper decoder for an mp3 stream. Is this something you set at the squeezelite folder/ command line?

bpa
2018-10-13, 10:02
Thanks for letting me know, bwaldron.
So this might indeed be a mere codec thing. Not sure how the programmers in Redmond envisioned setting up a proper decoder for an mp3 stream. Is this something you set at the squeezelite folder/ command line?

Squeezelite and Squeezeplay both decode all formats into PCM which is then sent to the appropriate API of the operating system. AFAIK they both use the same MP3 decode library. IIRC Windows has a few Audio subsystems - you are probably a default choice.

If you run squeezelite at a command prompt with the option "-d decode=info" it will say which codec libraries have been installed and are loaded ("mad" is the MP3 decoder)

th00ht
2018-10-13, 10:25
Squeezelite and Squeezeplay both decode all formats into PCM which is then sent to the appropriate API of the operating system. AFAIK they both use the same MP3 decode library. IIRC Windows has a few Audio subsystems - you are probably a default choice.

If you run squeezelite at a command prompt with the option "-d decode-info" it will say which codec libraries have been installed and are loaded ("mad" is the MP3 decoder)

squeezelite-1.9.0-1098-win32>squeezelite-win.exe -d decode-info

just gives me the help screen.
but thanks!

bpa
2018-10-13, 11:28
squeezelite-1.9.0-1098-win32>squeezelite-win.exe -d decode-info

just gives me the help screen.
but thanks!

Sorry a typo crept in "-" instead of "="

squeezelite-win.exe -d decode=info

AFAICT the Squeezelite-X app has squeezelite-win built with all the libraries you need as part of the exe

th00ht
2018-10-13, 11:56
Sorry a typo crept in "-" instead of "="

squeezelite-win.exe -d decode=info

AFAICT the Squeezelite-X app has squeezelite-win built with all the libraries you need as part of the exe


C:\ProgramData\squeezelite-1.9.0-1098-win32>squeezelite-win.exe -d decode-info

Debug settings error: -d decode-info

Squeezelite v1.9.0-1098, Copyright 2012-2015 Adrian Smith, 2015-2018 Ralph Irving. See -t for license terms
Usage: squeezelite-win.exe [options]
-s <server>[:<port>] Connect to specified server, otherwise uses autodiscovery to find server
-o <output device> Specify output device, default "default", - = output to stdout
-l List output devices
-a <l> Specify Portaudio params to open output device, l = target latency in ms
-a <f> Specify sample format (16|24|32) of output file when using -o - to output samples to stdout (interleaved little endian only)
-b <stream>:<output> Specify internal Stream and Output buffer sizes in Kbytes
-c <codec1>,<codec2> Restrict codecs to those specified, otherwise load all available codecs; known codecs: flac,pcm,mp3,ogg,aac,wma,alac,dsd (mad,mpg for specific mp3 codec)
Codecs reported to LMS in order listed, allowing codec priority refinement.
-C <timeout> Close output device when idle after timeout seconds, default is to keep it open while player is 'on'
-d <log>=<level> Set logging level, logs: all|slimproto|stream|decode|output, level: info|debug|sdebug
-e <codec1>,<codec2> Explicitly exclude native support of one or more codecs; known codecs: flac,pcm,mp3,ogg,aac,wma,alac,dsd (mad,mpg for specific mp3 codec)
-f <logfile> Write debug to logfile
-m <mac addr> Set mac address, format: ab:cd:ef:12:34:56
-M <modelname> Set the squeezelite player model name sent to the server (default: SqueezeLite)
-n <name> Set the player name
-N <filename> Store player name in filename to allow server defined name changes to be shared between servers (not supported with -n)
-W Read wave and aiff format from header, ignore server parameters
-r <rates>[:<delay>] Sample rates supported, allows output to be off when squeezelite is started; rates = <maxrate>|<minrate>-<maxrate>|<rate1>,<rate2>,<rate3>; delay = optional delay switching rates in ms
-R -u [params] Resample, params = <recipe>:<flags>:<attenuation>:<precision>:<passband_end>:<stopband_start>:<phase_response>,
recipe = (v|h|m|l|q)(L|I|M)(s) [E|X], E = exception - resample only if native rate not supported, X = async - resample to max rate for device, otherwise to max sync rate
flags = num in hex,
attenuation = attenuation in dB to apply (default is -1db if not explicitly set),
precision = number of bits precision (NB. HQ = 20. VHQ = 28),
passband_end = number in percent (0dB pt. bandwidth to preserve. nyquist = 100%),
stopband_start = number in percent (Aliasing/imaging control. > passband_end),
phase_response = 0-100 (0 = minimum / 50 = linear / 100 = maximum)
-D [delay] Output device supports DSD over PCM (DoP), delay = optional delay switching between PCM and DoP in ms
-Z <rate> Report rate to server in helo as the maximum sample rate we can support
-t License terms
-? Display this help text

Build options: WIN PORTAUDIO WINEVENT RESAMPLE FFMPEG DSD LINKALL

bpa
2018-10-13, 12:44
C:\ProgramData\squeezelite-1.9.0-1098-win32>squeezelite-win.exe -d decode-info

Use an equals sign "="and not the dash "-"

ralphy
2018-10-14, 05:10
Squeezelite windows versions 1.8.6-977 and above don't load decoder DLLs as all the decoder libraries are compiled into the executable.

bpa
2018-10-14, 05:59
Squeezelite windows versions 1.8.6-977 and above don't load decoder DLLs as all the decoder libraries are compiled into the executable.

I thought as much - any suggestion regarding the OPs issues in post #6 - could it be setup issue ?