1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/shoutcast/README.md

152 lines
2.9 KiB
Markdown
Raw Normal View History

2016-09-17 18:59:19 +02:00
shoutcast
=========
2016-09-17 19:09:32 +02:00
![](https://upload.wikimedia.org/wikipedia/en/thumb/f/f7/SHOUTcast_logo.svg/200px-SHOUTcast_logo.svg.png)
2016-09-17 18:59:19 +02:00
[SHOUTcast][1] Server (DNAS) - The most popular online streaming server
software on the planet, used by over 50,000 broadcasters.
2016-09-18 05:29:41 +02:00
## How it works
```
+-----+ +-----------+
| mpd | ----> | shoutcast |
+-----+ PUB +-----------+
^
|SUB
+--------+--------+
| | |
+-----+ +-----+ +-----+
| mpd | | mpd | | mpd |
+-----+ +-----+ +-----+
```
2016-09-17 18:59:19 +02:00
## docker-compose.yml
2016-09-18 05:29:41 +02:00
Server:
2016-09-17 18:59:19 +02:00
```yaml
shoutcast:
image: vimagick/shoutcast
ports:
- "8000:8000"
- "8001:8001"
volumes:
- ./sc_serv.conf:/opt/shoutcast/sc_serv.conf
restart: always
```
2016-09-18 05:29:41 +02:00
Client:
```yaml
mpd:
image: easypi/mpd-arm
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
```
2016-09-17 18:59:19 +02:00
## sc_serv.conf
```ini
#
# http://wiki.shoutcast.com/wiki/SHOUTcast_DNAS_Server_2
#
adminpassword=hackme1
password=hackme2
requirestreamconfigs=1
streamid_1=1
streampath_1=/stream/1/
logfile=logs/sc_serv.log
w3clog=logs/sc_w3c.log
banfile=control/sc_serv.ban
ripfile=control/sc_serv.rip
```
2016-09-18 05:29:41 +02:00
## nginx.conf
```
http {
server {
listen 80;
server_name shoutcast.easypi.info;
location / {
proxy_pass http://127.0.0.1:8000;
}
}
}
stream {
server {
listen 81;
proxy_pass 127.0.0.1:8001;
}
}
```
## mpd.conf
```
music_directory "/var/lib/mpd/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/database"
log_file "/var/log/mpd/mpd.log"
pid_file "/var/run/mpd.pid"
state_file "/var/lib/mpd/state"
sticker_file "/var/lib/mpd/sticker.sql"
input {
plugin "curl"
}
audio_output {
type "alsa"
name "My ALSA Device"
mixer_type "software"
}
audio_output {
type "httpd"
name "My HTTP Stream"
encoder "vorbis"
port "8800"
bitrate "128"
format "44100:16:1"
always_on "yes"
tags "yes"
}
audio_output {
type "shout"
protocol "shoutcast"
encoding "mp3"
name "My Shout Stream"
host "shoutcast.easypi.info"
port "80"
mount "/stream/1/"
password "hackme2"
bitrate "128"
format "44100:16:1"
}
```
```bash
$ export MPD_HOST=192.168.31.104
$ mpc update
$ mpc lsplaylists
$ mpc load playlist
$ mpc repeat on
$ mpc play
$ vlc http://shoutcast.easypi.info/stream/1/
```
2016-09-17 18:59:19 +02:00
[1]: http://wiki.shoutcast.com/wiki/SHOUTcast