简体   繁体   中英

Running MPD server with Mopidy docker container, how do I play on Mac?

I'm running the Docker container stilllman/mopidy . I can access the Mopidy UI at http://localhost:6680 and can also control the music that is playing after installing mpc with homebrew. However, I cannot figure out how to hear the music that is playing. The container acknowledges the new MPD connection when I try to use the mpc command on my local mac terminal. I reach the same situation with Theremin (can control music but not hear).

I was successful by installing pulseaudio via homebrew on my Mac host and connecting my Docker container to it:

docker run -it -e PULSE_SERVER=docker.for.mac.localhost \
    -v ~/.config/pulse:/home/pulseaudio/.config/pulse \
    --entrypoint speaker-test \
    --rm jess/pulseaudio -c 2 -l 1 -t wav

You could build a similar container running Mopidy and change output to pulse server output (should be in the documentation how to do it).

An alternative solution to using the brittle audio routing through Pulseaudio would be to use the Icecast output of Mopidy: https://docs.mopidy.com/en/latest/audio/#streaming-through-icecast

Once you setup the Icecast stream, on your host, you could use a browser or MPV to play the stream generated by Icecast.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM