Giter VIP home page Giter VIP logo

shairport-sync-docker's People

Contributors

francoisdtm avatar mikebrady avatar nicsuzor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

shairport-sync-docker's Issues

Missing user information when running in Unraid

I'm trying to run the shairport-sync-docker container in unraid.
As I am only using a pipe to forward the audio to, the only two things added are:

-v /tmp/snapcast:/tmp/snapcast -> The location of the pipe
-v /mnt/domains/shairport:/etc -> The location of the shairport config file

However, when starting the container, following errors appear.

dbus[8]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[8]: Unknown username "root" in message bus configuration file
dbus[8]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[8]: Unknown username "root" in message bus configuration file
dbus[8]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[8]: Unknown username "root" in message bus configuration file
dbus-daemon[8]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus-daemon[8]: Failed to start message bus: Could not get UID and GID for username "messagebus"

Do you have an idea what is going wrong there? Thanks in advance.

No audio with stock docker-compose.yaml | Host audio works fine

Hello Community, hello @mikebrady!

First off: Thank you for the great work being done!

Now to my issue:
I got a somewhat rare problem. I think.
After experimenting with my SBC (Rock 5B) for the past month I finally settled for a kernel (6.1.43-rockchip).

Sometime early on I already had shairport-sync running perfectly fine with the stock shairport-sync docker-compose.yaml.
However now I do not get any AirPlayed audio anymore. Searching for a solution I realised that with my current kernel defaults to HDMI-audio. I fixed this with an /etc/asound.conf file configuring the headphone jack as the default output device. This apparently works fine as I can just play something on the (headless) host using aplay ./test.wav.

However I still do not get any output via AirPlay. I already checked the docker containers shairport-sync.conf, but it looks good to me, not specifying anything, and thus defaulting to alsa, and whatever the host does (at least this is how I think it works).

Now I hit a dead end as to what else to try.
Any help is appreciated.

Best Rastafabisch


EDIT: I also tried restarting the SBC and the docker container - no dice.

On Raspberry Pi 4 not working

Hello! I really hoped it would work by simply running the container, but it is not.
It didn't work before latest raspbian update, and it isn't working now after updating and having pulse audio replaced ALSA.
I tried adding --with-pa but the container restarts and doesn't work

docker container doens't seem to start

Running this with the default configuration creates a container but it doesn't seem to work at all. docker ps shows:

CONTAINER ID   IMAGE                                COMMAND                  CREATED              STATUS                          PORTS                                                                      NAMES
33aea0ae60bc   mikebrady/shairport-sync             "/start.sh"              About a minute ago   Up About a minute                                                                                          shairport-sync_shairport-sync_1

docker logs 33aea0ae60bc shows nothing. And when I try to access the docker with a bash-shell it displays:

OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown

I'm running it from Ubuntu 20.04 Server, all packages up to date.

shairport-sync-docker not finding sound card running on latest Libreelec

Hi Mike. I am trying to get shairport-sync-docker running on the latest Libreelec 10 beta running on Linux 5.10.41 x86_64 GNU/Linux on a Wyse thin client 5060 AMD GX-424 SOC Radeon R5E graphics.

No matter what I try for hw:X,X on the command line I get these _snd_pcm_hw_open errors in the Portainer log for shairport-sync as soon as I start playing to the instance.

ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card,

Per the aplay -l output below this command line should work for the HDMI interface:

docker run -d --restart unless-stopped --net host --device /dev/snd mikebrady/shairport-sync -- -d hw:0,3

I have tried every combination I could think of for hw:X,X for either sound device with no luck.

Any assistance you can provide is greatly appreciated. It will be nice to get the home theater sound in sync with the five other shairport-sync instances running in the house. Please let me know if there is anything else I can provide.

Thanks!

LibreELEC:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC231 Analog [ALC231 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
LibreELEC:~ # aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
myoutput
    My Output with softvol
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, HDMI 0
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA ATI HDMI, HDMI 1
    HDMI Audio Output
default:CARD=Generic
    HD-Audio Generic, ALC231 Analog
    Default Audio Device
sysdefault:CARD=Generic
    HD-Audio Generic, ALC231 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC231 Analog
    Front output / input
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC231 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC231 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC231 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC231 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC231 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC231 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers

ALSA lib pcm_hw.c:1829:(_snd_pcm_hw_open) Invalid value for card,

Remove `--net host`

Hey, is network_mode: host really needed here or is just there to run avahi?
If so, than could you consider removing it/making it optional, as is already have mDNS set up and would like to not have it redundantly running in the shairpod container.

Change `$@` to `"$@"`

Hey, is it possible to change $@ to "$@" in the start.sh script so that it allows the broadcasted name to have multiple words ?

Ex: --name="Living room" only displays Living on AirPlay but should display Living room instead.

Thanks in advance,

Equalizer?

This isn't an issues as much as it is a post to see if anyone knows of an easy way to add a system wide equalizer with docker. Alpine doesn't seem to have support for the ALSA equalizer plugin from what I've found.

I thought I would ask before I build a new docker image on top of buster-slim.

Trying to setup shairport docker to start at boot using systemd

Hi,

System: Linux raspberrypi 5.4.72-v7+ #1356 SMP Thu Oct 22 13:56:54 BST 2020 armv7l GNU/Linux

The docker image is running perfectly on my raspberry. Now I wanted to start it at boot, here is my systemd service file:

[Unit]
Description=Shairport Container
After=docker.service
After=avahi-daemon.service
Requires=docker.service
Requires=avahi-daemon.service

[Service]
User=<uid>
Group=<gid>
Restart=always
ExecStartPre=-/usr/bin/docker stop shairport
ExecStart=/usr/bin/docker start -a shairport
ExecStop=/usr/bin/docker stop shairport

[Install]
WantedBy=multi-user.target

But after reboot, I get Process 12 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid) in shairport docker logs. The only way to fix it is to docker restart shairport.

user `shairport-sync` not in group `audio` in docker image

As described, which causes problems like

ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM sysdefault

Fixed by simply add the user to the group and restart the container.

The docker commands I am using:

docker run \
  --detach \
  --net host \
  --restart always \
  --name shairport-sync \
  --device /dev/snd \
  mikebrady/shairport-sync:3.3.8

Play to Bluetooth Speaker

Hi,

Thanks for all your work on Shairport (hopefully the Airplay 2 stuff isn't going too badly!).

My basic goal is to have at least two instances of Shairport Sync on a Raspberry Pi, one outputting via the 3.5mm audio jack and one outputting via a connected Bluetooth speaker (potentially adding more bluetooth senders in the future).

However, I'm not entirely sure how to pass through the Bluetooth audio to the docker container since it's not available in ALSA. I have a feeling this will require some PulseAudio config but currently I believe the docker image doesn't contain PulseAudio?

I hoped you might have a suggestion on how to get this working? Maybe I've missed something obvious :)

Thank you
Charles

No logs in default output

I'm running the image 96101ff88ff1 on raspberry pi and I can't seem to see any output in the logs. I'm running the image as follows.

docker run --net host -v /home/pi/shairport-sync.conf:/etc/shairport-sync.conf -v /home/pi/music/shairport:/home/shairport-sync/shairport mikebrady/shairport-sync

Where /home/pi/music/shairport is a named pipe and the below config file is mounted into the container.

general =
{
	name = "Kitchen Speakers";
	output_backend = "pipe";
	log_verbosity = 3; // "0" means no debug verbosity, "3" is most verbose.
};

sessioncontrol =
{
	allow_session_interruption = "yes"; 
	session_timeout = 20; 
};

pipe =
{
  name = "/home/shairport-sync/shairport";
  mixer_control_name = "PCM";
  audio_backend_buffer_desired_length = 48000; /
};

Audio works fine and I can connect and play, but I can't see any log output either directly from the command (running in non daemon mode) or from docker logs. For monitoring and debug purposes I'd like to be able to view the logs from journalctl which expects the logs to be written to stdout.

Not working on Raspberry Pi 4 B running newest Raspberry Pi OS ("GLib requires working CLOCK_MONOTONIC")

Hi there. At first - thank you very much for creating this awesome piece of software!

Today i got my brand new RPi4B which i plan to use as a docker host for multiple services in my home network. I baked the newest Raspberry Pi OS onto the SD-Card, fired it up and ran the usual apt-get update && apt-get upgrade.
First thing i tried out was setting up shairport-sync as a docker container using the example command in the README.md

Unfortunately it seems that the container is not able to run. Docker ist constantly restarting it. Running

docker logs <containerid>

reveals that some "GLib requires working CLOCK_MONOTONIC"

pi@raspberrypi:~ $ docker logs 12bd6fe0aa2a

(process:14): GLib-ERROR **: 23:06:30.771: GLib requires working CLOCK_MONOTONIC
Trace/breakpoint trap
Process 13 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)

(process:14): GLib-ERROR **: 15:27:50.771: GLib requires working CLOCK_MONOTONIC
Trace/breakpoint trap
Process 13 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)

(process:15): GLib-ERROR **: 17:57:10.771: GLib requires working CLOCK_MONOTONIC
Trace/breakpoint trap
Process 14 died: No such process; trying to remove PID file. (/run/avahi-daemon//pid)

At first i ran it on Raspberry Pi OS Lite, however, just to be sure i ran it on the "standard" Pi OS as well and unfortunately it is the exact same behaviour.
I also tried out installing all the packages required for building but that didn't help either.

Via google i couldn't find anything...

I wonder if there is somebody who whas an idea what the problem could be. Am I missing something?

Your help would be very much appreciated :-)

Greetings,
Chris

Error pulling image with tag 'latest'.

When no docker image tag is specified like in the readme, it defaults to 'latest' but this presents the following error:
ERROR: manifest for mikebrady/shairport-sync:latest not found: manifest unknown: manifest unknown
Manually setting a tag (e.g. 3.3.6) does work.

docker compose example

Can you provide a docker compose example for the docker run example? As a docker newbie I find it really difficult to translate some of the commands.

version: "3.6"
services:
    shairport-sync:
        container_name: shairport-sync
        image: mikebrady/shairport-sync
        command: -a Shairport-Sync-Name -- -d hw:0 -c PCM
        restart: unless-stopped
        network_mode: host
        devices:
            - /dev/snd

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.