1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/mpd
2020-02-09 20:12:43 +08:00
..
arm update 2020-02-09 20:12:43 +08:00
playlists add microphone.m3u 2016-08-19 02:31:46 +08:00
docker-compose.yml update 2020-02-09 20:12:43 +08:00
Dockerfile swith to new domain: easypi.pro 2017-05-08 07:05:07 +08:00
mpd.conf update mpd 2016-08-23 22:12:37 +08:00
README.md add piknik 2016-08-20 16:00:05 +08:00

Music Player Daemon

Music Player Daemon (MPD) is a flexible, powerful, server-side application for playing music. Through plugins and libraries it can play a variety of sound files while being controlled by its network protocol.

👍 easypi/mpd-arm works on Raspberry Pi very well.

docker-compose.yml

mpd:
  image: vimagick/mpd
  ports:
    - "6600:6600"
    - "8800:8800"
  volumes:
    - ./mpd.conf:/etc/mpd.conf
    - ./music:/var/lib/mpd/music
    - ./playlists:/var/lib/mpd/playlists
  devices:
    - /dev/snd
  restart: always

Server Setup

$ mkdir -p ~/fig/mpd/{music,playlists}
$ cd ~/fig/mpd/

$ wget https://upload.wikimedia.org/wikipedia/commons/d/d5/Pop_Goes_the_Weasel.ogg -P music

$ curl -s -X POST -H 'Content-Length: 0' http://www.shoutcast.com/Home/Top |
    jq '.[].ID' |
      parallel --eta -k curl -s 'http://yp.shoutcast.com/sbin/tunein-station.m3u?id={}' |
        sed '1!s@#EXTM3U@@' |
          cat -s > playlists/shoutcast.m3u

$ cat > playlists/microphone.m3u << _EOF_
#EXTM3U
#EXTINF:-1,microphone
alsa://plughw:1,0
_EOF_

$ docker-compose up -d
$ docker-compose exec mpd sh
>>> mpc help
>>> mpc update
>>> mpc ls | mpc add
>>> mpc repeat on
>>> mpc random on
>>> mpc
>>> mpc clear
>>> mpc lsplaylists
>>> mpc load shoutcast
>>> mpc play
>>> exit

Client Setup

Host: x.x.x.x
Port: 6600
Streaming host: x.x.x.x
Streaming port: 8800

Read More