mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-21 21:33:02 +01:00
update shoutcast
This commit is contained in:
@@ -6,8 +6,25 @@ shoutcast
|
|||||||
[SHOUTcast][1] Server (DNAS) - The most popular online streaming server
|
[SHOUTcast][1] Server (DNAS) - The most popular online streaming server
|
||||||
software on the planet, used by over 50,000 broadcasters.
|
software on the planet, used by over 50,000 broadcasters.
|
||||||
|
|
||||||
|
## How it works
|
||||||
|
|
||||||
|
```
|
||||||
|
+-----+ +-----------+
|
||||||
|
| mpd | ----> | shoutcast |
|
||||||
|
+-----+ PUB +-----------+
|
||||||
|
^
|
||||||
|
|SUB
|
||||||
|
+--------+--------+
|
||||||
|
| | |
|
||||||
|
+-----+ +-----+ +-----+
|
||||||
|
| mpd | | mpd | | mpd |
|
||||||
|
+-----+ +-----+ +-----+
|
||||||
|
```
|
||||||
|
|
||||||
## docker-compose.yml
|
## docker-compose.yml
|
||||||
|
|
||||||
|
Server:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
shoutcast:
|
shoutcast:
|
||||||
image: vimagick/shoutcast
|
image: vimagick/shoutcast
|
||||||
@@ -19,6 +36,23 @@ shoutcast:
|
|||||||
restart: always
|
restart: always
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
## sc_serv.conf
|
## sc_serv.conf
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
@@ -37,4 +71,81 @@ banfile=control/sc_serv.ban
|
|||||||
ripfile=control/sc_serv.rip
|
ripfile=control/sc_serv.rip
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 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/
|
||||||
|
```
|
||||||
|
|
||||||
[1]: http://wiki.shoutcast.com/wiki/SHOUTcast
|
[1]: http://wiki.shoutcast.com/wiki/SHOUTcast
|
||||||
|
|||||||
Reference in New Issue
Block a user