1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-14 11:23:34 +02:00
dockerfiles/mpd/README.md
2016-08-19 02:31:46 +08:00

1.5 KiB

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.

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

$ cd ~/fig/mpd/
$ mkdir -p music playlists
$ wget https://upload.wikimedia.org/wikipedia/commons/d/d5/Pop_Goes_the_Weasel.ogg -O music/song.ogg
$ 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
$ docker-compose up -d

Client Setup

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

Read More