Giter Site home page Giter Site logo

hvalev / spotifyd-docker Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 4.0 148 KB

Spotifyd within a docker container for ARM (armv7/arm64) and x32/x64 architectures in configuration variants alsa/pulseaudio for audio-backend and with/without D-Bus API for controlling spotifyd through generic media players.

spotifyd docker arm raspberry-pi

spotifyd-docker's People

Contributors

dependabot[bot] avatar hvalev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

spotifyd-docker's Issues

Pulseaudio example config

Hi, thanks for this docker container! I was previously using synclpz/spotifyd-pulseaudio but it hasn't been updated for a while. I was able to get your container working successfully using the following compose file. I have tried to strip out anything extra from the old config, but there might be some config here that isn't absolutely required.

AUDIO_GRP, PUID, PGID and USERDIR must be defined as environment variables or replaced with the correct values in the docker compose file.

version: "3.5"
services:
  spotify:
    container_name: spotify
    restart: always
    image: hvalev/spotifyd-pulseaudio
    user: ${PUID}:${PGID}
#    network_mode: host #disabling to only show logged in user in spotify app (I run multiple containers at once with different user logins)
    devices:
      - /dev/snd:/dev/snd
    group_add:
      - ${AUDIO_GRP}
    environment: 
      - PULSE_SERVER=unix:/tmp/pulseaudio.socket
      - PULSE_COOKIE=/tmp/pulseaudio.cookie
    volumes:
      - /run/user/1000/pulse/native:/tmp/pulseaudio.socket
      - ${USERDIR}/docker/spotifyd/spotifyd.conf:/etc/spotifyd.conf

spotifyd crashes on startup

Hi,

I just set up spotifyd, however it seems to crash immediately:

Loading config from "/etc/spotifyd.conf",
The application panicked (crashed).,
Message:  called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" },
Location: /usr/src/spotifyd/vendor/librespot-core/src/cache.rs:30,
,
Backtrace omitted.,
Run with RUST_BACKTRACE=1 environment variable to display it.,
Run with RUST_BACKTRACE=full to include source snippets.,
The application panicked (crashed).,
Message:  called `Result::unwrap()` on an `Err` value: Os { code: 13, kind: PermissionDenied, message: "Permission denied" },
Location: /usr/src/spotifyd/vendor/librespot-core/src/cache.rs:30,
,
Backtrace omitted.,
Run with RUST_BACKTRACE=1 environment variable to display it.,
Run with RUST_BACKTRACE=full to include source snippets.,
Loading config from "/etc/spotifyd.conf"
  spotifyd:
    container_name: spotifyd
    image: hvalev/spotifyd-alsa
    restart: unless-stopped
    group_add:
      - 29
    # tmpfs:
    #   - /cache:size=64m
    volumes:
      - /opt/appdata/spotifyd/spotifyd.conf:/etc/spotifyd.conf
      - /usr/share/alsa:/usr/share/alsa:ro
    devices:
      - /dev/snd:/dev/snd

Alsa device not working

Hello, I've got an ubuntu setup with working audio but trying to get a spotifyd.conf that works with this container. Currently I have a USB soundcard that is labeled as "default" by aplay -L and aplay -D default /usr/share/sounds/alsa/Front_Center.wav works. My spotifyd.conf is

username= XXX
password = XXX
backend = "alsa"
device = "default"
control = "default"
mixer = "PCM"
volume_controller = "alsa"
device_name = "YYY"
bitrate = 160
no_audio_cache = true
initial_volume = "90"
volume_normalisation = true
normalisation_pregain = -10
zeroconf_port = 1234
device_type = "computer"

And my docker-compose.yml is

  spotifyd:
    container_name: spotifyd
    image: hvalev/spotifyd-alsa
    network_mode: host
    devices:
      - /dev/snd:/dev/snd
    volumes:
      - /usr/share/alsa:/usr/share/alsa
      - /home/pgcudahy/spotifyd/spotifyd.conf:/etc/spotifyd.conf
      - /etc/asound.conf:/etc/asound.conf
    group_add:
      - audio
    restart: unless-stopped

But it doesn't work and the logs are

Loading config from "/etc/spotifyd.conf"
No proxy specified
Using alsa volume controller.
Connecting to AP "ap.spotify.com:443"
Authenticated as "XXX" !
Country: "US"
Using Alsa sink with format: S16
Couldn't set volume: Error("snd_mixer_attach", Sys(EINVAL))
ALSA lib dlmisc.c:170:(snd_dlsym_verify) unable to verify version for symbol snd_func_private_integer
ALSA lib conf.c:4556:(_snd_config_evaluate) symbol snd_func_private_integer is not defined inside (null)
ALSA lib conf.c:5047:(snd_config_expand) Evaluate error: No such device or address
ALSA lib conf.c:3694:(snd_config_hook_load) Unable to expand filenames in the pre-load section
ALSA lib conf.c:3572:(snd_config_hooks_call) function snd_config_hook_load_for_all_cards returned error: No such device or address
ALSA lib control.c:1264:(snd_ctl_open_conf) Invalid type for CTL default definition

What am I getting wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.