Code: |
/----------\ /----------\ /---------------\-----------> LISTENER | YOUR | | TRANS- | ENCODING | SERVER | MULTIPLE | MUSIC |------>| CODER |---------->| | STREAMS \----------/ \----------/ \---------------/-----------> LISTENER *** MUSIC/TRANSCODER/SERVER CAN BE ON SAME MACHINE *** |
Code: |
# emerge shoutcast-server-bin Calculating dependencies ...done! >>> emerge (1 of 1) media-sound/shoutcast-server-bin-1.9.5 to / !!! shoutcast-1-9-5-linux-glibc6.tar.gz not found in /usr/portage/distfiles !!! media-sound/shoutcast-server-bin-1.9.5 has fetch restriction turned on. !!! This probably means that this ebuild's files must be downloaded !!! manually. See the comments in the ebuild for more information. !!! The following are listed in SRC_URI for shoutcast-server-bin: !!! shoutcast-1-9-5-linux-glibc6.tar.gz |
Code: |
# wget http://www.shoutcast.com/downloads/sc1-9-5/shoutcast-1-9-5-linux-glibc6.tar.gz # mv shoutcast-1-9-5-linux-glibc6.tar.gz /usr/portage/distfiles/ # emerge shoutcast-server-bin |
Code: |
# nano -w /etc/shoutcast/sc_serv.conf # There is one line in the file you MUST CHANGE Password=changeme # There are a couple of other lines you might want to alter AutoDumpUsers=0 AutoDumpSourceTime=30 |
Code: |
# emerge shoutcast-trans-bin |
Code: |
# nano -w /etc/shoutcast/sc_trans.conf # Change the playlist line to look like this Remember -> PlaylistFile=/opt/shoutcast/playlists/playlist.lst # There's a few things we MUST change ServerIP=localhost ServerIP=your.linux.box.ip.address Password=changeme shoutcast/sc_serv.conf StreamTitle, StreamURL, Genre # Example of my data StreamTitle=Major's Music StreamURL=http://my.box.address Genre=Classical |
Code: |
# find /mp3/classical/ -type f -name "*.mp3" > playlist.lst |
Code: |
# cat playlist.lst /mp3/classical/Heavy Classix - Wagner - The Ride of the Valkyries.mp3 /mp3/classical/Heavy Classix - Berlioz - Hungarian March.mp3 /mp3/classical/Heavy Classix - Borodin - Polovtsian Dance.mp3 /mp3/classical/Heavy Classix - Khatchaturian - Gayaneh Sabre Dance.mp3 /mp3/classical/Heavy Classix - Tchaikovsky - 1812 Overture.mp3 /mp3/classical/Heavy Classix - Berlioz - IV March of the Scaffold.mp3 /mp3/classical/Heavy Classix - Prokofiev - Montagues and Capulets.mp3 /mp3/classical/Heavy Classix - Holst - Mars The Bringer of War.mp3 /mp3/classical/Heavy Classix - Tchaikovsky - III Allegro Molto Vivace.mp3 /mp3/classical/Heavy Classix - Wagner - Lohengrin - Prelude to Act III.mp3 /mp3/classical/Heavy Classix - Mahler - IV Sturmisch Bewegt.mp3 /mp3/classical/Heavy Classix - Espana.mp3 /mp3/classical/Heavy Classix - Stravinsky - Infernal Dance.mp3 |
Code: |
# mv playlist.lst /opt/shoutcast/playlists/playlist.lst |
Code: |
# /etc/init.d/shoutcast start # /etc/init.d/shoutcast_trans start # rc-update add shoutcast default # rc-update add shoutcast_trans default |
Code: |
// If your shoutcast server AND your iptables run on the same machine # iptables -A INPUT -p tcp -m tcp --dport 8000 -j ACCEPT // If your shoutcast server is behind the machine running iptables // NOTE: Change 192.168.0.100 to the IP if your shoutcast server box # iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 8000 -j DNAT --to 192.168.0.100:8000 |
Code: |
// To advance to the next song # killall -s WINCH sc_trans_linux // After you change the playlist a little, reload it # killall -s USR1 sc_trans_linux // Toggle shuffle play on and off # killall -s USR2 sc_trans_linux |