giof71 / librespot-docker Goto Github PK
View Code? Open in Web Editor NEWUse Librespot (Spotify Connect) with Docker (Alsa & PulseAudio supported)
License: Apache License 2.0
Use Librespot (Spotify Connect) with Docker (Alsa & PulseAudio supported)
License: Apache License 2.0
The documentation does not explain how to use discovery mode (without credentials)
On README.md in the Links section, librespot
is mispelled as librepot
Avoid leaving empty directories.
So we can delete $LIBRESPOT_PULSE_CONFIG_DIR/ if not empty (otherwise this can yield an error).
Update to latest github actions
We need to create docker images only when tags are pushed.
Sample tag names:
release/2022-01-01
devel/dev-snap-2022-01-01
feature/my-feature-snap-2022-01-01
main/main-snap-2022-01-01
Considering the fast release cycle of librespot, it would be nice if latest images are created on a daily basis
Hello,
I am trying to deploy this image in a Kubernetes cluster (K3s). The pod is running on a target node, which is a Raspberry Pi 3 with a HIFI-BERRY DAC+ plugged on it.
I have already tested several images but I always get the same error, it must be more related to the configuration than to the image itself.
I can connect via Spotify-connect, but after a few minutes the music stops and I get the following errors in the logs:
[2022-10-23T14:55:41Z ERROR librespot_playback::player] Unable to load audio item: MercuryError
[2022-10-23T14:55:41Z ERROR librespot_core::session] Connection reset by peer (os error 104)
[2022-10-23T14:55:41Z ERROR librespot_connect::spirc] subscription terminated
[2022-10-23T14:55:41Z WARN librespot] Spirc shut down unexpectedly
And when I open a connection throught Spotify-connect, I very often get :
[2022-10-23T14:48:34Z WARN librespot_playback::audio_backend::alsa] Error writing from AlsaSink buffer to PCM, trying to recover, ALSA function 'snd_pcm_writei' failed with error 'EPIPE: Broken pipe'
ALSA lib pcm.c:8545:(snd_pcm_recover) underrun occurred
I'm not sure if asound.conf
is used in the image, but here's the configuration file I mount in the pod (/asound.conf
):
pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
And here are the environments variable provided to the container :
env:
- name: DEVICE_NAME
value: SPEAKER
- name: DEVICE
value: hw:0,0
- name: DEVICE_TYPE
value: speaker
- name: FORMAT
value: S24
- name: BITRATE
value: '320'
- name: ENABLE_CACHE
value: 'Y'
- name: CACHE_SIZE_LIMIT
value: 3G
I've already try to run without the cache. I suspect a PCM buffer problem but I would like your opinion ?
Thank you !
When using user mode, volumes should be chown-ed to the user we are impersonating.
As per the title
Merge code for new release
Avoid to rely on raspotify (a great project of course)
This currently does not work because cargo install seem to fail for armhf architecture on GitHub workflows.
as per the title
Perform the following changes:
Is your feature request related to a problem? Please describe.
If we want an automatically starting container configured in PulseAudio mode on a desktop system, we probably cannot use a restart policy from docker, which seems to break PulseAudio (at least on my systems)
Describe the solution you'd like
As done with squeezelite-docker, a user level systemd service would solve the issue.
Describe alternatives you've considered
No alternatives that I know of, that do not require a manual interaction (like, e.g., starting an existing container from the command line or from Poirtainer)
Additional context
This applies to PulseAudio mode so basically to system with a desktop environment without auto-login. Automati login might probably mitigate the issue
Fix the workflow. A carriage return was removed
Avoid operations which require root if the container is run with a specified user other than root
Add quotes to command line at least to:
Then verify if other variables need to be quoted when transponed to the command line.
I am wrongly using --normalisation-pre-gain, while the switch is --normalisation-pregain
Provide a few usage examples:
docker run commands
docker-compose.yaml files
pulseaudio and alsa configurations
Enable reading credentials from a file.
Rebuild latest images after a long time.
We are at a basic functionality for now.
It would be great to cover all the functionality of librespot through environment variables and volumes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.