GioF71 / squeezelite-docker

Easily run SqueezeLite with Alsa or PulseAudio output with Docker. Bluetooth support. Upsampling 2x 4x 8x with "Goldilocks" settings by Archimago
Apache License 2.0
32 stars 10 forks source link

Is there any way to send other command line options ? #24

Closed sangju41 closed 2 years ago

sangju41 commented 2 years ago

Thanks for the great work. It works fine with my RPi 3B + Topping DX5 DAC setup. DSD256, MQA Files play perfectly.

One thing I would like to have is pass -v option (small v not capital V) which is needed to make spectrum analyzer and VU meter option to work in JiveLite.

is it possible to pass this command line paramter to the container ? Or isn't it possible to add one more variable such as SQUEEZELITE_EXTRA_OPTS taking any strings like '-v' ?

Thanks in advance.

GioF71 commented 2 years ago

Hello, I can add support for this feature through a dedicated configuration variable. What would be an appropriate name?

GioF71 commented 2 years ago

Would you also like to provide the configuration values for your dac, so I can add a PRESET?

sangju41 commented 2 years ago

Great. And Thanks for the very quick reply. From squeezelite help, '-v' is for 'Visualizer Support'. So how about SQUEEZELITE_VISUALIZER ? Since -v option doesn't take any arguement it would be best to set it to TRUE or FALSE (1 or 0) and $CMD_LINE option is set to -v or None respectively.

I use two DACs for 2 RPis (Normal installation on raspberry OS lite bullseye latest version)

For Topping DX5 (visualizer support) /usr/bin/squeezelite -n squeezelite -o hw:CARD=DX5,DEV=0 -a 80 4 1 -C 1 -D u32be -v -r 768000 in /etc/default/squeezelite SB_EXTRA_ARGS="-a 80:4::1: -C 1 -D :u32be -r 768000"

For Gustard X16 (no visualizer support) /usr/bin/squeezelite -n squeezelite -o hw:CARD=G20,DEV=0 -a 80 4 1 -C 1 -D u32be -r 768000 in /etc/default/squeezelite SB_EXTRA_ARGS="-a 80:4::1: -C 1 -D :u32be -r 768000"

For both cases, I set -C option to 1 sec as I want the audio device to be released from squeezelite as soon as it stops playing. Moreover I'm not sure -a 80:4::1: option is necessary. I just copied it from where I don't remember anymore.

GioF71 commented 2 years ago

Hello, let me know if the implementation works. Feel free to reopen if needed. p.s. I will add the presets later, see #25

sangju41 commented 2 years ago

Hello, let me know if the implementation works. Feel free to reopen if needed. p.s. I will add the presets later, see #25

Ah... it failed.

I'm not sure you are familar with JiveLite, Visualizer (VU meter, Spectrum Analyzer) works only for Local Player. Since Jivelite installed on the host does not recognize dockerized squeezelite as local player, visualzer does not appear in "now playing views".

I could force the Jivelite to show the visualizer for non local player, but the meter is not moving. Even thogh /dev/snd is shared, "This creates a shared memory segment that contains some of the audio being played, so that an external visualiser can read and process this to create visualisations." this part doesn't seem to be working.

As a turn around, I installed squeezelite on the host machine. With this the visuallizer works. Dockerized squeezelite works fine with no visualilzer support.

Sorry for put you into trouble. ^^;;

At leaat having multiple instances of squeezelite on a single machine with different settings is a big advantage.

Thank you.

GioF71 commented 2 years ago

I kind of imagined that this could have happened using docker, it is pretty much in its 'isolation' principles. I don't have a pi with a display so I could not try myself, sorry.

GioF71 commented 2 years ago

Hello, see the latest builds with support for your dacs for easier configuration